Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
sharpjimbo
Regular Visitor

Field parameter selecting measures, referenced in another measure?

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:

 

  1. I've created two simple measures, they represent "cost projection 1" and "cost projection 2". They have to be measures, and not columns as these measures have a separate value parameter acting on them, uplifting the values by, say, 120% or whatever.
  2. I've then got a value parameter set up to switch between the two measures so either cost projection 1 or two appears in the various visualisations I've got on the tab.

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]

 

 

 

 

1 ACCEPTED SOLUTION
DataInsights
Super User
Super User

@sharpjimbo,

 

Instead of SELECTEDVALUE, try this DAX to capture the current field parameter selection:

 

SELECTCOLUMNS (
    SUMMARIZE ( 'Parameter', 'Parameter'[Parameter], 'Parameter'[Parameter Fields]),
    "Parameter",  'Parameter'[Parameter]
)

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

2 REPLIES 2
sharpjimbo
Regular Visitor

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.

DataInsights
Super User
Super User

@sharpjimbo,

 

Instead of SELECTEDVALUE, try this DAX to capture the current field parameter selection:

 

SELECTCOLUMNS (
    SUMMARIZE ( 'Parameter', 'Parameter'[Parameter], 'Parameter'[Parameter Fields]),
    "Parameter",  'Parameter'[Parameter]
)

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors