Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.
Hi everyone,
This feels like one of those things that should be relatively easy in Power Bi, but is proving to be really difficult.
To summarise:
The problem:
I simply want to be able to use the selected cost projection measure to calculate the deviation from the actual cost amount (i.e [Cost Projection 1 or 2] - [Actual Amount].
My initial throughts was to simply wrap the costs projection parameter reference in SELECTEDVALUE(), however that obviously doesn't work.
Further information:
I've managed to get this to deviation measure to work if I make the value parameter select between regular columns (and not the measures) using the DAX below. But this approach comes up short as I need the selection to be of measures as I also need the uplift parameter to work on these two measures too.
Thanks in advance, this seemingly simple problem is driving me nuts!
Deviation =
VAR tmp =
SELECTCOLUMNS(
'Parameter - Old vs. New',
"SelectColumn",[Parameter - Old vs. New]
)
VAR _str =
CONCATENATEX(
tmp,
[SelectColumn]
)
VAR _val =
SWITCH(
_str,
"Original Amount",
SUMX(
SELECTCOLUMNS(
'Alteryx Input',
"Original Amount",
[Original Amount]
),
[Original Amount]
),
"Revised Amount",
SUMX(
SELECTCOLUMNS(
'Alteryx Input',
"Revised Amount",
[Revised Amount]
),
[Revised Amount]
)
)
RETURN
_val - [Sum Actual Amount]
Solved! Go to Solution.
Instead of SELECTEDVALUE, try this DAX to capture the current field parameter selection:
SELECTCOLUMNS (
SUMMARIZE ( 'Parameter', 'Parameter'[Parameter], 'Parameter'[Parameter Fields]),
"Parameter", 'Parameter'[Parameter]
)
Proud to be a Super User!
Perfect, thanks for the suggestion!
I ended up bodging in a slightly different way, but I also explored this solution and it works! Thank you.
Instead of SELECTEDVALUE, try this DAX to capture the current field parameter selection:
SELECTCOLUMNS (
SUMMARIZE ( 'Parameter', 'Parameter'[Parameter], 'Parameter'[Parameter Fields]),
"Parameter", 'Parameter'[Parameter]
)
Proud to be a Super User!