Forum Discussion
call two different measure parameter in DAX
- Anonymous2 years ago
Hi Anonymous ,
I suggest you to create one parameter with all measure names and then add a Group column.
Group = IF(Parameter[Parameter] in {"M1","M2","M3"},"Group1","Group2")Result is as below.
Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
DallasBaba may be I have not explained it correctly. Basically I have created Field parameter on front end. Parameter1 contains 3 measures M1 (sum(M1)), M2 and M3 respectively. when I select Group1, I want to show values of M1, M2 & M3 in the report. So report would look like below
| Dimension1 | M1 | M2 | M3 |
| A | 10 | 20 | 30 |
Similarly, if I select Group2, In same table visual, I would like to see values of measures M4 & M5.
- Anonymous2 years agoNot applicable
Hi Anonymous ,
I suggest you to create one parameter with all measure names and then add a Group column.
Group = IF(Parameter[Parameter] in {"M1","M2","M3"},"Group1","Group2")Result is as below.
Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- DallasBaba2 years ago
Skilled Sharer
Anonymous you can accomplish this by creating a measure that switches between Parameter1 and Parameter2 based on the slicer selection.
Create a measure that selects the appropriate set of measures based on the slicer value:
Dynamic Measures =
VAR SelectedGroup = SELECTEDVALUE('Table'[Group])
RETURN
SWITCH(
SelectedGroup,
"Group1", [Parameter1.M1] + [Parameter1.M2] + [Parameter1.M3],
"Group2", [Parameter2.M4] + [Parameter2.M5],
BLANK()
)
Then create a table visual in your report with "Dimension1" as a dimension and use the "Dynamic Measures" measure as values.
When you select "Group1" in the slicer, it will display the sum of M1, M2, and M3.
When you select "Group2," it will show the sum of M4 and M5.The table visual should look like this:
let me know if this works
Thanks