we are using a multidimensional cube with power bi as the visual layer and i have some problems with a measure that should be quite simple but i dont know mdx/multidim very well.
How can i get the same result as (for contoso db) as a MDX Measure (that i can use in power bi in an equivalent way):
Sales Amount red Products =
CALCULATE(
SUMX(Sales, Sales[Quantity] * Sales[Net Price]),
KEEPFILTERS('Product'[Color] = "Red")
)
I have a working measure that produces the correct results but it is too slow if more dimensions are shown in the power bi table:
Create Member Currentcube.[Measures].[Sales Amount red Products]
as iif( ( [Measures].[Sales Amount],[Product].[Color].&[Red]) <> 0
AND ([Product].[Color].currentmember is [Product].[Color].&[Red]
OR [Product].[Color].currentmember is [Product].[Color].[all]) ,
([Measures].[Sales Amount],[Product].[Color].&[Red] ) ,NULL)
question from:
https://stackoverflow.com/questions/66059846/equivalent-concept-for-mdx-as-keepfilters 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…