Sum of amount based on numbered list.

Options
subhashree
subhashree Member, ALL USERS Posts: 2 New Contributor

 

 

I have a numbered list, which has the same names (display names). These same name line items then have different child.

The values of the same name list items needs to be added up to only one list item which has the latest PO date in the same list.

 

For Example-

 

This is the source module that has the same parent names with different child names in it. Also the values of the same PO’s are differentiated in terms of the PO Creation Date.

 

subhashree_0-1580884934377.png

 

 

The destination module is:-

subhashree_1-1580884934380.png

 

Here the values needs to be added up. The values that are shown here are wrong. For the PO 53852328_1 which has a similar name but the values are different; hence the value for 53852328_1 should be 20+40= 60 for one PO and the 2nd should remain the same value depending on the PO Creation Date(here 1st one should remain same and the 2nd repeated PO should have the value of 60). I am trying to figure out how to get the solution. Any help or suggestions would be appreciated.

 

Thanks

 

Comments

  • Akshaykumar
    Akshaykumar Member, ALL USERS Posts: 2 New Contributor

    For the above case, I have a doubt

     

    The 1st PO - 5385328_1 has the amount = 10, the 2nd PO - 5385328_1 has the amount = 30.

    1st PO creation date is old & we are not worried about that, the 2nd PO creation date is new and I want to add the Amount from 1st PO to 2nd PO. So at the end 2nd PO Amount = 40. (The correction with respect to the screenshot).

  • Akshaykumar
    Akshaykumar Member, ALL USERS Posts: 2 New Contributor

    @AlejandroGomez  yes we both work together.

  • subhashree
    subhashree Member, ALL USERS Posts: 2 New Contributor

    @AlejandroGomez 

    The solution provided by you was for a flat list, and what we have is a hierarchical list; as mentioned below.

    subhashree_0-1580969667413.png

     

     

    Here, this is the source module which has the dimensionality as mentioned with the first 2 columns representing the hierarchy.

     

    subhashree_1-1580969667416.png

     

    This is the target module in which the first 2 columns represent the hierarchy. The 1st column is another hierarchy that roll up to P2 level.

     

    subhashree_2-1580969667417.png

     

    This is the expected data in the target module.