I have the following schema :
I am using a live connection to this SSAS Tabular cube, I want to calculate the % of the Products with Status = Available
for each product comparing to the total of Products with Status=Available.
I have the following schema :
I am using a live connection to this SSAS Tabular cube, I want to calculate the % of the Products with Status = Available
for each product comparing to the total of Products with Status=Available.
Something like:
% Products Available =
VAR NumProductsAvailable =
CALCULATE (
DISTINCTCOUNT ( FactTable[ProductSK] ),
Status[Status] = "Available"
)
VAR NumProducts =
DISTINCTCOUNT ( FactTable[ProductSK] )
RETURN
DIVIDE (
NumProductsAvailable,
NumProducts
)