Qlik Community

Ask a Question

New to QlikView

If you’re new to QlikView, start with this Discussion Board and get up-to-speed quickly.

Announcements
Do More with Qlik - for Beginners and Beyond, Topic: Qlik Replicate on January 21, 2PM EST. REGISTER 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
Creator II
Creator II

Also you can try using this:

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

regards

AL

View solution in original post

7 Replies
Not applicable

try it like this

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

maybe the if statment just checks if variable2 > 0

regards,

MT

Creator II
Creator II

Also you can try using this:

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

regards

AL

View solution in original post

Not applicable

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

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

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

+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

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