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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

if-wildmatch-?

Hello everyone and sorry for my bad English . My question is , how do I get to fill a column with the particular values ​​after a check on another column ?

I'll explain:

I have a field MONTH_YEAR format month.year ( 11.2001 ) .

if ( WildMatch ( MONTH_YEAR , '01 . ' or '02 . ' or '03 . ' or '04 . ' ) = 1 , ' Q1 ' ,

if ( WildMatch ( MONTH_YEAR , '05 . ' or '06 . ' or '07 . ' or '08 . ' ) = 1 , ' Q2 ' ,

if ( WildMatch ( MONTH_YEAR , '09 . ' or '10 . ' or '11 . ' or '12 . ' ) = 1 , ' Q3 ' , ) ) ) as Quarter

I would like the column quarter fill values ​​Q1 - Q2 - Q3 after checking the month but I can not do it .

I had thought to divide the field into MONTH_YEAR

Right ( MONTH_YEAR , 4 ) as Year ,

     left ( MONTH_YEAR , 2 ) as Month ,

     ' ' As the Quarter

and then

if ( WildMatch ( Month , '01' or ' 02 ' or ' 03 ' or ' 04 ' ) = 1 , ' Q1 ' ,

if ( WildMatch ( Month , '05 ' or ' 06 ' or ' 07 ' or ' 08 ' ) = 1 , ' Q2 ' ,

if ( WildMatch ( Month , '09 ' or ' 10 ' or ' 11 ' or ' 12 ' ) = 1 , ' Q3 ' , ) ) ) as Quarter

but the result is the same.

how can I do please let advise.

thanks best regards..:)

Labels (1)
1 Solution

Accepted Solutions
giakoum
Partner - Master II
Partner - Master II

'Q'&ceil(month(Date#(MONTH_YEAR, 'MM.YYYY'))/3)

View solution in original post

3 Replies
giakoum
Partner - Master II
Partner - Master II

'Q'&ceil(month(Date#(MONTH_YEAR, 'MM.YYYY'))/3)

Not applicable
Author

Thanks a lot , I settled with that code that I 've been through.

giakoum
Partner - Master II
Partner - Master II

Not sure what you mean but please close this thread in any case