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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
scorbin-j
Helper I
Helper I

Conditional formatting on table visual based on slicer selection

I have a table visual with a column for employee names and several columns for area access I have slicers for each of those areas and I would like to be able to highlight/fill the column only when an item for that area has been selected. For example I have this table: 

NameWCGGGCGO
Eric SmithYRRNY
Jane DoeYYNY
Adam DunnN/ARRNY
Carol SmithNNYY

 

If I use the WC slicer and select "Y", I would the cells in that column to be highlighted like this: 

NameWCGGGCGO
Eric SmithYRRNY
Jane DoeYYNY

 

Is this possible to do? 

2 ACCEPTED SOLUTIONS
Deku
Super User
Super User

Yes. You would create a table for each slicer

 

wc =

Distinct( table[WC])

 

Then you would create a measure used for the conditional highlighting for that column

 

If(

selectedvalue( WC[WC]) = selectedvalue( table[WC], "#ff00ff" )

 

You would do this for each column


Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!

View solution in original post

Made this measure that seems to work better with multiple items selected in a slicer/slicers. 

    IF(
        ISFILTERED(WC[WC]) && COUNTROWS(
            INTERSECT(
                VALUES(WC[WC]),
                VALUES(table[WC])
            )
        ) > 0,
        "#color",
        "transparent"
    )

View solution in original post

4 REPLIES 4
Deku
Super User
Super User

Yes. You would create a table for each slicer

 

wc =

Distinct( table[WC])

 

Then you would create a measure used for the conditional highlighting for that column

 

If(

selectedvalue( WC[WC]) = selectedvalue( table[WC], "#ff00ff" )

 

You would do this for each column


Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!

Yes, that worked! Thank you

Made this measure that seems to work better with multiple items selected in a slicer/slicers. 

    IF(
        ISFILTERED(WC[WC]) && COUNTROWS(
            INTERSECT(
                VALUES(WC[WC]),
                VALUES(table[WC])
            )
        ) > 0,
        "#color",
        "transparent"
    )
lbendlin
Super User
Super User

You already get cell highlighting as part of the standard UX. Don't reinvent the wheel.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.