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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.