I am quite new to MDX and I need to write a query that gives me the day difference between two dates. The problem is that the dates exist on two different rows in my data. For example:
My Fact table:
SEAL | STARTDATE | PROCESS | FK_DATE_KEY
1 | 2012-10-22| A | 20121022
1 | 2012-10-24| B | 20121024
2 | 2012-10-22| A | 20121022
2 | 2012-10-26| B | 20121026
What I need returned is :
SEAL | AGE_IN_DAYS
1 | 2
2 | 4
Please help.... I have a date dimension that relates to my FK_DATE_KEY