Quantcast
Channel: Pentaho Community Forums
Viewing all articles
Browse latest Browse all 16689

How to calculate 'Days unitl Expiry' (as Measure) in Mondrian Schema

$
0
0
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.

Viewing all articles
Browse latest Browse all 16689

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>