Tuesday, February 21, 2012

Report from SSAS with two different date column

Hi all,

I created a SSAS cube with the dimension "date" (including dates from 2006 to 2007) and "service numbers" (including service number where customer can call in) and a measure "number of calls".

The I created a report with the MDX builder showing a date as column (i.e. 02/01/2007), service numbers as rows and number of calls in the middle. Easy :-)

Now I will add a column with a date one year before (i.e. 02/01/2006) and a column showing the difference between the two dates as a percentage value.

How can I create this in the graphical builder?

Or do I have to create the MDX query manualy?

Thanks in advance!

some ASCII art:

2/1/07 2/1/06 diff.

-

service number 1 | 345 | 690 | 50%

service number 1 | 100 | 50 | 200%

...

Hi,

Do you have the data for the previous year's date in the query? For this scenario, it is must to create a calculated measure either in the query builder or in the cube which returns the value for the previous year's same date. You can use the LAG function to get this.

After getting both measures, you can directly give the percentage expression in the column "diff". No need for creating an MDX query for the percentage.

No comments:

Post a Comment