Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Qlik Analytics Tour 2020 Online. Begins August 10th. Register Today
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor III
Contributor III

Load if statement multiple expressions

Hi there,

Just would like to know if there is a way under If statement in the Load script to have multiple expressions. For example:

If a=1, p As X, q As Y, r As Z     // (a, p q, r are data fields)

instead of having 3 If statements.

 

Thanks

 

3 Replies
Highlighted
Partner
Partner

Re: Load if statement multiple expressions

Does this mean, that if a=1 you load those three fields and otherwise not? You can do it with multiple loads with conditions (where a=1) and concatenate tables.

Highlighted
Contributor III
Contributor III

Re: Load if statement multiple expressions

Hi DavidM,

Yes, actually if the field a = 1, it shall load 50 fields, otherwise do nothing.

I can use 50 IF to complete this, but wonder if I can simply use one IF with 50 then expressions to make the coding look neat.

 

Thanks

Highlighted
Digital Support
Digital Support

Re: Load if statement multiple expressions

Snowman, only other thing that came to mind might be the following Design Blog:

https://community.qlik.com/t5/Qlik-Design-Blog/Preceding-Load/ba-p/1469534

Not sure if it will help or not, figured it was worth pointing out.

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.