Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

IF statement

Hello,

I am trying to display color in the column when a certain condition is met. I have the following IF statement in the Background Color in the Expression tab of the Chart Properties.

My condition is

If the status is Not Started and the Quarter has passed then display Red.

My IF statement is

IF(Status = 'Not Started' AND Now() > End_Quarter, RGB(255,0,0))

This does not give me the desired results.

I also have another condition

If Status is Started and End Quarter has passed and there is no Completion Date then display Red.

Any suggestions?

Thanks.

13 Replies
MarcoWedel

QlikCommunity_Thread_133245_Pic5.JPG.jpg

QlikCommunity_Thread_133245_Pic6.JPG.jpg

hope this helps

regards

Marco

Not applicable
Author

Thank you all for your help.

I am still working on this so I need to add to the same column,

If Status = In Progress, display the color green.

Is it possible to create an IF statement with 2 conditions in QlikView?

Thanks.

MarcoWedel

please close this thread if your initial question is answered.

thanks

regards

Marco

Not applicable
Author

Thanks for your help, Marco.

I am looking to add one more condition on the same column. I tried adding it and the expression is OK but then it displays all status' as green.

If Status = In Progress, display the color green.

IF(Status = 'In-Progress', IF(Status = 'Not Started' and Div(Month(Now())+2,3) > QTR_END or

    Status = 'Started' and Div(Month(Now())+2,3) > QTR_END and IsNull(COMPLETION_DATE),

    RGB(255,0,0), RGB(0,255,0)))

Thanks.