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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
m4xon
Helper III
Helper III

Highlighting row in table based on slicer, on a page where the slicer is used by other visuals

Hi, I need your help with the following problem. I would like the table to highlight the row that is selected on the slicer 9instead of filtering). So far I have done this by using a separate, disconnected table for the slicer, but in the current project I have a different situation. Specifically, I have several visualisations on the page that use one slicer, so I can't replace one that will be used for the table (from separate, disconnected table) or should I link it somehow so that it works with the other visualisations?

Thank you in advance,

Max

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @m4xon ,

First of all, many thanks to @Gabriele_hbto  for your very quick and effective replies, and I will give some additions below:

1.Create the simple table.

vjiewumsft_0-1710315260400.png

2.Create the table for slicer.

vjiewumsft_1-1710315267833.png

3.Drag the slicer table currency field into the slicer visual.

vjiewumsft_2-1710315275303.png

4.Create the new measure to filter.

 

conditional format = 
var _sel = SELECTEDVALUE('Slicer Table'[Currency])
return
IF(MIN('Table'[Currency]) =_sel,"Yellow")

 

5.Select the currency and rate field conditional formatting > background color. Choose Field value and select measure.

vjiewumsft_3-1710315303111.png

6.Select currency in the slicer visual.

vjiewumsft_4-1710315310334.png

7.Create a new measure for the other visual.

 

Other_visual_Measure = 
VAR v_slt = SELECTEDVALUE('Slicer Table'[Currency])
RETURN
IF(MIN('Table'[Currency]) = v_slt, 1, 0)

 

8.Drag the measure into the visual filter pane. Edit the show items is 1.

vjiewumsft_5-1710315360533.png

9.When select the slicer, it works with the other visual. The result is shown below.

vjiewumsft_6-1710315374579.png

Best Regards,

Wisdom Wu

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

5 REPLIES 5
Anonymous
Not applicable

Hi @m4xon ,

First of all, many thanks to @Gabriele_hbto  for your very quick and effective replies, and I will give some additions below:

1.Create the simple table.

vjiewumsft_0-1710315260400.png

2.Create the table for slicer.

vjiewumsft_1-1710315267833.png

3.Drag the slicer table currency field into the slicer visual.

vjiewumsft_2-1710315275303.png

4.Create the new measure to filter.

 

conditional format = 
var _sel = SELECTEDVALUE('Slicer Table'[Currency])
return
IF(MIN('Table'[Currency]) =_sel,"Yellow")

 

5.Select the currency and rate field conditional formatting > background color. Choose Field value and select measure.

vjiewumsft_3-1710315303111.png

6.Select currency in the slicer visual.

vjiewumsft_4-1710315310334.png

7.Create a new measure for the other visual.

 

Other_visual_Measure = 
VAR v_slt = SELECTEDVALUE('Slicer Table'[Currency])
RETURN
IF(MIN('Table'[Currency]) = v_slt, 1, 0)

 

8.Drag the measure into the visual filter pane. Edit the show items is 1.

vjiewumsft_5-1710315360533.png

9.When select the slicer, it works with the other visual. The result is shown below.

vjiewumsft_6-1710315374579.png

Best Regards,

Wisdom Wu

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

 

 

 

 

 

 

 

Hi @Anonymous,

May you advise if this could be done simplier?

Highlighting Row =
VAR _count =
    COUNTROWS ( VALUES ( '_dimAREAs Filter' ) )
VAR _single =
    SELECTEDVALUE ( '_dimAREAs Filter'[Key] )
VAR _multi =
    VALUES ( '_dimAREAs Filter'[Key] )
VAR _res =
    IF (
        ISFILTERED ( '_dimAREAs Filter' ),
        IF (
            _count > 1,
            IF ( MIN ( '_dimF'[AreaID] ) IN _multi, "#ffe6a0", BLANK () ),
            IF ( MIN ( '_dimF'[AreaID] ) = _single, "#ffe6a0", BLANK () )
        ),
        IF ( MIN ( '_dimF'[AreaID] ) = _single, "#ffe6a0", BLANK () )
    )
RETURN
    _res
 
this is related to the selection of one or more rows, I had to implement ISFILTERED, so that when nothing is selected it does not colour all the rows, but I wonder if it can be simplified?
 
Thank you!

I think I have solved my problem by using the VALUES instead of SELECTEDVALUE and IN operator instead of =

Now everything is working like a charm.

 

Thank you for your guidance!

Hello @Anonymous,
Firstly, thank you for your quick response highlighting works perfectly, but I have to change the measures I use in the other visualisations and instead of in the filter I have to do something like: 

VAR _sel = SELECTEDVALUE ( '_dimAREAs Filter'[Key] )
VAR _s = CALCULATE( SUM ( _dimPI[Baseline] ), '_dimPI'[AREA_ID] = _sel )
 
But I see other problem, what to do when no value is selected, then I would like it to show the total value?

 

Gabriele_hbto
Helper II
Helper II

Hello,

if you need to change the behavior of a filter you can click on "Edit interaction" then select the filter and chose the type of behavior you want to apply, like switch from filtering to highlighting. Here you can see the documentation: Change how visuals interact in a report - Power BI | Microsoft Learn

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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