Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Calculating sales contribution

Hi all,

I'm just starting out with QlikView, but I'm struggling a little to get into the syntax side of things (I'm happy enough pulling the data from Excel and SQL DBs). I have a small set of sales data and I want to calculate a weekly contribution percentage. So, for example in the table below I have the first three columns, but I can't work out how to calculate the fourth:

ProductWeek
Sales (£)
Contribution
11729%
21833%
31938%
121144%
22832%
32624%

I've used sum(sales)/sum(total sales) to get an overall contribution, but this isn't particularly useful. What am I missing?

Thanks!

Graham

1 Solution

Accepted Solutions
Not applicable
Author

Hi Graham,

You almost had it right. You need to use <Week> as qualifier to prevent using all sales, but only the sales of the corresponding week.

sum(Sales) / sum( TOTAL <Week> Sales)

HTH Jeroen

View solution in original post

2 Replies
Not applicable
Author

Hi Graham,

You almost had it right. You need to use <Week> as qualifier to prevent using all sales, but only the sales of the corresponding week.

sum(Sales) / sum( TOTAL <Week> Sales)

HTH Jeroen

Not applicable
Author

Perfect! Thank you

Graham