Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

paulyeo11
Not applicable

In KPI gauge chart one is increase in +ve. Another is also increase in -ve. How to make it both now display in Green zone ?

HI All

my gauge chart ve display 2 set of data :-

Case 1

100 increase to 110 as +10 % increase

Case 2

-100 increase to -110 as +10 % increase

How to make it for case 1 display in green zone .  For case 2 display in red zone ? ( Since case 2 is lost money )

Now both display in Green zone. Which is wrong.

Paul

8 Replies
hirishv7
Not applicable

Re: In KPI gauge chart one is increase in +ve. Another is also increase in -ve. How to make it both now display in Green zone ?

Hi,

Check the attachments,

Is that what you desired. !

“Aspire to Inspire before we Expire!”
MarcoWedel
Not applicable

Re: In KPI gauge chart one is increase in +ve. Another is also increase in -ve. How to make it both now display in Green zone ?

Please post example data/app.

Regards

Marco

MK_QSL
Not applicable

Re: In KPI gauge chart one is increase in +ve. Another is also increase in -ve. How to make it both now display in Green zone ?

100 to 110

=(110-100)/100

= 10/100

=10%

-110 to -100

=(-100-(-110))/(-110)

=(-100+110)/(-110)

=10/(-110)

=-9%

Let me know if I am wrong !

paulyeo11
Not applicable

Re: In KPI gauge chart one is increase in +ve. Another is also increase in -ve. How to make it both now display in Green zone ?

Hi manish

Yes you are correct.

It is possible to add condition in expression ,in case both value are -ve then compute result will be set -ve.

Paul

Sent from my iPhone

MK_QSL
Not applicable

Re: In KPI gauge chart one is increase in +ve. Another is also increase in -ve. How to make it both now display in Green zone ?

like this?

maxgro
Not applicable

Re: In KPI gauge chart one is increase in +ve. Another is also increase in -ve. How to make it both now display in Green zone ?

100 increase to 110 as +10 % increase

fabs(110-100) / 100                      --> 10%

(110-100) / fabs(100)                      --> 10%

-100 increase to -110 as +10 % increase

I'm not sure in this case you have a +10%. May be a -10%?

I think the sign should be the abs of numerator   denominator

fabs((-110)-(-100)) / (-100)          --> -10%

((-110)-(-100)) / fabs(-100)          --> -10%



paulyeo11
Not applicable

Re: In KPI gauge chart one is increase in +ve. Another is also increase in -ve. How to make it both now display in Green zone ?

Hi All

Thank you for your sharing,

Enclosed my QV Doc.

Paul !

paulyeo11
Not applicable

Re: In KPI gauge chart one is increase in +ve. Another is also increase in -ve. How to make it both now display in Green zone ?

Hi All

Many thank , it is possible to apply your answer into my QV doc ?

As i have try both solution with file attachment , i cannot figure out how to apply.

Paul