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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
AliceW
Impactful Individual
Impactful Individual

Not able to see the default fill of a button

Hello fellow users,

I am discovering buttons and so far I love them. I implemented two in order to create something similar to what's below.

Basically, you click one the 'Demography' button and it shows a bookmarked version of the tab; you click on the 'Area' button and it shows another bookmarked version of the tab.

While the switch between the views works fine, I can't get the 'selected' button to turn blue (its 'On Press' Fill). It stays its 'Default State' fill.

The 'Hover' fill works.

 

AliceW_0-1602255578164.png

 

Big thanks,

Alice

 

1 ACCEPTED SOLUTION
v-jingzhang
Community Support
Community Support

Hi @AliceW  

I think you have got the simplest solution currently by creating two buttons for each value. However, I found another solution which needs a few more steps as shown below:

1. Create a disconnected table Buttons containing all buttons' text and create an index column.

v-jingzhang_0-1602652802641.png

2. Create a measure to record which button is selected. I select Button A by default.

selected button = SELECTEDVALUE(Buttons[Index],1)

3. Add a slicer and put Index column in it.

v-jingzhang_1-1602652802646.png

4. Insert two blank buttons. For Button A, use conditional formatting to determine the color in default state. Apply the same steps to Button B and reverse the color rules for it.

10141.jpg

5. Now, add bookmarks as you like. For example, I create Bookmark 1 for Button A and Bookmark 2 for Button B. Remember to select 1 in the slicer and hide the slicer before adding Bookmark 1. Select 2 and hide the slicer before adding Bookmark 2.

Finally, turn on Action for both buttons with related bookmark. 

10142.gif

I found the solution from this link where you may get more ideas:  

https://powerbi.tips/2019/08/dynamic-visuals-using-buttons/

 

Best Regards,

Community Support Team _ Jing Zhang

If this post helps, please consider Accept it as the solution to help other members find it.

View solution in original post

2 REPLIES 2
v-jingzhang
Community Support
Community Support

Hi @AliceW  

I think you have got the simplest solution currently by creating two buttons for each value. However, I found another solution which needs a few more steps as shown below:

1. Create a disconnected table Buttons containing all buttons' text and create an index column.

v-jingzhang_0-1602652802641.png

2. Create a measure to record which button is selected. I select Button A by default.

selected button = SELECTEDVALUE(Buttons[Index],1)

3. Add a slicer and put Index column in it.

v-jingzhang_1-1602652802646.png

4. Insert two blank buttons. For Button A, use conditional formatting to determine the color in default state. Apply the same steps to Button B and reverse the color rules for it.

10141.jpg

5. Now, add bookmarks as you like. For example, I create Bookmark 1 for Button A and Bookmark 2 for Button B. Remember to select 1 in the slicer and hide the slicer before adding Bookmark 1. Select 2 and hide the slicer before adding Bookmark 2.

Finally, turn on Action for both buttons with related bookmark. 

10142.gif

I found the solution from this link where you may get more ideas:  

https://powerbi.tips/2019/08/dynamic-visuals-using-buttons/

 

Best Regards,

Community Support Team _ Jing Zhang

If this post helps, please consider Accept it as the solution to help other members find it.

AliceW
Impactful Individual
Impactful Individual

I figured something out: I create TWO buttons for each value. One will have the blue default, and another one the white. The bookmarks will hide one blue and one white.

Does anybody have a different solution?

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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