Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I have a slicer that I want to use to calculate an amount based on the selected slicer value:
So CG_Sel gives me the selected value and in this case 'Shipping Accuracy'.
Checked with a card, this works perfectly.
Now I want this name that comes out (Shipping Accuracy) to be used in this calculate function :
In the table UCL there is a field ShipGrp and it holds also the value Shipping Accuracy.
So thouht this would be pretty straight forward but DAX does not approve.
Anybody an idea how I could pass the outcome of the selected value as a filter for the calculate formula?
So telling that it should filter field ShipGrp on 'Shipping Accuracy'?
Solved! Go to Solution.
Ok...nevermind turns out that I cannot use the measure but I can use the logic that I created measure CG_Sel with....
This worked :
You can't use a measure in CALCULATE filter, it must be a boolean or table expressions
However, you can create a temporary varaible with VAR and RETURN like this
Please click Accept as Solution and the thumbs up button, thank you!
Answer =
VAR yourchoice = SELECTEDVALUE(yourtable[yourcolumn])
RETURN
CALCULATE(
SUM(yourtable[yourvalue],
yourtable[yourcolumn]) = yourchoice
)
You can't use a measure in CALCULATE filter, it must be a boolean or table expressions
However, you can create a temporary varaible with VAR and RETURN like this
Please click Accept as Solution and the thumbs up button, thank you!
Answer =
VAR yourchoice = SELECTEDVALUE(yourtable[yourcolumn])
RETURN
CALCULATE(
SUM(yourtable[yourvalue],
yourtable[yourcolumn]) = yourchoice
)
Ok...nevermind turns out that I cannot use the measure but I can use the logic that I created measure CG_Sel with....
This worked :