Forum Discussion
Dgreen23
6 years agoHelper III
Selection
I have a dashboard where the end-user can select one of several options to filter a table. I also have a label that shows what the current selection is. I need a way to make the label say ALL when no...
- 6 years ago
So you can do something like:
Label Measure = IF(HASONEVALUE('Table'[Column]),MAX('Table'[Column),"All")For a really fancy version of this: https://community.powerbi.com/t5/Quick-Measures-Gallery/The-Most-Amazing-Mind-Blowing-Dynamic-Slicer-Title-Measure-Ever/td-p/429587
Pragati11
6 years agoSuper User
Hi Dgreen23.,
You can create a measure as follows:
new Check = var total = CALCULATE(COUNT(ColorSample[color]), ALL(ColorSample[color])) RETURN IF(HASONEVALUE(ColorSample[color]), SELECTEDVALUE(ColorSample[color]), IF(COUNT(ColorSample[color]) > 1 && COUNT(ColorSample[color]) < total, CONCATENATEX(VALUES(ColorSample[color]), CONCATENATE(ColorSample[color], ","), UNICHAR(10)) , "All Selected")
NOTE: Replace "ColorSample[color]" in above DAX with your column to be used in slicer.
If this helps and resolves the issue, appreciate a Kudos and mark it as a Solution! 🙂
Thanks,
Pragati