Forum Discussion
Giancarlo1977
2 years agoFrequent Visitor
Cumulative subraction in Column
Hi, I am looking for a formula that should give me the result as per table below in last column "Cumulative remaining stock" Country serial number Item Number Concatenate QTY Item Numb...
- 2 years ago
Hi Giancarlo1977,
You could try such a calculated a column:
Here's the code in plain text for convenience:
Cumulative remaining stock = VAR CurrentSelection = [Concatenate] VAR CurrentSN = [serial number] VAR Delta = SUMX ( FILTER ( 'Table', [Concatenate] = CurrentSelection && [serial number] <= CurrentSN ), [Qty Item Required for each serial number] ) RETURN [QTY Item Number in stock] - DeltaBest Regards,
Alexander
barritown
2 years agoSolution Sage
Hi Giancarlo1977,
You could try such a calculated a column:
Here's the code in plain text for convenience:
Cumulative remaining stock =
VAR CurrentSelection = [Concatenate]
VAR CurrentSN = [serial number]
VAR Delta = SUMX ( FILTER ( 'Table', [Concatenate] = CurrentSelection && [serial number] <= CurrentSN ), [Qty Item Required for each serial number] )
RETURN [QTY Item Number in stock] - Delta
Best Regards,
Alexander