Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
shekhar_analyti
Specialist
Specialist

Field Name as colum values : Data model challenge

Hi All ,

I have been asked in interview about how to handle data in excel sheet which will come in below format :

   

14-Jan14-Feb14-Mar14-Apr14-May
Hawai North3033364251
Sale of Florals1011121417
Bonus1011121417
No. of Vendors1011121417
Hawai South6699132165198
Sale of Florals2233445566
Bonus2233445566
No. of Vendors2233445566
Hawai East16533186230186
Sale of Florals5511142142142
Bonus5511111111
No. of Vendors5511337733
Hawai West19855179227180
Sale of Florals5511142142142
Bonus8833485
No. of Vendors5511337733

Every month data will come for different place (refer attachment) in same format . Please help me with this .

Note : Data model created should not involved manual changes every month

14 Replies
MarcoWedel

Hi,

maybe way to load your data without using hard coded date column names might be:

table1:

CrossTable (DateTemp, Value,2)

LOAD RowNo() as ID,* FROM [https://community.qlik.com/servlet/JiveServlet/download/1214965-266186/Column%20as%20field%20values....] (ooxml, embedded labels, table is Hawai);

Join

LOAD Distinct

     DateTemp,

     Date(Num#(DateTemp),'DD-MMM YY') as Date

Resident table1;

DROP Field DateTemp;

RENAME Field F1 to Type;

QlikCommunity_Thread_250296_Pic1.JPG

hope this helps

regards

Marco

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Now the next challenge seems to be to eliminate the totals lines but keep the header value and add this as an extra field to the next three lines. Good exercise for the OP?

MarcoWedel

Yes, the challenge was a bit vague regarding this topic

sasiparupudi1
Master III
Master III

shiveshsingh
Master
Master

This is working , Nice