Hi folks,
I used to work with a time-dimension which looks like this:
Now I want to introduce Weeks, and maybe Quarters. Adding them to the same hierarchy works partly but gives wrong results for weeks for example, which belong to more than one month for example.
So I built a second Hierarchy, which is like Year/Week/Day. But now, I get completly wrong results for my measures, no matter if I use the Dimension Attributes from the new hierarchy or the old one.
Here comes the schema:
At the same time, my old schema is working perfectly, so the problem must be in the schema...
thanks & regards
I used to work with a time-dimension which looks like this:
Code:
<Dimension type="TimeDimension" visible="true" highCardinality="false" name="DateTime">
<Hierarchy name="YMD" visible="true" hasAll="false" primaryKey="id">
<Table name="date_time_dim">
</Table>
<Level name="Year" visible="true" column="Year" type="Integer" uniqueMembers="true" levelType="TimeYears" hideMemberIf="Never">
</Level>
<Level name="Month" visible="true" column="Month" nameColumn="MonthName" type="Integer" uniqueMembers="false" levelType="TimeMonths" hideMemberIf="Never">
</Level>
<Level name="Day" visible="true" column="DayOfMonth" type="Integer" uniqueMembers="false" levelType="TimeDays" hideMemberIf="Never">
</Level>
</Hierarchy>
</Dimension>
So I built a second Hierarchy, which is like Year/Week/Day. But now, I get completly wrong results for my measures, no matter if I use the Dimension Attributes from the new hierarchy or the old one.
Here comes the schema:
Code:
<Dimension type="TimeDimension" visible="true" highCardinality="false" name="DateTime">
<Hierarchy name="YMD" visible="true" hasAll="false" primaryKey="id">
<Table name="date_time_dim">
</Table>
<Level name="Year" visible="true" column="Year" type="Integer" uniqueMembers="true" levelType="TimeYears" hideMemberIf="Never">
</Level>
<Level name="Month" visible="true" column="Month" nameColumn="MonthName" type="Integer" uniqueMembers="false" levelType="TimeMonths" hideMemberIf="Never">
</Level>
<Level name="Day" visible="true" column="DayOfMonth" type="Integer" uniqueMembers="false" levelType="TimeDays" hideMemberIf="Never">
</Level>
</Hierarchy>
<Hierarchy name="YWD" visible="true" hasAll="false" primaryKey="id">
<Table name="date_time_dim">
</Table>
<Level name="Year" visible="true" column="Year" type="Integer" uniqueMembers="true" levelType="TimeYears" hideMemberIf="Never">
</Level>
<Level name="Week" visible="true" column="WeekNumber" nameColumn="WeekName" type="Integer" uniqueMembers="false" levelType="TimeWeeks" hideMemberIf="Never">
</Level>
<Level name="Day" visible="true" column="DayOfMonth" type="Integer" uniqueMembers="false" levelType="TimeDays" hideMemberIf="Never">
</Level>
</Hierarchy>
</Dimension>
At the same time, my old schema is working perfectly, so the problem must be in the schema...
thanks & regards