Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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,
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
We are using it in Select statement
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