Ok so here is a solution for you.
The heavy lifting is done in Power Query, where I added a column called PrevDate to the Stock movements. Know that this was based on the fact that you had a single Quantity for each Product and Date (if you have multiple transactions, you can use Power Query’s Group by to create this).
You can go over the Steps in the Advanced Editor.
Did some modelling while I was at it…
.
And what was left, two simple measures:
Quantity by Product =
SUM( 'Products On Hand'[Quantity] )
# of Days with no Qty change by Product =
DATEDIFF( SELECTEDVALUE( 'Products On Hand'[PrevDate] ), SELECTEDVALUE( 'Products On Hand'[Date] ), DAY ) -1
.
With this result:
Here is my sample file. eDNA - Quantity change (PQ solution).pbix (114.1 KB)
I hope this is helpful.