Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

create master calendar with month only.

Hi All,

I have a filed in my table is 'yearmth'.no need to use date. data as below,

id, name, yearmth, sales

1, a, 201601,100

2,b, 201612,120

3,c, 201706, 200

I want to create master calendar only with months.as shows in the screen shot. no need to show date.

Thanks in advance

mas.JPG


2 Replies
vijayaganesh_s
Partner - Contributor III
Partner - Contributor III

Hi Somasundaram,

Try with the below code

LOAD * ,

DATE(YearMonthNum,'MMM YYYY')AS MMMYYYY;

LOAD * ,

Num(Date#(yearmth, 'YYYYMM')) AS YearMonthNum;

LOAD * INLINE [

id, name, yearmth, sales

1, a, 201601,100

2,b, 201612,120

3,c, 201706, 200];

Thanks,

VIjayaganeshS