Forum Discussion
Accummulated total, but start from zero
If I understand your request correctly, you can simply create “SOH After Purchase” column by adding the “Purchase Quantity” column after the cumulative total.
SOH Pre =
CALCULATE (
SUM ( Table[Manufacturing Qty ] ),
FILTER ( Table, [Date] <= EARLIER ( Table[Date] ) )
) - Table[Units Sold ]SOH after =
CALCULATE (
SUM ( Table[Manufacturing Qty ] ),
FILTER ( Table, [Date] <= EARLIER ( Table[Date] ) )
) - Table[Units Sold ] + Table[Purchase Quantity]
Best,
Paul
Hi, the problem is that the purchase quantity, is a calculated quantity.
For example if the shortfall in units are 9, such as in line 2, the 9 units must be purchased.
My problem is to add these additional 9 units then back into the running stock on hand quantity.
- Anonymous6 years agoNot applicable
vrossouw
You are able to add the additional Purchase Quantity back to the running total by simple adding even it is calculated column.
I don't really get what do you mean, can you provide a sample pbix and show us the expected result in the columns.
Best,
Paul- vrossouw6 years ago
Helper III
Hi, I have saved the excel file in this downloadable link.
I try to recreate the below columns - highlighted in red on the file, in Power BI.
Purchase Prev Buy check end soh I appreciate your time.
Regards
- vrossouw6 years ago
Helper III
Hi, I have calculated the Purchase Qty outside of Power BI for now.