Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Save $600 on Qlik Connect registration! Sign up by Dec. 6 to get an extra $100 off with code CYBERSAVE: REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
SK28
Creator
Creator

case Statement in Qlikview

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.

1 Solution

Accepted Solutions
sergio0592
Specialist III
Specialist III

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'))

View solution in original post

2 Replies
sergio0592
Specialist III
Specialist III

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'))

ramasaisaksoft

For Switch case also we need to follow if else conditions/Nested if only in Qlikview .