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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
aslan
Helper I
Helper I

Matrix Conditional Formatting

I want to give red color background if total value is greater than 10. And if less than 10 is should be green. But there is no option. Do you know any way?

15 REPLIES 15
imranabdu
Frequent Visitor

 Hi there, 

 

how do I return zero(0) when the field value is empty using the following DAX function (Divide).

 

Avg. Sales = Divide([total sales] , [total transactions])

 

Thank you,

Imran

@imranabdu,

 

Try:

Avg. Sales = Divide([total sales] , [total transactions], 0)

Thank you this actually works.

reh169
Helper IV
Helper IV

I created a table and then tried as a Matrix in Power BI Desktop and the conditional formatting is not an option for me. See picture below.  What am I not doing? I even downloaded a new Power BI Desktop to get any updates I might be missing and then restarted the computer.  Thanks!

 

baddebt2.PNG  baddebt.PNG

@reh169 It's because your column is set to "Don't Summarize" if you summarize it you will get Conditional Formatting. Maybe something worth suggesting as a change in Power BI 

@reh169It can be depend your system. You tried uninstall and reinstall? I have downloaded latest version but still there is no paramater(dynamic) option for conditional formatting.

I did not uninstall and reinstall, is that what is needed to get the upgrades from each release?

don't think so. It was working in my previos release and after i upgraded it is also working. So i thought it can be realate with your system so remove and install back may work or you can wait for other experts comment. They may have different approach.

v-huizhn-msft
Microsoft Employee
Microsoft Employee

Hi @aslan,

As @Phil_Seamark posted, I try to reproduce your scenario using the sample matrix.

1.PNG

Right click the value level->select Conditional Formatting.

3.png2.PNG

You will get expected result.

5.PNG

 

If you have other issues, please let me know.

Best Regards,
Angelia

Is it possible to define Number value by variables instead of direct input?

Hi @aslan,

Up to now, we are unable to create a variable to control the color.

Best Regards,
Angelia

@v-huizhn-msft

When will this be possible? I would also like to see this function! Also, is there a work around atm? A calculation like: value1 minus value2 would give a positive or negative result which you can make condional formatting on (>0 green, <0 red). How can I do this the easiest way when I want to make that calculation on 1 metric but from 2 dimensions. 

I've made an example of what I want (see photo).

I want to calculate the difference between my expectation and my target for 1 metric. If I can make this calculation, I can make the conditional formatting, I guess.Example Chart.png

 

 

 

 

 

Hi @denzelg2g,

For your requriement, it's unable to achieve in PowerBI desktop now. You can post the request here.

Best Regards,
Angelia

Phil_Seamark
Microsoft Employee
Microsoft Employee

On the conditional formatting options for your measure on the matrix,  Specify the Minimum and Maximum as Numbers and try these values.

 

Let us know how you get on.

 

 

 

Conditional Formatting.png  


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

Hi @Phil_Seamark,

Is it possible to do conditional formating for row sub-totals?

Thanks.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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

October NL Carousel

Fabric Community Update - October 2024

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