-
Re: To write IF statement in load script
Vegar Lie Arntsen Nov 7, 2016 1:14 PM (in response to Jet Yang)https://help.qlik.com/en-US/sense/3.0/Subsystems/Hub/Content/Scripting/ConditionalFunctions/if.htm
Try:
if ("L_Point"='3','Late stage',
if ("L_Point"='6','Mid stage',
if ("L_Point"='9','Early stage')))
-
Re: To write IF statement in load script
Bella Mae Nov 7, 2016 1:30 PM (in response to Jet Yang)Try
if(L_Point='3','Late stage', if(L_Point='6','Mid stage', if(L_Point='9','Early stage')))
This doesn't dictate what to do if the L_Point isn't 3, 6 or 9 so I am assuming it can't be any other number. If it can you will want to add something to the expression for example:
if(L_Point='3','Late stage', if(L_Point='6','Mid stage', if(L_Point='9','Early stage', Null())))
or
if(L_Point='3','Late stage', if(L_Point='6','Mid stage', if(L_Point='9','Early stage', L_Point)))
-
Re: To write IF statement in load script
Massimo Grossi Nov 7, 2016 1:33 PM (in response to Jet Yang)pick(match(L_Point, '3',' '6', '9'),
'Late stage', 'Mid stage', 'Early stage')