Forum Discussion
DAX Switch & nested IF
- 1 year ago
Weird when you say 'i can't belive there is no support on this'.. I clicked open your original post and saw Community support followed up twice on your question there.
- 11 months ago
I left a comment on your original post, but here it is agian:
Realistically, a field parameter would be a better implementation of this situation than a DAX Switch statement. For the field parameter, you would select/add every measure you would like a user to select from (like what you have in the switch statement) and use this as a slicer on the page. Also with a field parameter, you can select multiple values and each value will appear and not get ignored like a Switch statement would.To add onto this, if you need the ability for end-users to select multiple data elements a field parameter would be a better solution than nested IF's or Switch statements. Here's the documentation for field parameters: Use report readers to change visuals - Power BI | Microsoft Learn
I left a comment on your original post, but here it is agian:
Realistically, a field parameter would be a better implementation of this situation than a DAX Switch statement. For the field parameter, you would select/add every measure you would like a user to select from (like what you have in the switch statement) and use this as a slicer on the page. Also with a field parameter, you can select multiple values and each value will appear and not get ignored like a Switch statement would. To add onto this, if you need the ability for end-users to select multiple data elements a field parameter would be a better solution than nested IF's or Switch statements. Here's the documentation for field parameters: Use report readers to change visuals - Power BI | Microsoft Learn