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

creat date field with help of moonth

I have a dataset having just months(from Jan to Dec)name but I want to create dates from month like (Jan : 1/1/2022 to 12/31/2022 ) and all dates from all months till (Dec: 1/1/2022 To 12/31/2022)..

CrossTable(month, sales, 2)
Info:
LOAD
"Business Area",
Product,
"44197" as Jan,
"44229" as Feb,
"44258" as March,
"44290" as April,
"44321" as May,
"44353" as June,
"44384" as July,
"44416" as Aug,
"44448" as Sep,
"44479" as Oct,
"44511" as Nov,
"44542" as Dec,
City
FROM [lib://Cross Table/Cross Table Data Set.xlsx]
(ooxml, embedded labels, table is Sheet1);

Labels (3)
3 Replies
justISO
Specialist
Specialist

Hi, you are already loading 'dates' from this excel, just usually when loading dates from excel Qlik treats them as numbers, like  44197, 44229 etc., but with function date() you can convert them to date back. so date('44229') is actually '1/1/2021' etc. Modify your script so:

...LOAD
"Business Area",
Product,
date(44197) as Jan,
date(44229) as Feb, ...

 

InterneeQlik
Contributor
Contributor
Author

But it shows date like Jan = 1/1/2021
                                              Feb= 2/2/2021
                                             Mar=3/3/2022 and so on.
and it not show sales column..

I want to show date like.....

 Month           Date                Sales

Jan              1/1/2022      

Jan             1/2/2022   

Jan             1/3/2022        
        
      till

Dec              12/30/2022
Dec              12/31/2022

vinieme12
Champion III
Champion III

Refer this article

https://community.qlik.com/t5/Design/How-to-populate-a-sparsely-populated-field/bc-p/1470674

 

 

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.