Hi,
Please find the solution for the same, If the scenario is like this.
1st Condition – I have 2 Dimension – Customer Code and PH, If Customer Code is null please
Ignore by is null function in code or expression.
2nd Condition – How many PH have one reason code and if the PH consists single Reason Code, then check the Net Collectable Amt. is less then (RA1 or RA2), and if the condition is true, then assign same Net Collectable Amt. to (RA1 or RA2) where ever Reason Code is available for the Reason Amount.
For Example : -
PH | RC1 | RC2 | RA1 | RA2 | Net_Collectable |
INGJVANZ908 | 2 | - | 2.6294 | - | 0.0708 |
Here for the same PH have single Reason Code 1 and Also single Reason Amount, But If we will check the net Collectable, It is less than from the Reason Amount 1. Then we have to assign that Net Collectable amount to Reason Amount 1.
i.e. Output
PH | RC1 | RC2 | RA1 | RA2 | Net_Collectable |
INGJVANZ908 | 2 | - | 0.0708 | - | 0.0708 |
Please find the attached excel for the same.
Thanks
A K