I've been scratching my head on this for days but can't find how to do it:
I have a file with sales transactions (monthly) and initial stock of each product.
I want to calculate the monthly stock level for each product. The formula would be, for each product reference: [Initial stock] - Running_Sum[Quantity Sold]. But that LOD doesn't work.
In the attached workbook, I did, for each reference:
- calculate and display initial stock (ATTR([Total Delivered]))
- running sum of monthly sales (RUNNING_SUM(SUM([QTY])))
- finally: I 'm trying to calculate the difference with a (LOOKUP(SUM([Total Delivered]),0)-LOOKUP(RUNNING_SUM([QTY])),0)) DOESN'T WORK.
Can someone help me on this please?
Thanks a lot.
I solved it by updating the calculation to :
ATTR([DELIVERED TO SHOPS])-RUNNING_SUM(SUM([QTY]))
Become a Viz Whiz on the Forums!
Support the Community and master Tableau.
Retrieving data ...