Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to change gauge needle color dynamically in a mini chart

Ideally I want the color of the needle to be red when the "vs Bud%" is negative and green when its positive. I did use calculated color for the needle. Not sure why it stays the same color for all three regions. Can someone help?

Thanks

Capture.PNG

Capture.PNG

5 Replies
mikecrengland
Creator III
Creator III

What did your expression look like? Did you use AGGR? Something like aggr(sum(sales),vsBud%)

mike

Anonymous
Not applicable
Author

Thanks Mike.

My expression for the mini gauge column looks like this: =sum({<Scenario={'Act'},Region=>}Amount)/sum({<Scenario={'Bud'},Region=>}Amount)-1

The expression for the color is this: if (sum({<Scenario={'Act'},Region=>}Amount)>sum({<Scenario={'Bud'},Region=>}Amount),RGB(98,172,30),RGB(239,37,38))

I didn't use Aggr. How do I add it?

Thanks

Anonymous
Not applicable
Author

Hey Mike,

I saw you offered some suggestions for this post. Would you be able to help me modify the expression so I can get my Gauge chart right?

Thanks!!

Zixiao

mikecrengland
Creator III
Creator III

Hello Zixiao -

Do you have a sample app that you can upload?

mike

Not applicable
Author

Hi

I'm dealing with the same problem

did you find any solution ?