Can anyone please help me on this
Your book has so many fields and so many calculated fields as well.
Plus your logic seems complicated enough.
Unfortunately, I don't think this community can support this kind of complicated request.
It is too much time consuming for us to try.. (My rough assumption is more than 10 hours)
Actually first of all, your data structure is not Tableau-oriented and I cannot judge where I can start. (I mean it's much easier to start over from the scratch)
I recommend that you start from here.
This requires the re-build (start over) of the workbook from the beginning though.