Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
manuprakash2019
Contributor
Contributor

KPI Color for 3 conditions : Issue with red color "-" hypen

Hi there, 

Please help me in figuring out the below issue.

RED HYPHEN '-' when no items selected on the filter

Scenario:

1) When no items selected on the filter, the KPI box should have Gray hyphen '-'.

2) If anyone of the items selected from the filter, based on the sign of the value, it should display either Red or Green colour.

i.e

for a value less than 0 it should be Red

and for a value greater than 0 it should be Green

and for no value, it should be Gray hypen -

 

Please see what I did so far.

Written condition on KPI Box :    if(GetSelectedCount(Campaigns)=0,'-',[B]-[A])

In conditional colour:

Written condition like this: =  if([B]-[A]<0,Red(),Green())

 

Please help me to fix Red hyphen issue here

 

 

 

 

 

 

 

 

Labels (2)
3 Replies
wandererroch
Contributor III
Contributor III

 

looks like it's doing a text compare instead of numeric.  try this:

 

if(GetSelectedCount(Campaigns)=0,gray(),if([B]-[A]<0,Red(),Green()))

manuprakash2019
Contributor
Contributor
Author

Thanks for the reply @wandererroch  but, still I couldn't see a grey hyphen. Instead I am getting 4,290,822,336.00

 

wandererroch
Contributor III
Contributor III

That's what you get when using the expression for your coloring?