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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
Oonizuk
Regular Visitor

Highlight slicer buttons instead of filter

Hello,

 

I've got a table that look like

UNFTTG
UN1A1
UN1B2
UN1C3
UN1D4
UN2A5
UN2E6
UN2B7
UN3D8
UN4B9
UN4C10
UN4D11
UN4A12
UN4B13

 

and I would like to filter values of "FT" & "TG" columns with slicers but I do not achieve to get what i would like...

 

here the result I got

 

Oonizuk_1-1736515035226.png

 

and here the result as I expected : i would like to always keep the full unique values of "FT" column and highlight the value linked to "UN 2"

 

Oonizuk_2-1736515219705.png

is there a solution to do that please?

Thanks

Oonizuk

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi, @Oonizuk 

As Bibiano_Geraldo demonstrated, he uses the UN column at the * end to create a slicer. This is mainly due to the fact that the table on the * side will not filter the data on the first side, so as to achieve highlighting.
You describe to your yet another un table to connect to your fact table:

vjianpengmsft_0-1736823334130.png

When creating a slicer using a UN table, we select an item that directly filters the data from the fact table.
To solve this problem, you should circumvent slicer filtering as demonstrated by Bibiano_Geraldo. Or you can set up two table relationship ports (or you can create another UN table that is not related):

vjianpengmsft_1-1736823514619.png

Measure = 
VAR _un= SELECTEDVALUE(Table2[UN])
VAR _FT = SELECTCOLUMNS(FILTER(ALLSELECTED(Table1),'Table1'[UN] = _un),'Table1'[FT])
RETURN IF(SELECTEDVALUE(Table1[FT]) IN _FT,1,0)

Here are the results:

vjianpengmsft_2-1736823632073.png

vjianpengmsft_3-1736823641510.png

Best Regards

Jianpeng Li

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

6 REPLIES 6
Anonymous
Not applicable

Hi, @Oonizuk 

I wish you all the best. Previously we have provided a solution to help you solve the problem. Since we haven't heard back from you yet, I'd like to confirm if you've successfully resolved this issue or if you need further help?
If yes, you are welcome to share your workaround and mark it as a solution so that other users can benefit as well. If you find a reply particularly helpful to you, you can also mark it as a solution.
If you still have any questions or need more support, please feel free to let us know. We are more than happy to continue to help you.
Thank you for your patience and look forward to hearing from you.

 

 

Best Regards

Jianpeng Li

Anonymous
Not applicable

Hi, @Oonizuk 

I wish you all the best. Previously Bibiano_Geraldo have provided a solution to help you solve the problem. Since we haven't heard back from you yet, I'd like to confirm if you've successfully resolved this issue or if you need further help?
If yes, you are welcome to share your workaround and mark it as a solution so that other users can benefit as well. If you find a reply particularly helpful to you, you can also mark it as a solution.
If you still have any questions or need more support, please feel free to let us know. We are more than happy to continue to help you.
Thank you for your patience and look forward to hearing from you.

 

 

Best Regards

Jianpeng Li

Hello,

 

Sorry for the delay but the question is for work so on my working week 😉

I checked the solution and it was I expected

 

But on my real board i've got a previous table like

UN
UN1
UN2
UN3
UN4

 

linked to the example I gave you and I did not find the solution to et the same results

I tried to create a new measure on this table but all button are either all orange eiher all white...

 

Thanks

 

 

Anonymous
Not applicable

Hi, @Oonizuk 

As Bibiano_Geraldo demonstrated, he uses the UN column at the * end to create a slicer. This is mainly due to the fact that the table on the * side will not filter the data on the first side, so as to achieve highlighting.
You describe to your yet another un table to connect to your fact table:

vjianpengmsft_0-1736823334130.png

When creating a slicer using a UN table, we select an item that directly filters the data from the fact table.
To solve this problem, you should circumvent slicer filtering as demonstrated by Bibiano_Geraldo. Or you can set up two table relationship ports (or you can create another UN table that is not related):

vjianpengmsft_1-1736823514619.png

Measure = 
VAR _un= SELECTEDVALUE(Table2[UN])
VAR _FT = SELECTCOLUMNS(FILTER(ALLSELECTED(Table1),'Table1'[UN] = _un),'Table1'[FT])
RETURN IF(SELECTEDVALUE(Table1[FT]) IN _FT,1,0)

Here are the results:

vjianpengmsft_2-1736823632073.png

vjianpengmsft_3-1736823641510.png

Best Regards

Jianpeng Li

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

 

 

 

Bibiano_Geraldo
Super User
Super User

Hi @Oonizuk ,

To achieve your result, please consider to follow these steps:

1- Create a new calculated column to get DISTINCT FT from your Table:

FT Table = DISTINCT('Table'[FT])

 

2- Create a relationship from FT table to Table with yhis properties:

Bibiano_Geraldo_0-1736518120352.png

 

3- Create a new measure with this DAX:

Measure = 
IF(
    HASONEFILTER('Table'[UN]),
    IF(
        NOT ISBLANK(SELECTEDVALUE('Table'[UN])),
        1,
        0
    )
)

 

4- Add two tile slicers in your report, one for UN column from your table and other for FT column from FT table:

Bibiano_Geraldo_1-1736518265296.png

 

5- Now Select your FT slicer and go to format pane, expand Buttons and then expand the fill, and in color click on FX:

Bibiano_Geraldo_2-1736518458986.png

 

6- In the new window, in format style choose rules, and the field to based on choose the created measure, and in the rules set as shown bellow, and click ok:

Bibiano_Geraldo_3-1736518601816.png

 

Now your final output should look like this:

ezgif-3-54c04c4b66.gif

Here you can download the sample file: Highlight slicer buttons instead of filter 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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