Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Aspiring_Developer
Creator III
Creator III

Crosstable loading of data from excel

Hi Team,

I want to load the data from excel using crosstable for the attached file:-

VLS Global                                                            
                                                            
CustomersApril-19May-19June-19July-19August-19September-19October-19November-19December-19January-20February-20March-20
NOK parts in customer database - totalReal NOK parts manufactured -  totalNumber of official Written concern Total number Alert + Unofficial Written concernVolumes shipped (external sales only)NOK parts in customer database - totalReal NOK parts manufactured -  totalNumber of official Written concern Total number Alert + Written concernVolumes shipped (external sales only)NOK parts in customer database - totalReal NOK parts manufactured -  totalNumber of official Written concern Total number Alert + Written concernVolumes shipped (external sales only)NOK parts in customer database - totalReal NOK parts manufactured -  totalNumber of official Written concern Total number Alert + Written concernVolumes shipped (external sales only)NOK parts in customer database - totalReal NOK parts manufactured -  totalNumber of official Written concern Total number Alert + Written concernVolumes shipped (external sales only)NOK parts in customer database - totalReal NOK parts manufactured -  totalNumber of official Written concern Total number Alert + Written concernVolumes shipped (external sales only)NOK parts in customer database - totalReal NOK parts manufactured -  totalNumber of official Written concern Total number Alert + Written concernVolumes shipped (external sales only)NOK parts in customer database - totalReal NOK parts manufactured -  totalNumber of official Written concern Total number Alert + Written concernVolumes shipped (external sales only)NOK parts in customer database - totalReal NOK parts manufactured -  totalNumber of official Written concern Total number Alert + Written concernVolumes shipped (external sales only)NOK parts in customer database - totalReal NOK parts manufactured -  totalNumber of official Written concern Total number Alert + Written concernVolumes shipped (external sales only)NOK parts in customer database - totalReal NOK parts manufactured -  totalNumber of official Written concern Total number Alert + Written concernVolumes shipped (external sales only)NOK parts in customer database - totalReal NOK parts manufactured -  totalNumber of official Written concern Total number Alert + Written concernVolumes shipped (external sales only)
Brazil334139,780000118,540000114,940010116,0803603601117,550000114,400000013,560000015,15000006,720000115,7220000000000
Bulgaria002266,300000066,247001158,524222231,413000042,678000055,928000056,031000067,833131132,52992192331,21,3950000000000
India Pune 44823378,22024772281,29662914475,56742302276,70141882264,34851553466,40823041166,05525941167,96365532279,107121,149331,29,0070000000000
Italy2225222590,727266266881,60,4549999881,29,1819494331,22,7020120548,7599653101,57,68014545141,06,1001601590,640010166,798079141,89,8600000000000
Mexico601,991293,98,36561,2165185,03,68969562114,41,1842875293,97,01913981193,82,42522170154,08,460263556184,26,5881255194,04,8692151283,12,55312152253,52,5110000000000
Morocco0950025,4680680032,5062340249,5531551159,620090028,16801850045,7334704468,1250420053,3437942256,0740400081,4830000000000
Novy Jicin2748115349,33,55621988215310,17,3641363510378,49,793121,0087596,40,068134566176,28,02187958309,51,84386777419,57,24571,2617478,57,426104776376,59,0191572,88411378,75,7790000000000
Rychvald3453141,88,5616633232,43,94941484152,15,828101846241,89,9293203131,65,30913549332,62,372105610273,22,98512315183,05,4243583112,30,73461676273,23,6160000000000
Romania00112,72,355010023,19,04002012,61,60701013,18,17000001,15,039714902343,19,73022222,16,98103022,72,21300001,08,60400002,73,6420000000000
Poland000000000000000000000000000000000000000031292293,248018202614,9230000000000
Turkey664421,49,1753623871223,23,812664417,69,5653193194619,77,00901781117,91,943183002826,33,69681324621,84,6762844361726,43,94916274622,88,8366173423,99,2650000000000
Vietnam111178,6991072097772,51330302286,870222279,711443378,405111184,290111170,8951951951187,071772387,39511111,14,3580000000000
VTYC CQ38331,50,985000086,8397174471,51,33349241,60,1706114391,03,70800001,88,9432312312,23,37388442,61,95122222,28,203000000000000000
VTYC CZ55221,02,48604001,09,470131384,792394997,60924221,00,14602021,17,62601011,05,19411111,47,8491171694,689000000000000000
India Chennai000000000000000000000000000000000000000000000000000000000000
 000000000000000000000000000000000000000000000000000000000000
 000000000000000000000000000000000000000000000000000000000000
 000000000000000000000000000000000000000000000000000000000000
Europe (NJ,RY,PL, Mor.) 30621184811,47,585271,119247612,93,8191981714540231,24714848,89,617164859308,21,498211,034176312,59,94822803217213,48,355191,334126512,16,1932375813799,49,0751633,273179012,95,8010000000000
US (Brazil+ Mexico)632,0253124,08,14561,2165195,22,2296956212028762104,13,0993617582203,99,97522170164,22,860263556184,40,1481255194,20,0192151283,19,27312152263,68,2330000000000
2WSL2935303326,57,256735872161929,42,06613513715160417418111425,29,00541944920,76,8247421,26892332,51,32425189122326,34,68322470182531,61,706243871125,84,1629928981230,98,5200000000000
China 813552,70,85804001,96,309817751007186132,57,77981185112,03,85402023,06,5692322323,28,56799554,09,800319383,22,892000000000000000
India (Pune+ chennai)44823378,22024772281,296629144042302276,70141882264,34851553466,40823041166,05525941167,96365532279,107121,149331,29,0070000000000
 000000000000000000000000000000000000000000000000000000000000
TOTAL ACTUAL1343,1735910145,44,6777703,6884711650,35,7191742,378409641,88,7374532,7893512341,66,2013931,743227235,66,4997702,6762910853,07,109771,6834214648,17,8082552,8932710552,75,681581,5192710842,54,5092864,8633011148,91,5610000000000
1 Solution

Accepted Solutions
petter
Partner - Champion III
Partner - Champion III

This should work for you:

 

FOR Each vMonth IN 'April','May','June','July','August','September','October','November','December','January'
    DATE_AND_ROW_DATA:
    FIRST 2
    LOAD
        RowNo() AS R#,
        If(IsNum("VLS Global"),Date("VLS Global"),Peek(Date)) AS Date,
        F14 AS CustomerPPM,
        F15 AS SitePPM,
        F17 AS CustomerIPB,
        F18 AS SiteIPB
    FROM [lib://Downloads/ZZ Global January 2019.xlsx]
    (ooxml, embedded labels, table is [Quality Performance-$(vMonth)])
    WHERE
       "VLS Global" = 'TOTAL ACTUAL'
       OR
       RecNo()=2;

    DATA:
    LOAD 
      Date(Date,'MMM.YY') AS Date,CustomerPPM,SitePPM,CustomerIPB,SiteIPB RESIDENT DATE_AND_ROW_DATA WHERE RecNo()=2;
    DROP TABLE DATE_AND_ROW_DATA;
NEXT

vMonth=;

 

 

It seems there is something odd about the June sheet though - you'll have to figure that out yourself ... The code works as such.

 

Merknad 2020-02-11 100100.png

 

I must caution you that reading from a complex spreadsheet sometimes makes me feel like doing open heart surgery in a sailboat in open waters...

  

 

Please click the like button or heck if the response was correct you could even mark it as a correct solution.
Believe me - it will be greatly appriciated by the contributors ...
We love likes as much as anyone posting anything on social media

View solution in original post

11 Replies
petter
Partner - Champion III
Partner - Champion III

Is the table you show directly in your post how you want the data to be in Qlik Sense after doing a load from the Excel file?

If so - is it how you want it to be in a data table in the data model or as  a UI table in a sheet?

Aspiring_Developer
Creator III
Creator III
Author

I want the output like this:-

  1 months data 
 NOK parts in customer database - total Real NOK parts manufactured - totalNumber of official Written concernTotal number Alert + Unofficial Written concern
Apr-19296981298222224
May-19153732933323035
Jun-1942568954922919
Jul-19109669840129523
Aug-19110489616920188
Sep-19145504546420350
Oct-1916349871830304
Nov-1948548511819903
Dec-1914357634625385
Jan-2058994613322692
Feb-20#DIV/0!#DIV/0!#DIV/0!#DIV/0!
Mar-20#DIV/0!#DIV/0!#DIV/0!#DIV/0!
petter
Partner - Champion III
Partner - Champion III

What is PPM and IPB?

Aspiring_Developer
Creator III
Creator III
Author

Hi, 

 

Please find the updated output above

I just want it like this

 NOK parts in customer database - totalReal NOK parts manufactured - totalNumber of official Written concernTotal number Alert + Unofficial Written concern
Apr-19296981298222224
May-19153732933323035
Jun-1942568954922919
Jul-19109669840129523
Aug-19110489616920188
Sep-19145504546420350
Oct-1916349871830304
Nov-1948548511819903
Dec-1914357634625385
Jan-2058994613322692
Feb-20#DIV/0!#DIV/0!#DIV/0!#DIV/0!
Mar-20#DIV/0!#DIV/0!#DIV/0!#DIV/0!
petter
Partner - Champion III
Partner - Champion III

This should work for you:

 

FOR Each vMonth IN 'April','May','June','July','August','September','October','November','December','January'
    DATE_AND_ROW_DATA:
    FIRST 2
    LOAD
        RowNo() AS R#,
        If(IsNum("VLS Global"),Date("VLS Global"),Peek(Date)) AS Date,
        F14 AS CustomerPPM,
        F15 AS SitePPM,
        F17 AS CustomerIPB,
        F18 AS SiteIPB
    FROM [lib://Downloads/ZZ Global January 2019.xlsx]
    (ooxml, embedded labels, table is [Quality Performance-$(vMonth)])
    WHERE
       "VLS Global" = 'TOTAL ACTUAL'
       OR
       RecNo()=2;

    DATA:
    LOAD 
      Date(Date,'MMM.YY') AS Date,CustomerPPM,SitePPM,CustomerIPB,SiteIPB RESIDENT DATE_AND_ROW_DATA WHERE RecNo()=2;
    DROP TABLE DATE_AND_ROW_DATA;
NEXT

vMonth=;

 

 

It seems there is something odd about the June sheet though - you'll have to figure that out yourself ... The code works as such.

 

Merknad 2020-02-11 100100.png

 

I must caution you that reading from a complex spreadsheet sometimes makes me feel like doing open heart surgery in a sailboat in open waters...

  

 

Please click the like button or heck if the response was correct you could even mark it as a correct solution.
Believe me - it will be greatly appriciated by the contributors ...
We love likes as much as anyone posting anything on social media
Aspiring_Developer
Creator III
Creator III
Author

I was trying to create the croostable for this excel tab "Quality Perfo Dashboard-Yearly " in the attached sheet. Will it work for that also as it has different dimensions and strucuture like below:-

VLS Global                                                            
                                                            
CustomersApril-19May-19June-19July-19August-19September-19October-19November-19December-19January-20February-20March-20
NOK parts in customer database - totalReal NOK parts manufactured -  totalNumber of official Written concern Total number Alert + Unofficial Written concernVolumes shipped (external sales only)NOK parts in customer database - totalReal NOK parts manufactured -  totalNumber of official Written concern Total number Alert + Written concernVolumes shipped (external sales only)NOK parts in customer database - totalReal NOK parts manufactured -  totalNumber of official Written concern Total number Alert + Written concernVolumes shipped (external sales only)NOK parts in customer database - totalReal NOK parts manufactured -  totalNumber of official Written concern Total number Alert + Written concernVolumes shipped (external sales only)NOK parts in customer database - totalReal NOK parts manufactured -  totalNumber of official Written concern Total number Alert + Written concernVolumes shipped (external sales only)NOK parts in customer database - totalReal NOK parts manufactured -  totalNumber of official Written concern Total number Alert + Written concernVolumes shipped (external sales only)NOK parts in customer database - totalReal NOK parts manufactured -  totalNumber of official Written concern Total number Alert + Written concernVolumes shipped (external sales only)NOK parts in customer database - totalReal NOK parts manufactured -  totalNumber of official Written concern Total number Alert + Written concernVolumes shipped (external sales only)NOK parts in customer database - totalReal NOK parts manufactured -  totalNumber of official Written concern Total number Alert + Written concernVolumes shipped (external sales only)NOK parts in customer database - totalReal NOK parts manufactured -  totalNumber of official Written concern Total number Alert + Written concernVolumes shipped (external sales only)NOK parts in customer database - totalReal NOK parts manufactured -  totalNumber of official Written concern Total number Alert + Written concernVolumes shipped (external sales only)NOK parts in customer database - totalReal NOK parts manufactured -  totalNumber of official Written concern Total number Alert + Written concernVolumes shipped (external sales only)
Brazil334139,780000118,540000114,940010116,0803603601117,550000114,400000013,560000015,15000006,720000115,7220000000000
Bulgaria002266,300000066,247001158,524222231,413000042,678000055,928000056,031000067,833131132,52992192331,21,3950000000000
India Pune 44823378,22024772281,29662914475,56742302276,70141882264,34851553466,40823041166,05525941167,96365532279,107121,149331,29,0070000000000
Italy2225222590,727266266881,60,4549999881,29,1819494331,22,7020120548,7599653101,57,68014545141,06,1001601590,640010166,798079141,89,8600000000000
Mexico601,991293,98,36561,2165185,03,68969562114,41,1842875293,97,01913981193,82,42522170154,08,460263556184,26,5881255194,04,8692151283,12,55312152253,52,5110000000000
Morocco0950025,4680680032,5062340249,5531551159,620090028,16801850045,7334704468,1250420053,3437942256,0740400081,4830000000000
Novy Jicin2748115349,33,55621988215310,17,3641363510378,49,793121,0087596,40,068134566176,28,02187958309,51,84386777419,57,24571,2617478,57,426104776376,59,0191572,88411378,75,7790000000000
Rychvald3453141,88,5616633232,43,94941484152,15,828101846241,89,9293203131,65,30913549332,62,372105610273,22,98512315183,05,4243583112,30,73461676273,23,6160000000000
Romania00112,72,355010023,19,04002012,61,60701013,18,17000001,15,039714902343,19,73022222,16,98103022,72,21300001,08,60400002,73,6420000000000
Poland000000000000000000000000000000000000000031292293,248018202614,9230000000000
Turkey664421,49,1753623871223,23,812664417,69,5653193194619,77,00901781117,91,943183002826,33,69681324621,84,6762844361726,43,94916274622,88,8366173423,99,2650000000000
Vietnam111178,6991072097772,51330302286,870222279,711443378,405111184,290111170,8951951951187,071772387,39511111,14,3580000000000
VTYC CQ38331,50,985000086,8397174471,51,33349241,60,1706114391,03,70800001,88,9432312312,23,37388442,61,95122222,28,203000000000000000
VTYC CZ55221,02,48604001,09,470131384,792394997,60924221,00,14602021,17,62601011,05,19411111,47,8491171694,689000000000000000
India Chennai000000000000000000000000000000000000000000000000000000000000
 000000000000000000000000000000000000000000000000000000000000
 000000000000000000000000000000000000000000000000000000000000
 000000000000000000000000000000000000000000000000000000000000
Europe (NJ,RY,PL, Mor.) 30621184811,47,585271,119247612,93,8191981714540231,24714848,89,617164859308,21,498211,034176312,59,94822803217213,48,355191,334126512,16,1932375813799,49,0751633,273179012,95,8010000000000
US (Brazil+ Mexico)632,0253124,08,14561,2165195,22,2296956212028762104,13,0993617582203,99,97522170164,22,860263556184,40,1481255194,20,0192151283,19,27312152263,68,2330000000000
2WSL2935303326,57,256735872161929,42,06613513715160417418111425,29,00541944920,76,8247421,26892332,51,32425189122326,34,68322470182531,61,706243871125,84,1629928981230,98,5200000000000
China 813552,70,85804001,96,309817751007186132,57,77981185112,03,85402023,06,5692322323,28,56799554,09,800319383,22,892000000000000000
India (Pune+ chennai)44823378,22024772281,296629144042302276,70141882264,34851553466,40823041166,05525941167,96365532279,107121,149331,29,0070000000000
 000000000000000000000000000000000000000000000000000000000000
TOTAL ACTUAL1343,1735910145,44,6777703,6884711650,35,7191742,378409641,88,7374532,7893512341,66,2013931,743227235,66,4997702,6762910853,07,109771,6834214648,17,8082552,8932710552,75,681581,5192710842,54,5092864,8633011148,91,5610000000000

 

 

 

And i wish to see the output like

 

Customers  , Month, NOK parts in customer database - total, Real NOK parts manufactured - total

Brazil          , April-19   3,                                                                                    34

 

Note: please refer the attached excel in the post and look for "Quality Perfo Dashboard-Yearly " excel tab

petter
Partner - Champion III
Partner - Champion III

I actually answered your question and problem.

Please be polite and give me credit for that.

Yes - of course it can be done. The example I gave you should give you the pointers to learn and solve it on your own. It is all about data wrangling and transforming the raw data into a shape and form that can serve analysis and visulization in Qlik.

 

 

Aspiring_Developer
Creator III
Creator III
Author

Okay, i will try. Thank you for the support 😊

petter
Partner - Champion III
Partner - Champion III

Please click the like button or heck if the response was correct you could even mark it as a correct solution.
Believe me - it will be greatly appriciated by the contributors ...
We love likes as much as anyone posting anything on social media