Dear Community,
I would like to massage the data in order to derive the result as per screenshot below . The original sample data i have included in the excel below and it seem to be complex .

Would like to seek assistance if someone know how to build the solution to massage the complex data.
Many thanks for your help.