Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!
I have a large data table with a column that returns two values based on an IF statement.
IF true THEN "Default"
ELSE "Not Default"
What I would like to do is to create a slicer that on a single click:
I've been playing around with Switch and IF functions and am not able to figure this one out. Any help is appreciated!
Proud to be a Super User! | |
Solved! Go to Solution.
Hi @ExcelMonke
You can refer to the following solution
Sample data
1.You can create a slicer table
2.Create a measure and put it to the visual filter
Measure =
IF (
ISFILTERED ( 'Slicer'[Column1] ),
IF (
OR (
SELECTEDVALUE ( 'Slicer'[Column1] ) = "default"
&& SELECTEDVALUE ( 'Table'[Column2] ) = "default",
SELECTEDVALUE ( 'Slicer'[Column1] ) = "all"
),
1,
0
),
1
)
Output
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I think you're making this more complicated than need be.
Simply create a Slicer Visual and drag this column. This will act as your Slicer
Be sure to turn on the Select All option:
Will this solve your issue?
Regards,
Thanks for the suggestion - I am actually hoping to do a single select option rather than a multi-select.
Proud to be a Super User! | |
I don't think I was explaining what I was hoping for clearly.
I want two single-click options:
i.e. one option to select default values, one option to effectively "select all"
Proud to be a Super User! | |
Hi @ExcelMonke
You can refer to the following solution
Sample data
1.You can create a slicer table
2.Create a measure and put it to the visual filter
Measure =
IF (
ISFILTERED ( 'Slicer'[Column1] ),
IF (
OR (
SELECTEDVALUE ( 'Slicer'[Column1] ) = "default"
&& SELECTEDVALUE ( 'Table'[Column2] ) = "default",
SELECTEDVALUE ( 'Slicer'[Column1] ) = "all"
),
1,
0
),
1
)
Output
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Am really not understanding. Based on your last explanation, that is why I suggested to Turn On the Select All option in your Slicer visual in my original reply.
Your User, with one click, can Select all, or select one of the two options individually. That is exactly what it is designed for.
The other option available to you is to use Bookmarks, Buttons and the Filter Pane. But in my opinion, that seems to going to an extreme length to solve this issue.
Kind Regards,
| User | Count |
|---|---|
| 50 | |
| 43 | |
| 36 | |
| 33 | |
| 29 |
| User | Count |
|---|---|
| 139 | |
| 129 | |
| 61 | |
| 59 | |
| 57 |