Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

abhaysingh
Contributor III

how to change color using condition Dynamically

Hi All,

Can i set condition like if(sales>100,Red(),Green()) in Qliksense..

i tried but not working..

Thanks

Abhay

4 Replies
MVP
MVP

Re: how to change color using condition Dynamically

Can you try with:

If( Sum(sales) > 100 , Red() , Green() )

abhaysingh
Contributor III

Re: how to change color using condition Dynamically

Hi peter,

yes same way i tried..sry not mentioned full Exp..

if(Sum(Quantity*unitPrice) > 10000000, Green(), red())

Sum(Quantity*unitPrice)= 14.22 million approx


thanks

Not applicable

Re: how to change color using condition Dynamically

Hi,


The expression seems to be ok, maybe a format issue...


Can you try with these expressions in order to better target the problem :

A/ if(Sum(Quantity) > ..., Green(), red())

B/ if(Sum(unitPrice) > ..., Green(), red())

ogster1974
Honored Contributor II

Re: how to change color using condition Dynamically

No reason why what your trying to do wouldn't work in Qlik Sense.  Perhaps if you uploaded a screen shot of table or chart you are trying to conditionally colour we can better assist.

Also when you are trying to apply your expression into the expression editor are you getting a grey OK in the bottom left hand corner of your editor box or a red error in expression message or other red message.  If its red Sense isn't liking how you are building your expression for some reason.

This might steer you to the solution to the problem your having.

Regards

Andy

Community Browser