Skip to main content

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Welcome to Qlik Community! Check out our new navigation! FIND OUT MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
DS14
Partner - Contributor III
Partner - Contributor III

Require month and year only

Hi Experts,

I have the field with values in below format, from which I need extract only Month and year.

Month
Field2_Mar-18 No
Field2_Mar-18 No
Field2_Mar-18 No
Field2_Mar-18 No
Field2_Mar-18 No
Field2_Mar-18 No
Field2_Mar-18 No
Field2_Mar-18 No
Field2_Mar-18 No
Field2_Mar-18 No
Field2_Mar-18 No
Field2_Mar-18 No

 

Please suggest.

Thanks in advance.

Labels (3)
1 Solution

Accepted Solutions
JordyWegman
Partner - Master
Partner - Master

Hi Deepaksingh,

Do you want them separate? Then use this:

Left(Right(Month,9),3) as Month

Year(20 & Left(Right(Month,5),2)) as Year

If you want the combination then use this:

Left(Right(Month,9),6) as YearMonth

Jordy

Climber

Work smarter, not harder

View solution in original post

1 Reply
JordyWegman
Partner - Master
Partner - Master

Hi Deepaksingh,

Do you want them separate? Then use this:

Left(Right(Month,9),3) as Month

Year(20 & Left(Right(Month,5),2)) as Year

If you want the combination then use this:

Left(Right(Month,9),6) as YearMonth

Jordy

Climber

Work smarter, not harder