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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Jac1117
New Member

Why my Gauge color Dax doesn't work?

Hi,

 

I am writting Dax intending to make gauge color dynamic based on actual and budget number. Whenven actual number is larger than budget number, the gauge color turns green, otherwise, turns red.

 

here is what I wrote for DAX:

Vancouver Revenue from Loans = SWITCH(TRUE(),
[Vancouver Renvenue Actual YTD]<[Vancouver Renvenue Budget YTD],"Red","Green")
 
However, the result is showing opposite, where actual is 13.22M and budget/target number is 14.3M
Jac1117_1-1666810527075.png

 

Appreciate if someone can help me here. thank you!

3 REPLIES 3
amitchandak
Super User
Super User

@Jac1117 , I tried the color setting and it is working fro me

 

amitchandak_0-1666844224969.png

 

Try like

 

amitchandak_1-1666844260437.png

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

thanks for your reply. You tried the DAX i wrote above? it's so weird that it works on my other page but here. 

Hi Jac1117,

 

You can try this:

Measure_IF = IF( [Measure A] < [Measure B], "Red", "Green")

 

vyinliwmsft_0-1667280836076.png

 

vyinliwmsft_1-1667280836083.png

 

The result is:

vyinliwmsft_2-1667280836091.png

 

I also use your DAX code to test . It works good. Result is below:

Measure_switch = SWITCH(TRUE(), [Measure A] < [Measure B], "Red", "Green")

vyinliwmsft_3-1667280836099.png

 

vyinliwmsft_4-1667280836104.png

 

Is this what you expect?

Hope this helps you.

 

Best Regards,

Community Support Team _Yinliw

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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