Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
mcathcart
Contributor
Contributor

Indicator expression

This seems fairly basic, but I am struggling to find an answer.

In my table I have two columns of values and a third and fourth column that represents those values as a percentage overall. I simply want the percentage values to display with a +/Green or -/Red indicator based on whether the value is greater or less than the other. The percentages are based on a few other data sets so it's not as simple as setting the indicator limit at 50%. 

 

Is there an If statement such as If Value A > Value B then.....?

Any suggestions appreciated. 

3 Replies
rubenmarin1

Hi @mcathcart, yes, you can use If([Expr1Label]>[Expr2Label], Green(), LightRed()) or If([Expr1Label]>[Expr2Label], '+', '-').

Or just copy all the expression of each columna again If([CopyExpresion1]>[CopyExpresion2], '+', '-')

You can also use variables to store expressions and centralize management like if vExpression1 has the content "Sum(Value1)" and vExpression2 has stored "Sum(Value2)", at the end it will look like: If($(vExpresion1)>$(vExpresion2), '+', '-')

mcathcart
Contributor
Contributor
Author

When I use that expression, It displays all of the indicators identically whether they are bigger or smaller than the neighboring column. 

natkaqs
Contributor
Contributor

Hi  Mcathcart! I beleive you fond some solution. I had the same problem and was browsing through to find a solution. So i put as indicator expression a formula for the column to be compared with like =avg([Neighboring column]), and it worked for me