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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Analitika
Post Prodigy
Post Prodigy

Button dynamic color in Power BI

Hello,

 

Please help me to make that whenever I press on button it changes color. I have two buttons sale1 sale2. Default is selected sale1 If I select sale2 then color changes of sale1 and sale2 buttons. How I could achieve this?

1 ACCEPTED SOLUTION

Hi @Analitika 

Can you please try the below steps.

1. Just Add two bookmark
       a. Sales1

       b. Sales2

 

Screenshot 2025-08-19 171134.png

 

2. Now Go to insert and select Bookmark navigator.

 

Screenshot 2025-08-19 171144.png

 

 

Here is your result.

 

Screenshot 2025-08-19 171211.png

 

Screenshot 2025-08-19 171217.png

 


You can adjust your background as per your preference using Format navigator


 

If this answers your questions, kindly accept it as a solution and give kudos.

View solution in original post

9 REPLIES 9
Shahid12523
Community Champion
Community Champion

DAX way (reusable):

Create a Button table with Sale1 & Sale2.

Use a slicer (hidden) to track selection.

Write a measure for button color and apply it to button Fill → fx.

Shahed Shaikh
Shahid12523
Community Champion
Community Champion

Bookmarks way (easy):

Create two bookmarks (Sale1 active, Sale2 active).

Assign each button to its bookmark.

This swaps button colors when clicked

Shahed Shaikh
v-hjannapu
Community Support
Community Support

Hi @Analitika,

I would also take a moment to thank @rohit1991 , @jaineshp , @mdaatifraza5556 for actively participating in the community forum and for the solutions you’ve been sharing in the community forum. Your contributions make a real difference.

I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions.

Best reagrds,
Harshitha.

Hi @Analitika,
I hope the above details help you fix the issue. If you still have any questions or need more help, feel free to reach out. We are always here to support you.


Regards,
Harshitha.

Hi @Analitika,

I wanted to follow up and see if you have had a chance to review the information that was shared. If you have any additional questions or need further clarification, please don’t hesitate to reach out. I am here to assist with any concerns you might have.

Regards,
Harshitha.

mdaatifraza5556
Super User
Super User

Hi @Analitika 

If i am not wrong.

I am assuming you have two measure sales1 and sales2.


1. Create a field parameter


Screenshot 2025-08-19 125147.png

 

Change the slicer into tile


2. Use the below dax for the result 

Selected Sales =
SWITCH(
    SELECTEDVALUE(Parameter[Parameter Order]),
    0, [Sales1],
    1, [Sales2]
)


Result

 


Screenshot 2025-08-19 130033.png

 


Screenshot 2025-08-19 130038.png

 

IF this answers your questions, kindly accept it as a solution and give kudos.

I am not using slicer but two buttons.

Hi @Analitika 

Can you please try the below steps.

1. Just Add two bookmark
       a. Sales1

       b. Sales2

 

Screenshot 2025-08-19 171134.png

 

2. Now Go to insert and select Bookmark navigator.

 

Screenshot 2025-08-19 171144.png

 

 

Here is your result.

 

Screenshot 2025-08-19 171211.png

 

Screenshot 2025-08-19 171217.png

 


You can adjust your background as per your preference using Format navigator


 

If this answers your questions, kindly accept it as a solution and give kudos.

rohit1991
Super User
Super User

Hi @Analitika 

Could you please follow below steps:

 

Add buttons

  • Insert >> Buttons >> Blank >> rename to Sale1_off (grey style).

  • Duplicate it >> rename to Sale1_on (give it your selected color, e.g., brown).

  • Do the same for Sale2 >>  Sale2_off (grey) and Sale2_on (brown).

  • Put the two “on” buttons exactly over the “off” ones (same position/size).

  • Go to view >> Bookmark >> Create 4 Bookmarks
  • Go to view >> selection >> Rename every button for easy understanding.

image.png

 

 

Selecitons:

  1. Go to View >>Selection.

  2. In the Bookmarks pane, select Sales 1 off.

  3. In the Selection pane, hide Sales 2 on and Sales 1 off (click the eye icons).

  4. Go back to the Bookmarks pane, right-click Sales 1 off.

  5. In the menu, uncheck Data (so only Display/Current page are ticked).

  6. Click Update.

 

image.png

 

2. For Sales 2 off

  1. Stay in View >> Selection.

  2. In Bookmarks pane, select Sales 2 off.

  3. In the Selection pane, hide Sales 1 on and Sales 2 off.

  4. Right-click Sales 2 off in the Bookmarks pane >> uncheck Data >> click Update.

image.png

 

Apply Action on Sales 1 off button

image.png

 

 

Apply Action on Sales 2 off button

image.png

 


Did it work? ✔ Give a Kudo • Mark as Solution – help others too!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.