Hello @Atul, welcome to the QuickSight community!
In order for me to guide you towards a solution, it would be super helpful if you are able to create a demo version of this analysis in QuickSight Arena. This will allow me to visualize the calculated fields you are wanting to build and create a solution in a QuickSight environment.
I don’t entirely understand how your data is set up which makes trying to debug the issue you are running into a little difficult. With some more information, I can help guide you further!