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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Shamatix
Post Partisan
Post Partisan

Advanced Conditional Formatting / Calculations

Hi there,

 

So I have received a task I find somewhat impossible and would love some help.

I have a matrix looking like this: 

Shamatix_0-1631179038786.png

 

Expanded:

Shamatix_1-1631179047319.png

What I want to achieve is the following:

1. I dont want any numbers in the "Exceeds" column to be red in the "Category 1", even if they exceed.

2. I want numbers in Category2 to be red if they exceed.

3. I want the "Total number" in the customer row, to be red if the total amount of all the rows exceeds the expected (including the category1 numbers)

 

Right now as you can see the exceeds number is red on the "Customer" row, I only want that number to be red if a row in "Category2" exceeds the expected OR the TOTAL sum of all the numbers exceeds the TOTAL expected sum.

 

EDIT:

I made the following in Excel, hopefully it makes more sense what I want to achieve.

There is 4 examples here, I dont mind if the column "Exceeds Expected" says 0, is blank or has a number under "Category1", main thing is it doesnt become red and is still included in the total (customer) row

Shamatix_0-1631181005713.png

 

I hope the above made sense.

 

 

1 ACCEPTED SOLUTION

Hi @Shamatix ,

 

According to my understanding, HASONEFILTER can be used to specify the result displayed by subtotal and change the color in the latest version of the desktop, and the conditional formatting function cannot be used for row subtotal.

Matrix: conditional formatting on subtotal rows - Microsoft Power BI Community


You can also post your idea here. If there are too many votes, Microsoft will officially add this feature in the next update. Hope to help you.


Best Regards,
Henry


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
v-henryk-mstf
Community Support
Community Support

Hi @Shamatix ,

 

According to your description, you can create a measure, apply it to "Conditional Formatting", and then set subtotal to red. The reference is as follows:

Measure = IF(MAX('Table'[Category])="Category1","black","red")

vhenrykmstf_0-1631499854394.pngvhenrykmstf_1-1631499877516.pngvhenrykmstf_2-1631499906079.png


If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.


Best Regards,
Henry


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

Hi there,

 

Thanks a ton for your answer, however there is a slight misunderstanding I think.

I have added a customer column to your pbix file, but for some reason I cant attach a pbix file in this reply? How did you manage?

Can you do the Category1 "header" black numbers as well? The subitems are great, however the Category1 header is still red?

Shamatix_1-1631517683738.png

 

I have attached an updated pbix file.

The change I did to your data:

Shamatix_0-1631517476554.png

 

Best regards

 

 

 

Hi @Shamatix ,

 

Do you mean that Category1 header is still black? 

 

Check the screenshot below, you can attach the pbix file you provided.

vhenrykmstf_0-1631517946625.png


Best Regards,
Henry

 

Sorry I cant find that button.

Sadly I still havnt found a way to make the header of category 1 black aswell :S

Shamatix_0-1631690101338.png

 

Hi @Shamatix ,

 

According to my understanding, HASONEFILTER can be used to specify the result displayed by subtotal and change the color in the latest version of the desktop, and the conditional formatting function cannot be used for row subtotal.

Matrix: conditional formatting on subtotal rows - Microsoft Power BI Community


You can also post your idea here. If there are too many votes, Microsoft will officially add this feature in the next update. Hope to help you.


Best Regards,
Henry


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

Hi there,

 

No. 

The Category1 numbers are red, eventho the numbers are black.

I want the numbers in the category one to also be black 

Shamatix_0-1631518187781.png

The numbers: 14951, 14400, 551 are all red in your pbix file, those I want black (only one Category1) just like it's subitems are black 🙂 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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