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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
johnmenx
Frequent Visitor

Building standalone "button filters" in Power BI Desktop

Hi guys, I have a use case that I can use some community inputs for.

So I need a couple of rectangular buttons with labels like "Sales > 50,000" or "Customers who have defaulted on the payments", etc. 

And when these are clicked on, their color becomes green from transparent and thus the user knows that this filter is active.

 

Thanks a lot for answering and Im excited to see all the creative ways this can be done!

2 ACCEPTED SOLUTIONS
MasonMA
Impactful Individual
Impactful Individual

@burakkaragoz This looks so gpt-like 🙄

 

I would suggest to use 'Blank button'/ in-built Bookmark navigator plus 'bookmarks'. Capture each state on each Bookmark, which would be easier than using SELECTEDVALUES. 

 

thanks

Mason 

View solution in original post

@MasonMA I agree with you that this seems like a good use case for bookmarks.

View solution in original post

6 REPLIES 6
v-echaithra
Community Support
Community Support

Hi @johnmenx ,

May I ask if you have gotten this issue resolved?

 

If it is solved, please mark the helpful reply or share your solution and accept it as solution, it will be helpful for other members of the community who have similar problems as yours to solve it faster.

 

Regards,
Chaithra.

v-echaithra
Community Support
Community Support

Hii @johnmenx ,

As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided for the issue worked? or Let us know if you need any further assistance?
If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.

 

Regards,
Chaithra.

v-echaithra
Community Support
Community Support

Hi @johnmenx ,

Thank you @MasonMA  for providing a response.

We would like to follow up to see if the solution provided by the super user resolved your issue. Please let us know if you need any further assistance.
If our super user response resolved your issue, please mark it as "Accept as solution" and click "Yes" if you found it helpful.

 

Regards,
Chaithra.

MasonMA
Impactful Individual
Impactful Individual

@burakkaragoz This looks so gpt-like 🙄

 

I would suggest to use 'Blank button'/ in-built Bookmark navigator plus 'bookmarks'. Capture each state on each Bookmark, which would be easier than using SELECTEDVALUES. 

 

thanks

Mason 

@MasonMA I agree with you that this seems like a good use case for bookmarks.

burakkaragoz
Community Champion
Community Champion

Hi @johnmenx ,

Cool use case! You can totally fake "button filters" in Power BI Desktop, though it’s not super straightforward out of the box. Here’s how I usually do it:

1. Create a helper table with your button labels. Something like:

Code
 
ButtonFilter = DATATABLE(
    "Filter", STRING,
    {{"Sales > 50000"}, {"Defaulted Customers"}, {"All"}}
)

No need to connect this to your model.

2. Add a slicer visual using this table. Set the orientation to "Horizontal" or "Tile" in the slicer settings so it actually looks like buttons.

3. To make your visuals respond to the filter, create a measure like:

DAX
 
SelectedFilter = SELECTEDVALUE(ButtonFilter[Filter], "All")

Then, in your other measures, use SWITCH or IF to change the calculation based on which button is clicked. Example:

DAX
 
SalesAmountFiltered =
SWITCH(
    [SelectedFilter],
    "Sales > 50000", CALCULATE(SUM(Sales[Amount]), Sales[Amount] > 50000),
    "Defaulted Customers", CALCULATE(COUNTROWS(Customers), Customers[Status] = "Defaulted"),
    CALCULATE(SUM(Sales[Amount]))
)

4. For the color change: Power BI doesn’t let you dynamically style slicer buttons (yet), but you can change the "Selected color" in the Slicer format panel to green—so the selected button will look active.

It’s not perfect, but looks/works pretty well for dashboards! If you need totally custom visuals, you could look into Deneb or custom visuals, but above is the fast way.

Hope that helps! Let us know if you get stuck or want a more advanced setup. Good luck!
translation and formatting supported by AI

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.