Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
April 13–15 - Dare to Unleash a New Professional You at Qlik Connect 2026: Register Now!
cancel
Showing results for 
Search instead for 
Did you mean: 
montubhardwaj
Specialist
Specialist

Comparing sales weekwise

Hi Community,

I have to create a QlikView report which will compare current year and last years of data week wise. I have made significant progress on this but struck at one point.

I actually want to calculate the difference in the sale in each category for this year and last year. I mean I want to have another column under 1or 4 week sales which which will calculate the diff between the sales i.e. (Sale in 2011-Sale in 2010).. But I am not able to have this column added 😞

Output should be something like below:

I have attached the sample report too.Please advise me how to get this done.

Many thanks for your help/advise in advance!

1 Solution

Accepted Solutions
deepakk
Partner - Specialist III
Partner - Specialist III

5 Replies
deepakk
Partner - Specialist III
Partner - Specialist III

hi Sharma,

Dont add the Year as dimension. Add three expression as follows.

1) Sum({<Year={$(=Max(Year))}>} Sales ) this will give you the max(Year) . i.e 2011

if the user selects 2010 then 2010.

2)Sum({<Year={$(=Max(Year)-1)}>} Sales ) this will give you the Max(Year)-1 i.e 2010

if the user selects 2010 then t will shows sales of 2009

3) Column(1) - column(2).

I hope this helps

montubhardwaj
Specialist
Specialist
Author

Hi Deepak.... thx a lot bud.... but will be great if u can do this concept in the attached one ? I know it is too much for but am nt getting it much 😞

Also i think if we do this way, we will get only the difference for "1 week sale". But I want the difference for each column i.e for "1 week sale"., "4 week sale" and so on.

Hope I am not bothering you much 😞

montubhardwaj
Specialist
Specialist
Author

This is what i want exactly. Please let me kno if it is possible.

Please reffer to the attached(upper post) sample QVW file.

deepakk
Partner - Specialist III
Partner - Specialist III

hi Sharma,

PFA

montubhardwaj
Specialist
Specialist
Author

Many Thanks