Qlik Community

New to Qlik Sense

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

cancel
Showing results for 
Search instead for 
Did you mean: 
lamnaresh
Contributor II
Contributor II

Is it possible to do conditional image change in Qliksense

Hi All,

Is it possible to do conditional image change in Background color expression on Qliksense ?

EXample is below

Quarter, Amount

Q1, 20000

Q2, 30000

Q3, 10000

Q4, 15000

Based on above example i want to display if sum(Amount) <20000 then Down arrow mark else up arrow mark.

Thanks and regards,

Naresh

4 Replies
devarasu07
Master II
Master II

Hi,

Try to use like below, here  chr(9660) for up arrow and chr(9650)  for down arrow


if( Sum(Amount)<20000,  num(Sum(Amount),'$#,##0') & chr(9660) ,num(Sum(Amount),'$#,##0') & chr(9650)  )


and your measure text color expression as

if( Sum(Amount)<20000, red() ,Green() )

Capture.JPG

Thanks,

Deva

lamnaresh
Contributor II
Contributor II
Author

Hi Deva,

The above given example is working but i want to display traffic signals instead of up & down arrows. can you please tell me how to achieve this.

Thanks and regards,

Naresh.M

RiyaHegde
Contributor
Contributor

Can I display an image inside a text & image chart in Qliksense based on a condition.

for Eg : if country is selected as India in the filter then show India flag in the box else if country is selected as US in the filter then show US flag

Lemac
Contributor III
Contributor III

Well, what I did to get this working was using a custom background layer for a map.  Since the text & image chart doesn't let me do conditional images. 

I first added some icons to a new Content Library (in the QMC)

Then I created a map, I choose None as default background, and then add a custom background-layer for the map.

And the expression (in the URL-field!) I used in the custom background layer was this:

 

=if(FirstSortedValue(WcsColliAfkeur, -datumtijd)='2', '/content/Icons/Weegschaal_ondergewicht.png',
if(FirstSortedValue(WcsColliAfkeur, -datumtijd)='3', '/content/Icons/Weegschaal_overgewicht.png',
'/content/Default/Qlik_default_plant.png'))

 

It took some tweaking, but it worked.