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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Change Colors of Buttons with bookmarks

 

Hey all,

 

I using bookmarks to show different filters of data which works fine, but I am also trying to make it where the buttons I use are a different color when chosen. From the image below, I am trying to make Web:Web blue when it's on that bookmark and so on. I would think that I would change it to blue capture the bookmark and keep the other 2 grey but this is not working for me. Anyone have any suggestions or is this even possible?

 

Picture1.png

1 ACCEPTED SOLUTION

Hi @Anonymous ,

You could reference the thread to have a try. It is amazing to implement it by hiding and unhiding buttons.

bookmarks highlight.gif

Best Regards,

Xue Ding

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

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

14 REPLIES 14
dani123
Frequent Visitor

Hello, I had recently the same problem. I needed to create a selection bar and highlight the selected element. What I end up doing was to create a table with a row for each element in the selection bar.

For example if I have the elements "Element 1", "Element 2", "Element 3" then I would create the following table:

Element IDDescription
1Element 1
2Element 2
3Element 3

 

Then I created a hidden filter with the Element ID column. Then I created a bookmark for each element which when activated it would filter the particular element in the above table. So the bookmark "element_1" when activated would select only the row 1. 

I then created a measure which simply returns the selected row form the above table.

To highlight the element I set the text color to be a function, in particular a Rule that is based on the create measure and works as follows.
Rule for Element 1:

    - if value is 1 then "#0054A0"
Rule for Element 2:

    - if value is 2 then "#0054A0"

Rule for Element 3:

    - if value is 3 then "#0054A0"

 

Lastly I assign the bookmark to each element, so now when I click the element, only that element would change the color.

 

In this way there is no need to insert more than the required elements.

 

The following are some screenshoots of the process.

 

1. Create elements, table and filter

image.png

 

 

 

 

 

 

 

 

 

2. Create bookmarks

image.png

 

 

 

 

 

3. Create rules

image.png

 

 

 

 

 

 

 

 

 

 

image.png

 

 

 

 

 

 

 

 

 

4. Assign bookmarks

image.png

 

 

 

 

 

 

5. Test it

image.png

 

 

image.png

 

 

This worked for me! It's a pretty slick alternative to creating/hiding multiple buttons.

Anonymous
Not applicable

Old post but this one really helped me out. 

OneWithQuestion
Post Prodigy
Post Prodigy

I only found one post for this idea, and I agree it is a huge time sink to have to create multiple copies of bookmark buttons to hide and show them just to create what should be a state of "selected" or "active".

https://ideas.powerbi.com/ideas/idea/?ideaid=8445be8e-32d0-4619-a132-fbb3ed5959a8

 

Anonymous
Not applicable

Totall agree.   And do we really need to wait for thousands of votes to get Microsoft to recognize this feature is a no-brainer??  

yep...you should see the crap from 2016 that they still haven't touched... sigh

 

v-xuding-msft
Community Support
Community Support

Hi @Anonymous ,

You could try to add different background colors to implement highlight the bookmark buttons. I create a sample that you could reference to have a try.

set background colorset background colorIn Web:Web bookmarkIn Web:Web bookmarkIn Phone:Phone bookmarkIn Phone:Phone bookmark

If this can't help you, there is a similar thread that you can reference. Maybe the user can share you a sample.

 

Best Regards,

Xue Ding

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

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Thanks for the replies, does it matter that these bookmarks are on the same page?

 

I have tried the background change for the buttons and bookmarking, but the change in color is not being captured

If the colors aren't taking, you might just need to make sure you are updating your bookmarks. 

 

I think it would be easier to work with the fill option rather then the Background, as you can make the button glow when hovered over so that people know it's an option to click.

Anonymous
Not applicable

Thanks everyone, I figured something out. I used 2 blank buttons, 1 for the text and 1 for the highlighted color. I then used the selection pane to hide the highlighted button colors.

Hi @Anonymous ,

Please accept the helpful replies as solutions. Then we are able to close the thread. Others who hava the same requiremnt will find the solutions quickly. They will benefit from here.

 

Best Regards,

Xue Ding

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

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @Anonymous ,

You could reference the thread to have a try. It is amazing to implement it by hiding and unhiding buttons.

bookmarks highlight.gif

Best Regards,

Xue Ding

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

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
TCarrasquillo
Helper II
Helper II

There are a couple of different options for what you are looking for, I think. 
When you click on the button go to the visualizations pane then expand the gill option and there is another drop down for the state so you can pick different colors for Default, hover and press.

Capture.PNG

 

There are also options for outlineing the button as well .

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.