Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Talk to Experts, a LIVE Q&A Webinar. Bring your Qlik Sense Business questions on Aug. 4th. Register
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor III
Contributor III

Week over week comparison in a line graph

Hi experts,

I am trying to display the following:

A line chart with weeknumbers as the dimension. In the graph I want to display sum of sales, but the values should be the comparison of the week to the week before. For example, the sum of sales value for week 7 should be the sum of sales for week 7 compared to the sum of sales for week 6. Week 8 would display the comparison between week 8 and week 7 etcetera. I have Dates/Weeknumbers but I can't get the measure to work. It either displays the the same value as the actual week or just plain 0.

I've been trying set analysis and using AGGR but no succes so far. Any ideas?

Thanks!

Stijn

1 Solution

Accepted Solutions
Highlighted
Partner
Partner

Re: Week over week comparison in a line graph

try :

(Sum(sales)-above(sum(sales)))/above(sum(sales))



Result:

Capture.PNG

View solution in original post

3 Replies
Highlighted
Partner
Partner

Re: Week over week comparison in a line graph

try :

(Sum(sales)-above(sum(sales)))/above(sum(sales))



Result:

Capture.PNG

View solution in original post

Highlighted
Contributor III
Contributor III

Re: Week over week comparison in a line graph

It works! Thanks!

Highlighted
Partner
Partner

Re: Week over week comparison in a line graph

With the current expression, if u select a week you won't get a good result; if u want the result to be good if u select a week, please do as follow:

sum({<week=p(week)>}aggr((Sum({<week>}sales)-above(sum({<week>}sales)))/above(sum({<week>}sales)),week))


Result:

Capture.PNG