Forum Discussion
Showing multiple slicer values with IF statement
- Anonymous2 years ago
Hi joew98 ,
Please try:Title BOC Label = VAR _select_count = COUNTROWS(ALLSELECTED('BOC'[BOC])) VAR _all_count = COUNTROWS(ALL('BOC'[BOC])) VAR _result = IF(_select_count=_all_count,"All BOCs",[BOC Selected 2]) RETURN _resultBest Regards,
Gao
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
Hi danextian. Thanks for the response. This measure works with showing multiple values but the text "All BOCs" does not show if no value is selected. Do you know why?
=
IF (
ISBLANK ( SELECTEDVALUE ( BOC[BOC] ) ) || HASONEVALUE ( BOC[BOC] ),
[BOC Selected 2],
"All BOCs"
)
Hi joew98 ,
Please try:
Title BOC Label =
VAR _select_count = COUNTROWS(ALLSELECTED('BOC'[BOC]))
VAR _all_count = COUNTROWS(ALL('BOC'[BOC]))
VAR _result = IF(_select_count=_all_count,"All BOCs",[BOC Selected 2])
RETURN
_result
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum