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: 
cjliew
Contributor III
Contributor III

Qlik Sense sales previous year comparison

Hi, I would like to ask how can I generate the "Div." and "Div. (%)" based on "Quarter 1"? 

 
Year Quarter 1  Div. Div. (%)
2012           100.00                  -  0.0%
2013           200.00         100.00100.0%
2014           175.00-          25.00-12.5%
2015           225.00           50.0028.6%
2016           250.00           25.0011.1%
Labels (1)
1 Solution

Accepted Solutions
TimvB
Creator II
Creator II

Div: Sum(Field) - Above(Sum(Field), 1, 1)

Div (%): (Sum(Field) - Above(Sum(Field), 1, 1)) / Above(Sum(Field), 1, 1))

View solution in original post

4 Replies
TimvB
Creator II
Creator II

There are many options to compare the sales of this year to last year. For example, you could use a table with the following:

Table:

Dimension: any sales related (product, department, sales employees, etc.)

Measures: Total Sales LY, Sales LYTD, Sales YTD, Difference YTD-LYTD, Grow percentage (LYTD-YTD)/LYTD, etc.

 

Line chart:

X-axis dimension: time related such as month, quarter, week.

Measures: sum of sales of last year (red) and the sum of sales this year (blue). 

Bar chart:

Dimension: any sales related dimension (product category, etc.)

Measures: sum sales LYTD (red) and sum sales (YTD) blue.

 

I hope this gives you some inspiration.

cjliew
Contributor III
Contributor III
Author

Hi TimvB, sorry maybe my question is not clear enough. Maybe I should ask, how to generate the "Div" and "Div (%)" based on the Quarter 1 data.

TimvB
Creator II
Creator II

Div: Sum(Field) - Above(Sum(Field), 1, 1)

Div (%): (Sum(Field) - Above(Sum(Field), 1, 1)) / Above(Sum(Field), 1, 1))

cjliew
Contributor III
Contributor III
Author

Thanks a lot TimvB, it does resolved my problem.