Forum Discussion
Highlight filter when filter is used
- Anonymous3 years ago
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.
Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
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)
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 🙂
- GeorgeVepkhvadz2 years agoHelper I
This is what I did as well, but there should definitely be simpler solution to this, then this workaround for the future.