Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
satishkurra
Specialist II
Specialist II

Fiscal Period to Fiscal Quarter

Hi

I have a strange situation.

FiscalPeriod is the only field available as below

 

FiscalPeriod
2016001
2016002
2016003
2016004
2016005
2016006
2016007
2016008
2016009
2016010
2016011
2016012
2017001
2017002
2017003
2017004
2017005
2017006
2017007
2017008
2017009
2017010
2017011

2017012

I need to obtain as below

  

FiscalPeriodFiscalQuarter
2016001Oct-Dec 2015
2016002Oct-Dec 2015
2016003Oct-Dec 2015
2016004Jan-Mar 2016
2016005Jan-Mar 2016
2016006Jan-Mar 2016
2016007Apr-Jun 2016
2016008Apr-Jun 2016
2016009Apr-Jun 2016
2016010Jul-Sep 2016
2016011Jul-Sep 2016
2016012Jul-Sep 2016
2017001Oct-Dec 2016
2017002Oct-Dec 2016
2017003Oct-Dec 2016
2017004Jan-Mar 2017
2017005Jan-Mar 2017
2017006Jan-Mar 2017
2017007Apr-Jun 2017
2017008Apr-Jun 2017
2017009Apr-Jun 2017
2017010Jul-Sep 2017
2017011Jul-Sep 2017
2017012Jul-Sep 2017

Is it possible?

1 Solution

Accepted Solutions
Anil_Babu_Samineni

Yes, It is possible. Try this

Load FiscalPeriod, QuarterName(AddMonths(FiscalPeriod,-3)) as FiscalQuarter;

LOAD Date(Date#(FiscalPeriod,'YYYYMM'),'YYYY-MM') as FiscalPeriod;

LOAD * Inline [

FiscalPeriod

2016001

2016002

2016003

2016004

2016005

2016006

2016007

2016008

2016009

2016010

2016011

2016012

2017001

2017002

2017003

2017004

2017005

2017006

2017007

2017008

2017009

2017010

2017011

2017012

];

Capture.PNG

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful

View solution in original post

2 Replies
Anil_Babu_Samineni

Yes, It is possible. Try this

Load FiscalPeriod, QuarterName(AddMonths(FiscalPeriod,-3)) as FiscalQuarter;

LOAD Date(Date#(FiscalPeriod,'YYYYMM'),'YYYY-MM') as FiscalPeriod;

LOAD * Inline [

FiscalPeriod

2016001

2016002

2016003

2016004

2016005

2016006

2016007

2016008

2016009

2016010

2016011

2016012

2017001

2017002

2017003

2017004

2017005

2017006

2017007

2017008

2017009

2017010

2017011

2017012

];

Capture.PNG

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
satishkurra
Specialist II
Specialist II
Author

Thanks a ton Anil Samineni...