Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

nsnybs21qv
New Contributor III

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
Contributor III

Re: How to change gauge needle color dynamically in a mini chart

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

mike

nsnybs21qv
New Contributor III

Re: How to change gauge needle color dynamically in a mini chart

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

nsnybs21qv
New Contributor III

Re: How to change gauge needle color dynamically in a mini chart

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
Contributor III

Re: How to change gauge needle color dynamically in a mini chart

Hello Zixiao -

Do you have a sample app that you can upload?

mike

Not applicable

Re: How to change gauge needle color dynamically in a mini chart

Hi

I'm dealing with the same problem

did you find any solution ?