I am using olap4j to query a mondrian cube. I have defined a standard TimeDimension in my schema xml:
<Dimension name="DateTime" type="TimeDimension">
<Hierarchy hasAll="true" primaryKey="DateId">
<Table name="event_date" />
<Level name="Year" column="Year" type="Numeric" uniqueMembers="true" levelType="TimeYears" />
<Level name="Quarter" column="Quarter" captionColumn="QuarterLabel" uniqueMembers="false" levelType="TimeQuarters" />
<Level name="Month" column="Month" captionColumn="MonthLabel" uniqueMembers="false" type="Numeric" levelType="TimeMonths" />
<Level name="Week" column="Week" uniqueMembers="false" levelType="TimeWeeks" />
<Level name="Day" column="Day" uniqueMembers="false" type="Numeric" levelType="TimeDays">
<Property name="DayISO" column="DateIso" dependsOnLevelValue="true" />
<Property name="DayOfWeek" column="DayOfWeek" dependsOnLevelValue="true" />
</Level>
</Hierarchy>
</Dimension>
What I cannot understand is how can I use olap4j to query a range of dates on cubes that have DateTime as a shared dimension.
Does anyone have any examples that can be shared?
Yosi
In MDX, you can slice the results by a range of dates like so: