Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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:
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 |
---|---|---|---|---|---|---|---|---|---|
A | 2 | 3 | 4 | 20 | 20 | 25 | 1 | 1 | 2 |
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
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.
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
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;