I have a table with 3 columns :
I want to set up a Pivot Table with :
What is the DAX formula for Measure2 ?
Measure 2 =
It works fine ! Thanks
Before asking on the forum, I tried SELECTEDVALUE but I put it in the CALCULATE expression, and it did not work.
So, The solution seems to use SELECTEDVALUE in a VAR expression...
If you want to attain the same behaviour without variables then you will have to use explicit FILTER, for example.
ALL ( Product[Brand] ),
Product[Brand] = SELECTEDVALUE ( Product[Brand] )
Because writing aggregation functions like SUM, AVERAGE, MAX are not allowed while doing boolean filter operations, and same is for SELECTEDVALUE, hence the following won't work.
'Product'[Brand] = SELECTEDVALUE ( 'Product'[Brand] )
There's also the added complexity with FILTER (ALL()) - that may produce more results than intended in the visual context.
Correct, in that case he can either wrap CALCULATE's filter arguments with KEEPFILTERS or use VALUES as per the requirements.
Learn how to create your own user groups today!
Click here to read more about the November 2021 Updates!
Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.