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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Dragonfury
Frequent Visitor

Using measure values within a parameter group to reference in an outside measure

I've created a new field parameter based on key measure values:

 

The resulting selectable measures in the parameter look like this:

Measure 1,

Measure 2,

Measure 3

 

Here is the parameter DAX:

 

Measure Parameter = {
    ("Measure 1", NAMEOF('Key Measures'[Measure1]), 0),
    ("Measure 2", NAMEOF('Key Measures'[Measure2]), 1),
    ("Measure 3", NAMEOF('Key Measures'[Measure3]), 2)
}

 

 

Depending on which measure I select from the parameter I want a new measure to select another measure.

 

For example,

If "Measure 1" is selected, give me "Measure 1A",

If "Measure 2" is selected, give me "Measure 2A",

If "Measure 3" is selected, give me "Measure 1A + Measure 2A"

 

I've tried creating a measure with a switch statement like this: 

 

NewMeasure = SWITCH(
                            SELECTEDVALUE('Measure Parameter'[Measure Parameter])
                            ,"Measure 1", [Measure 1A]
                            ,"Measure 2", [Measure 2A]
                            ,"Measure 3", ([Measure 1A] + [Measure 2A])
                    )

 

 

But I get the following error:

Dragonfury_0-1680772047404.png

 

Any idea where I am going wrong?

1 ACCEPTED SOLUTION
johnt75
Super User
Super User

You can't use SELECTEDVALUE with the name of the parameter as that column uses the groupby functionality to ensure you have to include the fields column as well.

To determine which parameter was selected you could either use SELECTEDVALUE with the sort order column, or add a new column to the fields parameter table and use SELECTEDVALUE with that.

View solution in original post

1 REPLY 1
johnt75
Super User
Super User

You can't use SELECTEDVALUE with the name of the parameter as that column uses the groupby functionality to ensure you have to include the fields column as well.

To determine which parameter was selected you could either use SELECTEDVALUE with the sort order column, or add a new column to the fields parameter table and use SELECTEDVALUE with that.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.