Hi,
I want to get average of daily inventory count per category in data table visualization.
Below is a simple case where we have an inventory of two categories of items.
Blank in out date means it's still in inventory
ID | Category | In date | Out date
01 | A | 2018/07/01 | 2018/07/03
02 | A | 2018/07/01 | 2018/07/05
03 | A | 2018/07/03 | 2018/07/04
04 | A | 2018/07/03 |
05 | A | 2018/07/04 | 2018/07/05
06 | A | 2018/07/05 |
07 | B | 2018/07/01 | 2018/07/02
08 | B | 2018/07/01 | 2018/07/05
09 | B | 2018/07/03 | 2018/07/05
10 | B | 2018/07/04 |
11 | B | 2018/07/04 | 2018/07/05
12 | B | 2018/07/04 |
I am able to get below data table visualisation
Category | Date | Count
A | 2018/07/01 | 2
A | 2018/07/02 | 2
A | 2018/07/03 | 3
A | 2018/07/04 | 3
A | 2018/07/05 | 2
B | 2018/07/01 | 2
B | 2018/07/02 | 1
B | 2018/07/03 | 2
B | 2018/07/04 | 5
B | 2018/07/05 | 2
But I want to get average of daily inventory count as shown below.
Category | Average
A | 2.4
B | 2.4
How can I get this in data-table?