Check in the attached...
The sheet Final View should give you the expected results.
The sheet ValidateData will help you understand the different calcs (mc) involved.
Tableau One_v10.4(mc).twbx 82.6 KB
Thank you Michel. This is exactly what I needed. Validation sheet is of great help to understand the calculation and approach to solve a problem in tableau. Thank you.