Hi,
I need to calculate “Days Until Expiry” based on the 'End Date Id' from the Fact Table. We have a Calendar Table as Time Dimension and the required date values for calculation exists there. I would like to have “Days Until Expiry” (a numeric value) as a measure in the mondrian schema.
Days Until Expiry = End Date – Current Date
Table Structures are as follows:
Fact Table
Id
...
Start_Date_Id Numeric
End_Date_Id Numeric
…etc.
Start_Date_Id and End_Date_Id are separate Foreign Keys (Ref: Calendar Table)
Calendar Table
Date_Id Numeric
Calandar_Date Date
Year Numeric
Quarter Numeric
Month Numeric
…etc.
A quick study showed me that dates can't go as measures and hence the trouble, any experts out there ? Thanks.
I need to calculate “Days Until Expiry” based on the 'End Date Id' from the Fact Table. We have a Calendar Table as Time Dimension and the required date values for calculation exists there. I would like to have “Days Until Expiry” (a numeric value) as a measure in the mondrian schema.
Days Until Expiry = End Date – Current Date
Table Structures are as follows:
Fact Table
Id
...
Start_Date_Id Numeric
End_Date_Id Numeric
…etc.
Start_Date_Id and End_Date_Id are separate Foreign Keys (Ref: Calendar Table)
Calendar Table
Date_Id Numeric
Calandar_Date Date
Year Numeric
Quarter Numeric
Month Numeric
…etc.
A quick study showed me that dates can't go as measures and hence the trouble, any experts out there ? Thanks.