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: 
Not applicable

If statement to display arrow indicator

Hi guys,

I was just wondering if you could help me with this.

I have two variables:  1. Variable1 (current month score)

                                2. Variable2 (previous month score) , (both in % value)

I wanted to make a monthly comparison trend indicator using green and red arrows (from bundled images) in a text box. If score increases, green arrow pointing up. If score decreases, red arrow pointing down.

This is my text box code:

=if(Variable1-Variable2> 0 ,
'qmem://<bundled>/BuiltIn/arrow_n_g.png','qmem://<bundled>/BuiltIn/arrow_s_r.png')

BuiltIn/arrow_n_g.png - Green Up arrow

BuiltIn/arrow_s_r.png - Red down arrow


However, I always get a red arrow pointing down no matter what the trend is, even if i interchange values Can you tell me what i am doing wrong?

Regards,

Justin

1 Solution

Accepted Solutions
anlonghi2
Creator II
Creator II

Also you can try using this:

if( variable1 > variable2, ...,....)

regards

AL

View solution in original post

7 Replies
Not applicable
Author

try it like this

if((variable1-variable2)>0,...,...)

maybe the if statment just checks if variable2 > 0

regards,

MT

anlonghi2
Creator II
Creator II

Also you can try using this:

if( variable1 > variable2, ...,....)

regards

AL

Not applicable
Author

Well i tried it but it still shows red arrow pointing down for ALL values. Thanks though! Any further help would be appreciated.

Not applicable
Author

Yes! This seems to work and i just got it now. Thanks a lot AL!

prasadreddy
Contributor III
Contributor III

Hi all, it is working,

But I need to know how to resize the arrow indicator size in cell,

Because it is looking big,

Can any one help on this to reduce the indicator size...

Not applicable
Author

+225 03386502

Le Jeudi 23 janvier 2014 10h40, Prasadreddy <qcwebmaster@qlik.com> a écrit :

QlikCommunity

If statement to display arrow indicator

reply from Prasadreddy in New to QlikView - View the full discussion

anlonghi2
Creator II
Creator II

Hi Prasadreddy, you have to open the properties panel, go to the expession panel, select the expression and, finally, select "Keep Aspect" from the "Image formatting" combobox. Best regards AL