Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I was wondering if anyone would be able to help me. I want to create the following Case statement in QlikView:
CASE
WHEN DISTRICT IN ('0317','0328','0030','0057','0122','6057','6130','6150','6317','6631') AND
YYYYMM <= '201602' THEN 'A'
WHEN DISTRICT IN ('0317','0328','0030','0057','0122','6057','6130','6150','6317','6631') AND
YYYYMM BETWEEN '201603' AND '201605' THEN 'B'
ELSE 'C' END AS STAGES,
Is this possible to do within QlikView?
Any help would be greatly appreciated.
thanks.
Try
If(match(DISTRICT,'0317','0328','0030','0057','0122','6057','6130','6150','6317','6631')>0 and YYYYMM <= '201602','A',if(match(DISTRICT,'0317','0328','0030','0057','0122','6057','6130','6150','6317','6631')>0 and (
YYYYMM > '201603' AND YYYYMM <'201605'),'B','C'))
Try
If(match(DISTRICT,'0317','0328','0030','0057','0122','6057','6130','6150','6317','6631')>0 and YYYYMM <= '201602','A',if(match(DISTRICT,'0317','0328','0030','0057','0122','6057','6130','6150','6317','6631')>0 and (
YYYYMM > '201603' AND YYYYMM <'201605'),'B','C'))
For Switch case also we need to follow if else conditions/Nested if only in Qlikview .