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
mike_asplin
Helper V
Helper V

Button formatting for On Press doesnt stick

Hi. Have created a button and gone into button formatting and set the On press ofmrat to red on white and default as white on blue. 

 

If I Ctrl click on the button it flashes red on white, changes the action book mark, but then shows as the default white on blue. I was expecting it would show the red on white format as it had been clicked?

 

Maybe a better way to do this as have 2 bookmarked visuals one in £ and one in local ccy. I tried ot use a disconencted slicer, but doesnt seem you can connect slicers to bookmarks? Basically want 2 buttons or slicers so click one to show £ visual and clcik the other to show local ccy visual and relevant button to be highlighted. 

 

Is there an easy way to do this?

 

Thanks

1 ACCEPTED SOLUTION
dk_dk
Super User
Super User

Hi @mike_asplin 

There is a couple ways you can approach this.

First option:
Instead of having 2 separate visuals, have a single visual and have your slicer toggle the currency. You could do this with calculation groups (see this article) but an easy way would be to create a third measure (I assume you have one measure that shows your data in GBP and one in local currency) which would look something like this:

Slicer Reactive measure calc = 

IF(SELECTEDVALUE(<YOUR SLICER HERE>)=<CONDITION>,<GBP Measure>, <Local curr Measure>)

In the below example:

Slicer Reactive measure calc = 

IF(SELECTEDVALUE('Table'[Currency])="EUR","5 eur", "4 GBP")

dk_dk_0-1770050060295.png

dk_dk_1-1770050294476.png

and the visual updates without using any bookmarks.


Second option:

Instead of formatting the buttons, you can use blank buttons to drive the switch between the two states (and showing / hiding the respective visuals) and instead create 4 textbox visuals which you can format as you wish (one visual for each "selection" and one for each state - so you would have :

"GBP selected" - red on white, "GBP unselected" - white on blue, and a blank button with a bookmark action. All 3 of these on top of eachother. And the same for the Local currency. And you just need to set up the bookmarks so it also controls the visibility of the correct textboxes. For instance when you select the GBP button, it would make "GBP Selected" and "Local Currency unselected" visible, (along with your GBP based visual(s) in the report, while hiding the other textboxes. and vice versa if you select the Local currency button.


Hope this helps! Let me know if you have any questions!






Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





View solution in original post

3 REPLIES 3
mike_asplin
Helper V
Helper V

Brilliant thanks for advice.  Any advantage or time you would use one over the other or just personal preference?  Guess it just a choice of creating lots of extra measure or lots of extra buttons?   I went down option 2 and regretted it after discovering i needed ot do it on 6 pages so 6 sets of buttons and bookmarks. Answered my own question use measures if multiple pages, bookmarks if just 1 or 2 pages!!!

If I had just one page and one measure that is already calculated twice for different currencies (or other categoricals) I would do the second option because it is quicker to set up.

In your case I would invest some time into learning about calculation groups and/or field parameters, and build my report in a more scalable way (my first solution is kind of the barebones version of that, essentially dynamically choosing what measure to display). Say if you later end up with a 3rd currency, it will be much faster to include it in the logic than to set up more bookmarks and update all existing ones.




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





dk_dk
Super User
Super User

Hi @mike_asplin 

There is a couple ways you can approach this.

First option:
Instead of having 2 separate visuals, have a single visual and have your slicer toggle the currency. You could do this with calculation groups (see this article) but an easy way would be to create a third measure (I assume you have one measure that shows your data in GBP and one in local currency) which would look something like this:

Slicer Reactive measure calc = 

IF(SELECTEDVALUE(<YOUR SLICER HERE>)=<CONDITION>,<GBP Measure>, <Local curr Measure>)

In the below example:

Slicer Reactive measure calc = 

IF(SELECTEDVALUE('Table'[Currency])="EUR","5 eur", "4 GBP")

dk_dk_0-1770050060295.png

dk_dk_1-1770050294476.png

and the visual updates without using any bookmarks.


Second option:

Instead of formatting the buttons, you can use blank buttons to drive the switch between the two states (and showing / hiding the respective visuals) and instead create 4 textbox visuals which you can format as you wish (one visual for each "selection" and one for each state - so you would have :

"GBP selected" - red on white, "GBP unselected" - white on blue, and a blank button with a bookmark action. All 3 of these on top of eachother. And the same for the Local currency. And you just need to set up the bookmarks so it also controls the visibility of the correct textboxes. For instance when you select the GBP button, it would make "GBP Selected" and "Local Currency unselected" visible, (along with your GBP based visual(s) in the report, while hiding the other textboxes. and vice versa if you select the Local currency button.


Hope this helps! Let me know if you have any questions!






Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





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.

March Power BI Update Carousel

Power BI Community Update - March 2026

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