Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext 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
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
Solved! Go to Solution.
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")
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!
Proud to be a Super User! | |
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.
Proud to be a 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")
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!
Proud to be a Super User! | |
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 46 | |
| 43 | |
| 39 | |
| 19 | |
| 15 |
| User | Count |
|---|---|
| 68 | |
| 65 | |
| 31 | |
| 28 | |
| 24 |