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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
Employee
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
Employee
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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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