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: 
abhijith28
Creator II
Creator II

Qlikview Loading.

Please find the attached .xls file.

I need the the output as Month field, Brand name, all data as a table.

please help me with the solution.

1 Solution

Accepted Solutions
prieper
Master II
Master II

Plse check CROSSTABLE-functionality,

 

View solution in original post

9 Replies
prieper
Master II
Master II

Plse check CROSSTABLE-functionality,

 

techvarun
Specialist II
Specialist II

Try the below code

 

Crosstable ( Month, Sales, 1) LOAD * INLINE [
DNP sales, Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec
Budget 2015-AGP, 176.62, 164.53, 176.94, 204.58, 207.45, 215.22, 224.01, 220.81, 216.68, 223.52, 232.64, 256.61
Budget 2015-AGA, 20.28, 18.6, 19.5, 17.41, 15.18, 21.13, 16.42, 21.75, 25.96, 22.34, 16.76, 15.34
];

 

Vegar
MVP
MVP

You could use a loop and a constable(). I'll try to write up a pseudo code below.

For each vBrand in ...
Crosstable (month, DNPSales,2)
Load '$(vBrand)' as brand,
*
From excel.xlsx tab=$(vBrand);
Next
abhijith28
Creator II
Creator II
Author

But if i use cross table function, i am not able to use this if condition 

 

CrossTable(month, Data)
LOAD [DNP sales], Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec, Total,

if([DNP sales] = 'Spare Parts Budget 2015','Spare', if([DNP sales] ='Spare Parts Budget 2015Spare Parts Budget 2015','Accessories')) as new


FROM [C:\Users\A637985\Downloads\All Brands Forecast_Budget_2015.xlsx]
(ooxml, embedded labels, header is 1 lines, table is Audi);

 

The new is not reading once after the loading.

Vegar
MVP
MVP

 

 

I used the following script to create this pivot i QlikView.

 Skärmklipp.PNG

MAP_NEW:
MAPPING LOAD * INLINE [
DNP sales, Class
Budget 2015-AGP, Spare
Budget 2015-AGA, Accessories
];

CrossTable (Month, Amount, 3)
LOAD 
	'Audi' as Brand,
	[DNP sales], 
     ApplyMap('MAP_NEW',[DNP sales]) as NEW, 
     Jan, 
     Feb, 
     Mar, 
     Apr, 
     May, 
     Jun, 
     Jul, 
     Aug, 
     Sep, 
     Oct, 
     Nov, 
     Dec
FROM
[All Brands Forecast_Budget_2015.xlsx]
(ooxml, embedded labels, header is 1 lines, table is Audi);

 

 

abhijith28
Creator II
Creator II
Author

Thanks a lot, it is working fine 🙂
Vegar
MVP
MVP

@abhijith28 how did it go? Did you manage to extract your data?
Vegar
MVP
MVP

Ah, we posted simultaneously 🙂
I'm glad it worked out for you.
abhijith28
Creator II
Creator II
Author

yes, it worked 🙂