Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hey guys,
I am trying to calculate the average lead time per customer. We want to calculate this at order level (so every order has the same weight) but orders have multiple lines (Items).
If I make a simple table at Order level, the lead time will be correct since Qlik Sense will calculate that at order level (Case 1). Unfortunately, if I want to look at customer level (Case 2), Qlik Sense will calculate based on the total order lines (Order No+Item) and therefore the average will not be correct (the same order will be taken into account multiple times).
Can you please give me a hint on how I can display the correct average lead time at customer level? For calculating lead time I am using the Networkdays function.
Case 1:
Order no | Date Sent | Date Received | NetWorkDays |
1 | 23.01.2017 | 27.01.2017 | 5.00 |
2 | 23.01.2017 | 26.01.2017 | 4.00 |
3 | 23.01.2017 | 27.01.2017 | 5.00 |
4 | 20.01.2017 | 25.01.2017 | 4.00 |
5 | 20.01.2017 | 25.01.2017 | 4.00 |
Average Lead Time | 4.40 |
Case 2:
Order no | Item | Date Sent | Date Received | NetWorkDays |
1 | 10 | 23.01.2017 | 27.01.2017 | 5.00 |
1 | 20 | 23.01.2017 | 27.01.2017 | 5.00 |
1 | 30 | 23.01.2017 | 27.01.2017 | 5.00 |
2 | 10 | 23.01.2017 | 26.01.2017 | 4.00 |
3 | 10 | 23.01.2017 | 27.01.2017 | 5.00 |
4 | 10 | 20.01.2017 | 25.01.2017 | 4.00 |
5 | 10 | 20.01.2017 | 25.01.2017 | 4.00 |
Average | 4.57 |
May be this
Avg(Aggr(NetWorkDays([Date Sent], [Date Received]), [Order no]))