Forum Discussion
Convert transactions to balance
- 9 years ago
Yes, I'd say the measure is the way to go here. It should work as desired in the chart if you take the date-field from your date-table and not from the transactions-table.
Link to file: https://www.dropbox.com/s/dc8budcqd68ogz4/PBI_CumTotalAllDates.pbix?dl=0
It looks as if you need a running total (or cumulative total). You should add a Date-Table and then use this for a measure in your data model:
Cumulative Quantity :=
CALCULATE (
SUM ( Transactions[Qty] ),
FILTER (
ALL ( 'Date'[Date] ),
'Date'[Date] <= MAX ( 'Date'[Date] )
)
)
Your desired report can then be created with a matrix .
For an explanation on how it works, pls check this: http://www.daxpatterns.com/cumulative-total/
Hallo all!
Yes, i need running total, that inlcudes all combinations SKU/Warehouse/Date.
And it's necessary, course i need to visualize a dynamic of stock for all days,
without that gaps, when there was no transactions:
Thanks for the M-code, that's absolutely new for me, and i'll try it:)
But maybe, there's a way to solve the problem thru the measure?
There's ADDMISSINGITEMS function - someone knows how's it works?