Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.
Hello everyone, I have a measure created by subtracting two other measures, but I need it to be red when the result is negative, I am unaware of DAX, I have tried searching in google and in the forum but I cannot do it.
I have tried with selectedvalue, selectedmeasure, switch.....
I guess I have to write when I write the measure...
Hello @Luquiluk ,
You create a measure that says the following
Color= if( yourmeasure <0,"Red","Green")
then you add it to the conditional formatting of you measure, refer to this video to see how https://youtu.be/K-uhWhl9Grs?si=82NrHF8-8BnmVVnu
If I answered your question, please mark my post as solution, Appreciate your Kudos 👍
Follow me on Linkedin
Vote For my Idea💡
Proud to be a Super User! | |
sorry I have not explained correctly, I need the color of the number of that measure to be red if it is less than zero and black if it is greater.
I have the measure applied to several sheets and I would like the effect to occur on all of them at the same time
Hi @Luquiluk,
create a measure that sets the color for negative values.
Then on each visual, do a conditional formatting for the column you want to format,
select the field you just created.
Not sure if there is a way to change the color all at the same time across the report
I thought that the calculation could be formulated and the result could be formatted in whatever color one needed.
Example: Add sales from the previous year minus sales this year and if it is less, give me the result in red text format. --- if (CALCULATE([V]-[VLY])<0), format [RED] (it is an invention).......
To leave that conditional formatting for any report