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
Flappy8Flapjack
New Member

Highlight filter when filter is used

Dear reader,

 

Please help me out. In my dashboard I have various filter options (dropdowns). My end-user would like to have the filters highlighted when used, but I can not figure out how to solve this in the visual options. For example, my dropdown box is now lightgrey, but when selected/used i would like to make it a darker colour. In the section when you can wright down 'if/or --> then' it only selects som. But That is not a solution for me. I hope someone can help me out. Thanks in advance!

 

Kind regards,

 

Jochem

1 ACCEPTED SOLUTION
v-rzhou-msft
Community Support
Community Support

Hi @Flappy8Flapjack ,

 

As far as I know, Power BI only support us to filter the visuals by filter field or slicer. If you want to highlight your visual, I suggest you to create a visual (not slicer) and then use cross-highlight in Edit interactions option.

For reference:

Change how visuals interact in a Power BI report

Filters and highlighting in Power BI reports

Result is as below.

vrzhoumsft_0-1683793679965.png

 

Best Regards,
Rico Zhou

 

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

4 REPLIES 4
DAXStreetBoys
New Member

I had the same requirement recently. Googling uncovered that border/background colors of slicers cannot be conditioned on a measure.

My workaround was to place a rectangle around (and behind) the slicer (making it 100% transparent), and conditioning border color of said rectangle on a simple measure that checks if the slicer field is being used to filter - example below:

IF(ISFILTERED('Table'[SlicerColumn])=TRUE(),1,0).

 

If your slicer has multiple levels (3 for example), you can use IF(ISFILTERED('Table'[Column1])||ISFILTERED('Table'[Column1.1]||ISFILTERED('Table'[Column1.2]) = TRUE(),1,0) to check each one.

The condition I applied to the rectangle's border color was based on the output of the measure being 1 or 0 - either orange, or white/colorless respectively)

DAXStreetBoys_0-1715610462617.png
Pictured above - Slicer and conditionally formatted rectangle around dropdown

It's probably too late for your requirement. Took me a while to figure this out, so throwing it out there for posterity 🙂

 

 

This is what I did as well, but there should definitely be simpler solution to this, then this workaround for the future. 

GeorgeVepkhvadz
Frequent Visitor

Not sure why answer was accepted as solution, but question wasn't about higlighting the visuals, but about highlighting the slicers which are in use with different colour. 

v-rzhou-msft
Community Support
Community Support

Hi @Flappy8Flapjack ,

 

As far as I know, Power BI only support us to filter the visuals by filter field or slicer. If you want to highlight your visual, I suggest you to create a visual (not slicer) and then use cross-highlight in Edit interactions option.

For reference:

Change how visuals interact in a Power BI report

Filters and highlighting in Power BI reports

Result is as below.

vrzhoumsft_0-1683793679965.png

 

Best Regards,
Rico Zhou

 

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

 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.