Home:ALL Converter>Issue with calculated measures when using calculated members

Issue with calculated measures when using calculated members

Ask Time:2022-08-18T16:08:07         Author:Frantisek Pour

Json Formatter

I am using Excel OLAP pivot using Analytics Services. The database has customer dimension with customer codes and time dimension with dates. Measures are Sales Price, which equals turnover. In OLAP Tools I created calculated member LW TY (last week this year) and a calculated measure CUSTOMER COUNT (which is supposed to calculate the number of customer codes for a given time period).

The MDX codes are here

LW TY

AGGREGATE( LASTPERIODS( 7, [Taxable Supply Dates].[Taxable Supply YQMD Hierarchy].[Taxable Supply Date Name].&[20220813] ) )

And here is CUSTOMER COUNT

DISTINCTCOUNT( EXISTING [Customers].[Customer Code Hierarchy].[Customer Code] )

The OLAP pivot returns values for calculated member LW TY correctly for measures (sales and orders) already existing in OLAP cube, but error for crossover between calculated member LW TY and calculated measure CUSTOMER COUNT.

[Excel result]

enter image description here

Please help.

Author:Frantisek Pour,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/73399514/issue-with-calculated-measures-when-using-calculated-members
yy