I’m trying to use DAX to calculate a percentage value for a list of product properties, this percentage is calculated dividing the sum of the properties divided by either the quantity of the product or the kilograms, depending on the presentation of the product (Which is declared in the dimension table)
Is there a way to make a measure to take this decision? I was thinking in some thing like:
Percentage = IF( Products[Presentation]= “Kg” ;
DIVIDE( SumProp ; Kg ; 0 ) ;
DIVIDE( SumProp ; Qty ; 0 ) )
I thought on using RELATED() but it didn’t work either.
I know this doesn’t work, but I want to make this automatic without putting filters on it, does anybody know what can I do
Thank you.