Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
WishAskedSooner
Continued Contributor
Continued Contributor

Is there a SELECTED button DAX function?

Hi Experts!

 

I have a report with 3 slicers: A, B, and C. However, at any given time, I want only one of the three slicers to be visible/shown while the remaining two are hidden because the slicer context changes depending on users' needs.

 

I have configured six buttons: A active/inactive, B a/i, and C a/i with three Bookmarks to appropriately hide/show buttons and slicers when the user clicks the buttons.

 

Everything works as expected.

 

Now, I need to find a way in DAX to determine which button/slicer is active/shown. However, I can't seem to find an appropriate function.

 

Is there a way to do this in DAX? Or, should I try another method?

 

TIA!

1 ACCEPTED SOLUTION
johnt75
Super User
Super User

When you're working with bookmarks you can have them remember the state of filters, slicers etc.

You could create a disconnected table containing rows for button A, B & C. When the appropriate button is active make sure that a filter is applied on the disconnected table and at the same time clear the selections on the other slicers. You can then use SELECTEDVALUE on the disconnected table to determine which button is active.

View solution in original post

4 REPLIES 4
WishAskedSooner
Continued Contributor
Continued Contributor

Hi @johnt75 ,

 

Perfect! That worked! I was pondering a solution and came up with that on my own. After configuring, testing, and confirming that it works, I was going to post back here my solution.

 

But, since you posted the same solution, I will mark yours as the solution!

 

Thanks and kudos!

johnt75
Super User
Super User

When you're working with bookmarks you can have them remember the state of filters, slicers etc.

You could create a disconnected table containing rows for button A, B & C. When the appropriate button is active make sure that a filter is applied on the disconnected table and at the same time clear the selections on the other slicers. You can then use SELECTEDVALUE on the disconnected table to determine which button is active.

Sergii24
Super User
Super User

@Sergii24 ,

 

Thank you so much for your prompt reply!

 

I am uncertain if the FILTER functions above will work. For example,

 

A user clicks Button B and makes a selection in Slicer B. Next, the user clicks Button A, but does not clear Slicer B before doing so. Then, the user makes a selection in Slicer A.

 

Thus, both Slicers A and B will be filtered. In thinking some more about this scenario, if there was a way to programmatically clear the slicers when they click one of the buttons, maybe that would work? But, I don't know how to go about doing that.

 

So, your thoughts?

 

I am very curious on how others have designed solutions for this business requirement.

 

TIA!

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.