Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
SK28
Creator II
Creator II

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.

Labels (1)
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 .