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
dsj8wksnnckk
Resolver I
Resolver I

Slicer not functioning the same on two tables - weird bug

Hi all,

I have a page with the following visuals: Slicer, Table1, Table2

I have the main report containing that page (import version of all data).
When using the slicer in the main report - it works perfectly on both Table1 and Table2


Relationship between the slicer data and Table1 and Table2 IS THE SAME FOR BOTH.

But,

When I use the semantic model (directquery) for another report I have the followin issue:

Same page: Slicer, Table1, Table2 - everything works perfectly UNTIL I apply conditional formatting to any cell values for Table2: then the slicer doesnt slice out the data, but rather applies or doesnt apply the conditional formatting for the sliced rows.

This happens ONLY for Table2. Table1 is working perfectly.

I checked all the interactions - its set up correctly and same for Table1 and Table2 compared to the slicer.

I literally have NO IDEA why is this happening. 

2 ACCEPTED SOLUTIONS
rajendraongole1
Super User
Super User

Hi @dsj8wksnnckk - The issue arises because conditional formatting in DirectQuery mode generates additional queries that may not respect slicer filters. The best fix is to use measures for conditional formatting instead of applying it directly to columns, as measures are evaluated within the correct filter context.

Instead of applying conditional formatting directly to a column, use a measure to control the formatting logic. Measures are evaluated in the correct filter context.

ConditionalMeasure =
IF(SUM(Table2[Value]) > 100, "Highlight", "No Highlight")

 

 

Use this measure in the conditional formatting rules (e.g., background color).

If Table2 has relationships that are ambiguous or bidirectional, use the CROSSFILTER function to force the slicer context to apply correctly.

MeasureWithFilter =
CALCULATE(
SUM(Table2[Value]),
CROSSFILTER(SlicerTable[Key], Table2[Key], BOTH)
)





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





View solution in original post

Bibiano_Geraldo
Super User
Super User

Hi @dsj8wksnnckk ,
When conditional formatting is applied, Power BI sends additional queries to the underlying data source to evaluate the formatting rules. This can sometimes interfere with the behavior of filters or slicers, especially in DirectQuery, where query execution is dependent on the semantic model's configuration and the database's response. So If the conditional formatting is based on a measure, ensure the measure respects the slicer's filters.
For example:

MeasureForFormatting = 
CALCULATE(SUM('Table'[Column]), ALLSELECTED('Table'))

 

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @dsj8wksnnckk ,

 

Whether the advices given by rajendraongole1 and Bibiano_Geraldo have solved your confusion, if the problem has been solved you can mark the reply for the standard answer to help the other members find it more quickly. If not, please point it out.

 

Best Regards,

Neeko Tang

Bibiano_Geraldo
Super User
Super User

Hi @dsj8wksnnckk ,
When conditional formatting is applied, Power BI sends additional queries to the underlying data source to evaluate the formatting rules. This can sometimes interfere with the behavior of filters or slicers, especially in DirectQuery, where query execution is dependent on the semantic model's configuration and the database's response. So If the conditional formatting is based on a measure, ensure the measure respects the slicer's filters.
For example:

MeasureForFormatting = 
CALCULATE(SUM('Table'[Column]), ALLSELECTED('Table'))

 

rajendraongole1
Super User
Super User

Hi @dsj8wksnnckk - The issue arises because conditional formatting in DirectQuery mode generates additional queries that may not respect slicer filters. The best fix is to use measures for conditional formatting instead of applying it directly to columns, as measures are evaluated within the correct filter context.

Instead of applying conditional formatting directly to a column, use a measure to control the formatting logic. Measures are evaluated in the correct filter context.

ConditionalMeasure =
IF(SUM(Table2[Value]) > 100, "Highlight", "No Highlight")

 

 

Use this measure in the conditional formatting rules (e.g., background color).

If Table2 has relationships that are ambiguous or bidirectional, use the CROSSFILTER function to force the slicer context to apply correctly.

MeasureWithFilter =
CALCULATE(
SUM(Table2[Value]),
CROSSFILTER(SlicerTable[Key], Table2[Key], BOTH)
)





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





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.