Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Announcements
Register for Events and Webinars directly from Qlik Community: http://bit.ly/2Vpnenx
Highlighted
Not applicable

Setting image on certain condition

Hi Experts..

I want to set the image which should be change based on certain condition..

I  have calculated growth in my application and when growth is greater than 0 then it should display upword Arrow image and

if growth is less than 0 it should display downward Arrow image.

How should i do this?

My expression is:

=If(Num(((MTDGrowth-PreviousMTDGrowth)/PreviousMTDGrowth),'#,#00%')>=0,'qmem://<bundled>/BuiltIn/arrow_n_g.png','qmem://<bundled>/BuiltIn/arrow_s_r.png')

I have tried this expression but im not able to get image it returns the string in 'if' condition that  i have wrote..

Plzz help me

Thanks in advance.

1 Solution

Accepted Solutions
Highlighted
Partner
Partner

Re: Setting image on certain condition

Set it here instead and you get:

HTH Andy

View solution in original post

10 Replies
Highlighted
preminqlik
Valued Contributor II

Re: Setting image on certain condition

go to chart properties >> Expressions tab >>> select expression >> and in display options >> select representation as "Image"

Highlighted

Re: Setting image on certain condition

Hi,

Your expression looks ok for me.

Can you post screen shot of it.

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Highlighted
sushil353
Honored Contributor II

Re: Setting image on certain condition

Hi,

Try below code:

=If(((MTDGrowth-PreviousMTDGrowth)/PreviousMTDGrowth>=0,'qmem://<bundled>/BuiltIn/arrow_n_g.png','qmem://<bundled>/BuiltIn/arrow_s_r.png')

HTH

Sushil

Highlighted
satishkurra
Valued Contributor II

Re: Setting image on certain condition

Hi

Please use the below code in Expressions Tab of chart

Num(Sum(Sales)/Sum(Target)-1, '▲ 0.0%;▼ 0.0%')

Also write the below code for Back  Ground color as

If(Sum(Sales) > 0, '▲ 0.0%;▼ 0.0%')

Thanks

Satish

Highlighted
Not applicable

Re: Setting image on certain condition

Thanks satish

But instead of that arrow which you have placed in expression i want image  ..

if growth >0 it should be green upword arrow else red downward arrow image..

Highlighted
Partner
Partner

Re: Setting image on certain condition

HI,

if the image path etc is displaying as text, then change the representation to IMAGE on the EXPRESSI)N tab:

HTH

Andy

Highlighted
Not applicable

Re: Setting image on certain condition

But i want to display in text object only.

Highlighted
Partner
Partner

Re: Setting image on certain condition

Set it here instead and you get:

HTH Andy

View solution in original post

Highlighted
Not applicable

Re: Setting image on certain condition

Thank you.. its working