Forum Discussion
Average stock
There's no measure yet. The calculation from this table is very difficult and must be: (stock quantity*number of days from the date in the line to the next date of product quantity update, in addition to the same calculation done before on the same product)/total number of days selected in the filter.
For example at the 6th line of the table I posted before the result would be: ((120*24)+((120+(-20))*36))/60
60 is the number of days filtered from 01/01 to 01/03
120 is the quantity of the previous step of the product
24 and 36 are the number of days to be weighted for the average
-20 is the stock quantity moved at the considered line
MINDBLOWING for me
Sorry but I still don't see the pattern here to create a Measure...
((150*24)+((150-20)*36)/60 ???
Show us what the result should look like in your Excel table?
- AGo10 years ago
Post Patron
I edited the previous message, there was a mistake on the first quantity. Thank you!
- v-qiuyu-msft10 years ago
Community Support
Hi AGo,
For this formula, ((120*24)+((120+(-20))*36))/60, does 60, 24 and 36 are static data? If not, what’s the logic to get them? Please clarify it.
Best Regards,
Qiuyun Yu- AGo10 years ago
Post Patron
60 is the number of days given by the difference of the filter max date and filter min date (filtered range of time)
24 and 36 are the number of days between two sequential stock record of the same product (in that case I chose product C and date range from 01/01 to 01/03)