I'm tyring to add multiple if statements in my Qlik Sense load script.
The data has a status that I would like to group into 4 different stages and then call that Open Position Stage
If ([Status] <> 'Withdrawn' or [Status] <> 'Rejected', 'Open Positions',
If ([Status] <> 'Withdrawn' or [Status] <> 'Rejected' or [Status] <> 'Submitted' or [Status] <> 'Halted', 'Pending Approval',
If ([Status] = 'Submitted', 'In Process',
If ([Status] = 'Halted', 'Onboarding')))) AS "Open Position Stage",
So, in the end I would like to have Open Position Stage as a dimension with values of Open Positions, Pending Approval, In Process, and Onboarding.
I'm struggling with the syntax and have tried several different things, but can't get it to load properly.
Anyone know what I'm doing wrong here?
The syntax is correct
but the "Open Position Stage" is always 'Open Positions'
Why? Because the first if is always true
If ([Status] <> 'Withdrawn' or [Status] <> 'Rejected', 'Open Positions',
The syntax is correct
but the "Open Position Stage" is always 'Open Positions'
Why? Because the first if is always true
If ([Status] <> 'Withdrawn' or [Status] <> 'Rejected', 'Open Positions',
You should begin with most restrictive first
If ([Status] = 'Halted', 'Onboarding',
If ([Status] = 'Submitted', 'In Process',
and so on...
Thanks, I don't know why I didn't catch that.
Thanks! Not sure why that didn't click for me.