Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
sspawar88
Creator II
Creator II

Background Color Expression

Hi,

Suppose My set analysis expression is too large. it contains Too many conditions. i could not able to plot Color() in Expression.


and Result of all expression is in Between 1 to 100.



How Can I get following without using whole Expression in 'Background Color Expression'

a) <51--> Red(),

b)Between 51 to 70--> Yellow(),

c) >71--> Green()





New to Qlik Sense

Background color and Set Analysis

Qlik Sense Resource Library

App Development


                 

9 Replies
rubenmarin

Hi Satish, you can use expression name in BgColor expression, if your expression caption is 'Expr1', you can use:

If(Expr1<51, Red(),

If(Expr1>71, Green(), Yellow()))

sunny_talwar

Not sure how it works in Qlik Sense, but in QlikView you can use the Label of the expression to achieve what you are aiming for:

For example if the label of your expression is TotalSales, then you can use the following for 'Background Color Expression'

If(TotalSales < 51, Red(), If(TotalSales < 70, Yellow(), Green()))

I would think that Qlik Sense should allow for the use of expression label or Column() function.

HTH

Best,

Sunny

sspawar88
Creator II
Creator II
Author

Hi Ruben,

My Expression label is %Compliance...But its not working in Background color Expression.


My expression result is in 34%, 48%

i used following expression

If(%Compliance < 51, Red(),

If(%Compliance > 71, Green(), Yellow()))


also


If(%Compliance < 51%, Red(),

If(%Compliance > 71%, Green(), Yellow()))



But its not working



rubenmarin

Whoops, I didn't see this was for Sense, I gave a QlikView answer, not a Sense answer.

Just to be sure if this works on Sense, can you try?:

If([%Compliance] < 51, Red(),

If([%Compliance] > 71, Green(), Yellow()))

rubenmarin

Already tried in Sense and works with column label, the '%' should be messing with the interpretation of Column label

sunny_talwar

May be use Column() function if label is tricky although the square brackets should fix it

sspawar88
Creator II
Creator II
Author

No its not working.

can you have any other Solution?

sspawar88
Creator II
Creator II
Author

Can you please explain it how to use Column() here in my scenario?

rubenmarin

Hi Satish, I made a sample with Sense using the same column label and it's working, please check attachment and tell us what's different in your document or if there is something I missunderstood.