Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

cancel
Showing results for 
Search instead for 
Did you mean: 
robinwiman
Creator
Creator

How to calculate units sold divided by weeks since first unit sold?

I am trying to calculate a KPI that will tell me, on average, how many units I sell per week.

I have my current Inventory, and how many units that are sold.

Here's what I want to do:

Units sold/number of weeks since first sold unit.

Units sold = Fsgantal

Honestly, I have no idea how to do this. I'm thinking some sort of RangeSum formula.

Labels (1)
2 Replies
arpitkharkia
Creator III
Creator III

Can you share some sample data?

robinwiman
Creator
Creator
Author

Since I am quite lost in this calculation What I have now is a huge dataset with figures like this:

 

Item Number2019w012019w022019w032019w042019w05Average Sale per Week
4030-450-56002031.6667
4030-451-55567003.6
3025-654-28426413.4

 

Here's how it looks if I just pull the raw data. I want to recreate the column "Average Sale per Week", but only count from the week where the first sale occurred. So For row 1, that would mean to calculate (2+0+3)/3 = 1.6666667

For the second row, it would take all figures into account, even if the item didn't had sales for all weeks, it was still "active" in our assortment. (5+6+7+0+0)/5 = 3.6

The third row, should account for all weeks, since it had sales on each separate week.

In my application the weeks are labeled "YearWeek" and Item Numbers are labeled "itemno". The units, or data itself, is labeled "Fsgantal".

I hope this helps, sorry I can't post any thought out formulas yet, I haven't gotten that far.