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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
WZorn
Helper III
Helper III

Matrix Visual - Conditional Formatting Removed when Hierarchy Expanded

Is this expected or something I can work around?

 

I have setup a matrix in an income statement layout with a hierarchy for the rows.  I have setup cell conditinal formatting to highlight rows that provide totals.  The problem is that when the hierarchy is expanded to show the next level on ANY row all conditional formating on the top level rows goes away.

 

Before expansion:

WZorn_0-1757437444234.png

 

After Expansion

WZorn_1-1757437553446.png

 

1 ACCEPTED SOLUTION
WZorn
Helper III
Helper III

OK!  Here's the cause of the problem:  I had the "Appy to" option set to "Values only".  The solution is to set it to "Values and totals".

 

Right click on measure -> Conditional Formatting -> Background

WZorn_0-1757450686918.png

 

Here's my guess at the reason behind this.  With all items in the hierarchy collapsed each row shows values.  When you expand even one hierarchy row all rows (except the newly visible lower level) are now TOTALS.  The lower level that you just exposed shows values.

 

Hope this helps someone.

View solution in original post

3 REPLIES 3
WZorn
Helper III
Helper III

OK!  Here's the cause of the problem:  I had the "Appy to" option set to "Values only".  The solution is to set it to "Values and totals".

 

Right click on measure -> Conditional Formatting -> Background

WZorn_0-1757450686918.png

 

Here's my guess at the reason behind this.  With all items in the hierarchy collapsed each row shows values.  When you expand even one hierarchy row all rows (except the newly visible lower level) are now TOTALS.  The lower level that you just exposed shows values.

 

Hope this helps someone.

Greg_Deckler
Community Champion
Community Champion

@WZorn How are you doing the conditional formatting? Is it a measure or how is it configured?



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Hi, Greg

 

Yes, I'm using a measure.  A really simple one.  I have index numbers associated with each element of the hierarchy.  I also use them for sorting the row order.  I have a measure that compares the index to a static number (the line I want highlighted).  That measure returns the hex color code.  I'm using the cell background conditional formating set to Field Value and referencing the measure.

 

Row Highlighting = 
SWITCH(
MAX('IncState Line Items'[Measure Sort Order]),
3, "#93C2EC",
6, "#93C2EC",
8, "#93C2EC",
30, "#93C2EC",
36, "#93C2EC",
37, "#93C2EC"
)
 
I've placed my measure in the values section and I can see the correct code appearing where it is suppose to, but the cells on that row are not being formatted.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 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.