Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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:
Any idea where I am going wrong?
Solved! Go to Solution.
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.
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.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
70 | |
68 | |
43 | |
34 | |
26 |
User | Count |
---|---|
86 | |
49 | |
45 | |
38 | |
37 |