Hi All,
I have a dataset which has the following requirement :
1) Calculate New Delta = Original Delta + Delta ADJ
2) Apply filter if Delta ADJ < abs $20k then Delta ADJ and all other components in that row changes to 0
3) Total New Delta should be <$20k by reducing Delta ADJ threshold from $20k to $0 iteratively in a loop ($500 increments)
Managed to do steps 1 & 2 as it is straight forward. need help with Step 3.
Thanks in advance
Hey @Shahas,
I am not 100% sure what you want to have - but I have created a macro that iterativly subtracts 500$ until the 20k$ are reached and outputs how many iterations are done - This is of course also doable without an iterative macro - I guess Step 2 requires it to be iterative?
Hope this helps you.
Hey @FrederikE Thanks for the response.. Iteration part is required. I just need to have the sum of New Delta to be less than $20k, not just individual rows. In order to achieve that, i have to reduce the threshold which was set earlier, ie, Delta ADJ < abs($20k) can be reduced, like $19.5k, $19k etc till we have the sum of New Delta less than $20k.
Hope its clear.
Hey @Shahas,
Would this not only require the Sum before the iteration? I still don't get it.
Could you possibly share the data/dummy data + the required output?
@FrederikE after Delta ADJ threshold of $20k is applied, New Delta is calculated, which is the sum of Original Delta + Delta ADJ. After the calculation, sum of New Delta has to be calculated and it has to be below $20k. If not, threshold of Delta ADJ is reduced by $500k till the sum of New Delta reaches below $20k.
I can't, unfortunately, share the data. Hope this is clear
User | Count |
---|---|
19 | |
15 | |
13 | |
9 | |
8 |