Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
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

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

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!