Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Good afternoon,
I have created a master measure which is price1 - price2. Its called 'Profit'
I would now like to use this master measure within an expression. I would like to do avg(profit).
Please can someone let me know if this is possible and if so what the syntax is.
I've tried -
avg=("Profit")
avg([Profit])
avg=[Profit]
Hello,
Although using directly the expression =Avg(Price1-Price2) is supported, it seems that using the expression =Avg(MyMasterMeasure) might not be. If you create an expression Price1 - Price2 then it is equivalent to Only(Price1 - Price2), therefore Avg(MyMasterMeasure) becomes equivalent to Avg(Only(Price1 - Price2)) and thus the result becomes null due to the double aggregation. Additional information about Only() can be found here [1]. I would suggest you to use directly =Avg(Price1-Price2), instead of =Avg(MyMasterMeasure), but you can also submit a feature request [2], if you want.
---
Hello,
Although using directly the expression =Avg(Price1-Price2) is supported, it seems that using the expression =Avg(MyMasterMeasure) might not be. If you create an expression Price1 - Price2 then it is equivalent to Only(Price1 - Price2), therefore Avg(MyMasterMeasure) becomes equivalent to Avg(Only(Price1 - Price2)) and thus the result becomes null due to the double aggregation. Additional information about Only() can be found here [1]. I would suggest you to use directly =Avg(Price1-Price2), instead of =Avg(MyMasterMeasure), but you can also submit a feature request [2], if you want.
---