I have a module named AAA like this:
| lower | upper | Payout rate | total invoice | status |
tranche 1 | 0 | 500 | 0% | $ 850 | 0 |
tranche 2 | 500 | 900 | 2.5% | $ 850 | 1 |
tranche 3 | 900 | 1200 | 3.0% | $ 850 | 0 |
tranche 4 | 1200 | 1500 | 3.5% | $ 850 | 0 |
And another module named BBB:
| Quantity | Values $ | Rate Applied |
product 1 | 48000 | $ 250 | ? |
product 2 | | $ 210 | ? |
product 3 | | $ 200 | ? |
product 4 | | $ 190 | ? |
TOTAL | | $ 850 | |
I want to put in list item of BBB “Rate Applied” a formula that take the value of “Payout Rate” of module AAA based on the status (only one is <> 0).
For example, if status is checked in “tranche 2” the “Payout rate” is 2.5%, so the value of “Rate” in BBB should be 2.5% (in all rows).
Which formula do it?
Thanks in advance.