Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Position

Hello,

I have pro year/ month the sales of specific cars e.g. opel, fiat, Mercedes etc.

Now i want to have a pivot table

with for the actual year the sells of cars and the position

the previous year the sells of cars and the position within that year

e.g.

             2014               2013

             sells position

fiat        1000 1            fiat 800 3

opel         800 2           Opel 900 1

Mercedes  700 3        Mercedes  850 2

you can see fiat 2014 position 1 2013 position 3

opel 2014 position 2 2013 position 1

Mercedes 2014 position 3 2013 position 2

How to realise this?

2 Replies
MarcoWedel

Hi,

one solution could be:

QlikCommunity_Thread_142228_Pic1.JPG.jpg

QlikCommunity_Thread_142228_Pic2.JPG.jpg

tabCarSales:

LOAD *,

    Month(MonthName) as Month,

    Ceil(Month(MonthName)/3) as Quarter,

    QuarterName(MonthName) as QuarterName,

    Year(MonthName) as Year;  

LOAD *,

    Ceil(Rand()*15000)as Sales,

    MonthName(AddMonths(MakeDate(2010),IterNo()-1)) as MonthName

Inline [

Car Manufacturer

Audi

BMW, Mini

Fiat

Ford

Mercedes-Benz

Opel

Porsche

Volkswagen

]

While AddMonths(MakeDate(2010),IterNo()-1) <= Today();

hope this helps

regards

Marco

jsakalis
Contributor III
Contributor III

Hi Ama,

Please see attached app.