Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Multiple Cross Tables?

Hello QlikViewGurus.

I need help from the experts here, since it's been ages since I wrote any script myself.

I have indata arranged like this:

ProductSales Price 2012Sales Price 2013Sales Price 2014Sales Volume 2012
Sales Volume 2013Sales Volume 2014Product Cost 2012Product Cost 2013Product Cost 2014
A234202025112

So What I want is three different crosstables, I guess.

Table One

Product,

Sales Price

Year

Table Two

Product,

Sales Volume,

Year

Table Three

Product

Product Cost,

Year

So how do I do this in a good way? So please help the QV-noob here.  Many thanks in advance

[Edit]I have attached my file now.

Best regards,

Jonas

3 Replies
fdelacal
Specialist
Specialist

I atach different ways that you can do it, is better you have all in the same table.

please se qvw atach.

hope that helps you regards.

Not applicable
Author

Big thanks for helping me out, but the problem for me is that I need to keep the format intact. So it need to look like that.

I tried to load different loads in my attached example but then I need to "clean up" the data. I have attached the files now.

Isn't there any neat trick to get this to look nice?

Regards,

Jonas

Not applicable
Author

RECORD:

CrossTable(RECORD, Data)

LOAD Product,

     [Sales Price 2012],

     [Sales Price 2013],

     [Sales Price 2014],

     [Sales Volume 2012],

     [Sales Volume 2013],

     [Sales Volume 2014],

     [Product Cost 2012],

     [Product Cost 2013],

     [Product Cost 2014]

FROM

[..\Data\Excel\CROSSTABLE1.xlsx]

(ooxml, embedded labels, table is Sheet1);

temp:

LOAD *,

Left(RECORD,Len(RECORD) -4)  AS RECORD2,

RIGHT(RECORD,4)  AS YEAR

Resident RECORD;

DROP Table RECORD;