@mussaenda I dont think there is straight forward way to do this but with some DAX measures I believe we can achieve this. Can you share sample data in excel via onedrive/google drive, remove any sensitive data.
You may drag the following calculated column to Rows.
Column = SUMX ( FILTER ( Table1, Table1[Grade] = EARLIER ( Table1[Grade] ) ), Table1[QTY] )
Hi @v-chuncz-msft ,
The calculated column might be correct but it is giving me this error:
A circular dependency was detected: Load/Unload[Column].
For the qty measure, here is my formula:
Stock Qty = CALCULATE([Total Carico Qty], FILTER(ALL('Date Table'), 'Date Table'[Date] <= MAX('Date Table'[Date]))) - CALCULATE([Total Scarico Qty], FILTER(ALL('Date Table'), 'Date Table'[Date] <= MAX('Date Table'[Date])))
Thank you for your help!