Difference between two dimensions filtered with MDX SSAS

I have a problem with a calculated member that calculates the difference between two calculated members. what my actions look like in the SSAS browser:

Phase Measure 1 Measure 2 P1 50 30 P2 123 49 P3 14 69 

I created a calculated element as Calculated Member 1 -Calculated Member 2 But when I use a filter with two different phases, I get empty values. For example From P1 : 50 - From P2 49 I get an empty value. Phase is an attribute of a dimension. I use Power BI, and I use a phase filter for each dimension.

MDX Calculations:

 CREATE MEMBER CURRENTCUBE.[Measures].[Measure 1] AS ([Indicateur].[LEVEL5].&[R522],[Measures].[Montant]), FORMAT_STRING = "# ##0,00;-# ##0,00", VISIBLE = 1 , ASSOCIATED_MEASURE_GROUP = 'Fact DAF1'; CREATE MEMBER CURRENTCUBE.[Measures].[Measure 2] AS ([Indicateur].[LEVEL5].&[R500],[Measures].[Montant]), FORMAT_STRING = "# ##0,00;-# ##0,00", VISIBLE = 1 , ASSOCIATED_MEASURE_GROUP = 'Fact DAF1'; 

Difference: [Measures].[Measure 1] - [Measures].[Measure 2]

How to solve this?

+5
source share

Source: https://habr.com/ru/post/1268548/


All Articles