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

Plot Change over Time

I have a simple line chart that plots sales over time. I need to transform this chart to show the change in sales over time.

The current chart data:

Month - Units
Jan - 10
Feb - 15
Mar - 25
May - 15

What I'm tying to achieve:

Month - Change in Units
Jan - null
Feb - 5
Mar - 10
May - (10)

The easiest solution I can think of is to handle this in the staging database prior to loading or during the load script. However, I prefer to implement the logic in the chart expression.

I'm guessing the solution involves set analysis and or the aggr function. I figured out how to calculate the period over period change using set analysis, but only when the user selects a specific month.

Any help is much appreciated!

1 Solution

Accepted Solutions
Not applicable
Author

Hi Peter

Expression is :

=Sum(Sales) - Above(Sum(Sales))

Hope it helps,

View solution in original post

3 Replies
Not applicable
Author

Hi

See attached example, uses a very simple Above() function in the expression.

Cheers,

Not applicable
Author

Is there any chance you can paste the expression as text on the forum? My company is in the process of purchasing Qlikview, so I'm using the personal edition until we everything is set-up (I can't open external docs).

Thanks,

Peter

Not applicable
Author

Hi Peter

Expression is :

=Sum(Sales) - Above(Sum(Sales))

Hope it helps,