I am trying to recreate the below waterfall-type allocation and running into an issue having to use previous() functions across multiple dimensions.
I created an example below to recreate what I am trying to accomplish. In the example, I have a certain amount of dollars to spend each month that I need to allocate across various items. I can’t spend more than the amounts on the column header and each item has a certain cost associated with it.
I am able to accomplish it with the formula using excel below but when I try to do it in Pigment, I having to use previous on both the month dimension and the item dimension in order to ensure I don’t go over the capped quantity/cost.
Anyone have any suggestions?
