Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a table with Month field, Year field, and Employee Count field
| Month | Year | Employee Count |
|---|---|---|
| Jan | 2014 | 10 |
| Feb | 2014 | 12 |
| Mar | 2014 | 13 |
| Apr | 2014 | 25 |
I want to use Month and Year to determine a date so that I hook into my Master Calendar. How do I manipulate Month and Year to end up with a new column in date format that looks like this:
| Month | Year | Date | Employee Count |
|---|---|---|---|
| Jan | 2014 | 1/1/2014 | 10 |
| Feb | 2014 | 2/1/2014 | 12 |
| Mar | 2014 | 3/1/2014 | 13 |
| Apr | 2014 | 4/1/2014 | 25 |
Thanks!
Try this:
LOAD Month,
Year,
[Employee Count],
MakeDate(Year, Num(Month(Date#(Month, 'MMM'))), 1) as Date
MakeDate(Year, Month, 1) as Date
FROM Source;
Sample Script:
Table:
LOAD Month,
Year,
[Employee Count],
Date(MakeDate(Year, Num(Month(Date#(Month, 'MMM'))), 1)) as Date
FROM
[https://community.qlik.com/thread/206323]
(html, codepage is 1252, embedded labels, table is @1);
Try this:
LOAD Month,
Year,
[Employee Count],
MakeDate(Year, Num(Month(Date#(Month, 'MMM'))), 1) as Date
MakeDate(Year, Month, 1) as Date
FROM Source;
Sample Script:
Table:
LOAD Month,
Year,
[Employee Count],
Date(MakeDate(Year, Num(Month(Date#(Month, 'MMM'))), 1)) as Date
FROM
[https://community.qlik.com/thread/206323]
(html, codepage is 1252, embedded labels, table is @1);
Hi,
Use MakeDate function in script.
Load Year,
Month,
Makedate(Year,Month) as Date,
EmpCount
From Xyz;
Regards,
Kaushik Solanki
Thanks!! That did it!