Qlik Community

Ask a Question

New to Qlik Sense

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

Welcome to our newly redesigned Qlik Community! Read our blog to learn about all the new updates: READ BLOG and REPORTED ISSUES
Showing results for 
Search instead for 
Did you mean: 

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

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.




Can you try like this?

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

Your expression looks OK to me.

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


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

and write your expression it will work

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.