Discussion board where members can get started with Qlik Sense.
Quite a simple questions i think but i didn't find an answer.
in the load script is is correct to have one IF for multiple THEN?
if(status=6,1,0) as status,
if(status=6,200,300) as revenue,
if(status=6,'Y','N') as cancel_flag
Go to Solution.
What you have is fine. You shouldn't receive any errors.
Yes, this is correct. This is done all the time.
There is one more
if I put
does that mean that it first filters only those rows were status=6 and then use it for computation, meaning, I am loosing all other data and can't use PEAK function?
peak(status) as status // will always return '6', because the source table is filtered PRIOR to LOAD?
Yes. If you use the where clause, it will only pull in rows where the status is 6. You will not have any other status numbers in your data.