Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
Hi,
I hope you can assist me.
I have a gauge graph with two numbers that change every month, I want to do conditional formatting that if the first number is bigger by the second, the color of the graph will be green and if other, it will be red.
Do you have any idea how to do it?
Thank you,
Solved! Go to Solution.
Hi @Anonymous ,
You might consider creating a conditional format for each measure in the matrix, like this.
Measure 1 =
VAR _cur_month_value = [@Sales]
VAR _pre_month_value = CALCULATE([@Sales],DATEADD('Calendar'[Date],-1,MONTH))
VAR _color = IF(_cur_month_value>=_pre_month_value,"Green","Red")
RETURN
_color
Measure 2 =
VAR _cur_month_value = [@Profit]
VAR _pre_month_value = CALCULATE([@Profit],DATEADD('Calendar'[Date],-1,MONTH))
VAR _color = IF(_cur_month_value>=_pre_month_value,"Green","Red")
RETURN
_color
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
Hi @Anonymous ,
You might consider creating a conditional format for each measure in the matrix, like this.
Measure 1 =
VAR _cur_month_value = [@Sales]
VAR _pre_month_value = CALCULATE([@Sales],DATEADD('Calendar'[Date],-1,MONTH))
VAR _color = IF(_cur_month_value>=_pre_month_value,"Green","Red")
RETURN
_color
Measure 2 =
VAR _cur_month_value = [@Profit]
VAR _pre_month_value = CALCULATE([@Profit],DATEADD('Calendar'[Date],-1,MONTH))
VAR _color = IF(_cur_month_value>=_pre_month_value,"Green","Red")
RETURN
_color
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
Thank you! it worked!