Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

tiklam_dynasys
Contributor

Create yearmonth record for each id

Hi all

I have a table below:

IdYear-Month
1201601
2201604
3201611
4201703

I would like to generate the table below:

Header 1Header 2
1
201601
1
201602
1
201603
1
201604
1
201605
1
201606
1
201607
1
201608
1
201609
1
201610
1
201611
1
201612
1
201701
1
201702
1
201703
1
201704
1201705

Other Record also generate until today year month.

Best Regards,

Louis

3 Replies
tiklam_dynasys
Contributor

Re: Create yearmonth record for each id

Anyone can help?

chooco_co
Valued Contributor

Re: Create yearmonth record for each id

Hi Louis,

Try searching for master calendar.Optimized code for Master Calendar

Regards,

Marco

antoniotiman
Honored Contributor III

Re: Create yearmonth record for each id

Hi Louis,

LOAD ID,
Date(AddMonths(Date#(YearMonth,'YYYYMM'),IterNo()-1),'YYYYMM') as YearMonth Inline [
ID,YearMonth
1,201601
2,201604
3,201611
4,201703
]
While Date(AddMonths(Date#(YearMonth,'YYYYMM'),IterNo()-1),'YYYYMM') <= Date(Today
(),'YYYYMM');

Regards,

Antonio