Forum Discussion
Matthew_BR
3 years agoFrequent Visitor
Formula Cascade Referencing Itself
Hi, I have a spreadsheet with the name of items, the size of deliveries available by date, the demand in the month and an index column I'm trying to create a cascading column that subtracts the de...
- 3 years ago
I managed to solve it, in case someone in the future also has this doubt, I used this formula as a solution
Cascata = VAR Delivery = Table[Delivery] VAR Demand = Table[Demand] VAR Previous Index = CALCULATE( SUM(Table[Delivery]), FILTER(Table[Index] < EARLIER(Table[Index]) RETURN IF(Table[Index] = 1, Demand - Delivery, Demand - Previous Index - Delivery)Instead of referencing the column itself, I used the variable and filter formulas to sum the values of previous deliveries. Then I subtracted from the total demand value
Matthew_BR
3 years agoFrequent Visitor
I managed to solve it, in case someone in the future also has this doubt, I used this formula as a solution
Cascata =
VAR Delivery = Table[Delivery]
VAR Demand = Table[Demand]
VAR Previous Index = CALCULATE(
SUM(Table[Delivery]),
FILTER(Table[Index] < EARLIER(Table[Index])
RETURN
IF(Table[Index] = 1, Demand - Delivery, Demand - Previous Index - Delivery)
Instead of referencing the column itself, I used the variable and filter formulas to sum the values of previous deliveries. Then I subtracted from the total demand value