March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi,
I have the following dax, I would like to colour the text green if it is above 0% and Red if it is a minus %
Solved! Go to Solution.
Hello @Fali324 ,
Please copy the DAX formula below, because in your formula you are using Format which converts the Percent value to text, so remove the Format and apply divide and go to "FX" option where you want to apply condtional formatting like "Title" or "values" and from there select "Field Value" and select the below formula.
If you find this helpful , please mark it as solution and Your Kudos are much appreciated!
Thank You
Dharmendar S
Hello @Fali324 ,
Please copy the DAX formula below, because in your formula you are using Format which converts the Percent value to text, so remove the Format and apply divide and go to "FX" option where you want to apply condtional formatting like "Title" or "values" and from there select "Field Value" and select the below formula.
If you find this helpful , please mark it as solution and Your Kudos are much appreciated!
Thank You
Dharmendar S
@Fali324 ,DAX itself does not support conditional formatting directly within the formula. However, you can achieve this in Power BI by using the conditional formatting options available in the visualization pane
var percentagedifferance =
FORMAT(
DIVIDE(contingencyremaining, contingencytotal), "Percent")
Add this measure to a table or matrix visualization in your Power BI report.
Click on the table or matrix visualization to select it.
In the Visualizations pane, go to the "Values" section where your measure is listed.
Click on the drop-down arrow next to your measure and select "Conditional formatting" > "Font color".
In the conditional formatting window, choose "Rules".
Set up the rules to format the text color based on the value:
For values greater than 0, set the font color to green.
For values less than or equal to 0, set the font color to red.
Proud to be a Super User! |
|
Thank you for your reply, I'm trying to use that measure as a title.
@Fali324 , Than you can use card with conditional formatting
https://www.youtube.com/watch?v=zVJuDQdKXHY - check this
Proud to be a Super User! |
|
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
89 | |
84 | |
70 | |
51 |
User | Count |
---|---|
206 | |
143 | |
97 | |
79 | |
68 |