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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
mhill176
Contributor
Contributor

Case Statement in QlikSense

Hi,

 

I need a way to convert a YRMON string (ex. 202109 or 202005) into quarters.

So if Right(YRMON, 2)>9,4 should print '4' for any 4th quarter month - but I'm having trouble nesting the statements to mimic a CASE statement.

 

Any help would be appreciated,

 

Thanks.

1 Solution

Accepted Solutions
rubenmarin
MVP
MVP

Hi, you don't really need a case or nested if, to get the quarter you can use something like:

Ceil(Right(YRMON,2)/3)

View solution in original post

2 Replies
rubenmarin
MVP
MVP

Hi, you don't really need a case or nested if, to get the quarter you can use something like:

Ceil(Right(YRMON,2)/3)

mhill176
Contributor
Contributor
Author

Perfect, this is exactly the kind of solution I was looking for! Thank you!