Good Morning ALteryx ACE/Alteryx Lovers
Business Requirement :
I have a Profit and loss data which is coming from Oracle Database. In that Data , we have to perform management level mapping .In other words, how senior management manages their PnL for their respective Business Units.The Challenge is oracle data doesn't have mapping and we need to ingest the mapping from outside via a mapping table.
I am facing challenge in mapping my final data with other mapping Table. Can some one please help me getting the Desired output:
Mapping Table :

Actual data

Expected Output

For example :
In our actual Data , we have
ID 1= $C and RC Level 1 = Corporate - So L1 Member - SAM
Note 😘L1 member will always be SAM irrespective of ID/Level. This is highest level of management
ID 2= $CA and RC Level 2 = Corporate Audit - So L2 Member - ALICE
ID 3= $CAA and RC Level 3 = Corporate Advisory - L3 Member - JACKY
Point to be Noted :
If you notice Row 4 of Actual Data , we don't have any value in ID 3 and RC_Level_3, but we do have value in ID4 and RC_LEVEL_4
ID 1= $C and RC Level 1 = Corporate - So L1 Member - SAM
ID 2= $M and RC Level 2 = Managing Fee - So L2 Member - ALICE
ID 3= NULL and RC Level 2 = NULL -
So For L3 Member - It will look for the next mapping and put it into L3 Member
ID 4= $SA and RC Level 4 = Service Fees - So L3 Member - JOHN
In my actual data ,we have 40 members and 70 ID's so We cannot hardcode data by using IF Else condition, we are looking for a dynamic approach which gives us the desired output. In addition to that , People do move from BU to another BU or may move out of organization. We are getting this mapping table in every start of month . Hope this make sense .
Thanks in advance,
Regards,
Rajeev