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

Is it possible to use Set Analysis inside IF condition

I would like to use a Set Analysis inside IF condition, however, it does not work.

sum( {<  [STATE] ={ 'AK'}> }    my_value), this expression with Set Analysis works.

However, after I put it inside the following IF condition in the map expression part, it does not work any more.

if ( sum( {<  [STATE] ={ 'AK'}> }    my_value) > 0.3, red(), blue()  )

Any suggestion is appreciated!

5 Replies
Anonymous
Not applicable
Author

Hi Haikuo,

The above condition will work. .

if you want to display background color give the expression at background color part. If you want to display text color give the expression in Text Color part.

Color.PNG

yasmeenk
Partner - Creator
Partner - Creator

Hi,

Can you try like this?

=if(STATE='AK' and SUM(my_value)>0.03,Red(),Blue())

jonathandienst
Partner - Champion III
Partner - Champion III

Your expression looks OK to me.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
khalander
Creator II
Creator II

Hi,

if you want change the background color then click on + button in the expression tab

and write your expression it will work

Silambarasan1306
Creator III
Creator III

Hi datalakeyu

Your Expression looks good only,

It will work. You can use set analysis inside the if condition.

If you can't do it. Share the sample file.