Welcome to the QuickSight Community! It is great having you here!
Is it possible to share the JSON with some mock up data and the calculation you are performing so I can test in my side?
Also, have you tried QuickSight Arena? Here, you can build a dashboard with sample data and your calculations and then the community can help you a lot easier looking at the same issue.