Skip to main content

Deployment & Management

Discussion board where members learn more about Qlik Sense Installation, Deployment and Management.

Announcements
Skip the ticket, Chat with Qlik Support instead for instant assistance.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

If to case conversion

Hi Anyone,

Can please convert the IF code to case.

If(columnA='RAV', If(columnC> 9, 'RAV After 7 Days', 'RAV Till 7 Days'),

If(columnA='TOT/ODv', If(columnB='OVD', If(columnC> 5,'OVD After 3 Days', 'OVD Till 3 Days')

,'TOT'), columnA)) AS New,

Labels (1)
  • SaaS

3 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

The case statement in Qlik are control statements and thus can not be used in Load statement.

Do you have any specific reason why you want to go for Case Statement.

http://www.qlikblog.at/546/qliktip-20-selectcase-qlikview-loadscripts/

Regards,

Kaushik Solanki

Regards,
Kaushik
If reply is satisfactory, please "Like" the post.
If reply is solution, please mark as "Correct".
Not applicable
Author

We are using it in Select statement

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

I would recommend use of If statement then case statement.

So in your case instead of using the Case statement in Select statement, you should use the If statement in load statement like below.

Load *,

If(columnA='RAV', If(columnC> 9, 'RAV After 7 Days', 'RAV Till 7 Days'),

If(columnA='TOT/ODv', If(columnB='OVD', If(columnC> 5,'OVD After 3 Days', 'OVD Till 3 Days')

,'TOT'), columnA)) AS New;

Sql Select * from xyz;

Regards,

Kaushik Solanki

Regards,
Kaushik
If reply is satisfactory, please "Like" the post.
If reply is solution, please mark as "Correct".