Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

3 or more conditions in color calculation turn everything black

Hello,

I have a chart that shows 4 different values for data.

I want each value being shown in a specific color, regardless of the filter I selected.

I used:

if(([Status])=Sold, lightGreen(),if(([Status])=Returned, LightRed(), if(([Status])=Reserved, LightBlue()))

It works when I have 2 if conditions but as soon as I add the 3rd one or even the 4th one, everything turns black.

I entered this in the background settings of the expression in the chart properties.

Anybody has any idea what is causing this?

1 Solution

Accepted Solutions
Not applicable
Author

There are 3 if else condition but closed only 2

If possible, post sample document.

View solution in original post

4 Replies
Not applicable
Author

There are 3 if else condition but closed only 2

If possible, post sample document.

robert_mika
Master III
Master III

Try this:


if(([Status])='Sold', lightGreen(),if(([Status])='Returned', LightRed(), if(([Status])='Reserved', LightBlue())))

avinashelite

try like this:

if([Status]=Sold, lightGreen(),if([Status])=Returned, LightRed(), if([Status]=Reserved, LightBlue())) )


Anonymous
Not applicable
Author

Duh!!! Thanks