I am trying to create a calculated field for a visual that will show a ratio of defective units per total total units produced broken down by the defect type. I would like the denominator to show the total volume produced over all and not by the defect_type. I would like the numerator to calculate defective units broken down by the defect_type.
Here is my current calculated field:
sum({defective_units }, [{defect_type}]) / sum({total_units},[ ] )
I have also tried:
sum({defective_units }, [${visualDimensions}]) / sum({total_units},[ ] )
QuickSight allows me to save the calculated field, but once it is added to the visual I get the same error message for both: “The Level Aware Calculation (LAC) aggregate functions inside one visual aggregate functions should always share the same grouping key”
I understand the error message, so I am looking for other ways to get the same result. Are there any other ways to achieve this type of calculation?
Thank you.
For additional context, I got the numerator and denominator working as columns. I feel like it is so close to working!
We have not heard back from you regarding your question. We would still like to help. If we do not hear back in the next 3 days, we will archive the question
Hello @baramichelle ! Did David’s response answer your question?
We would still like to help answer your question, but we haven’t heard from you in a few days. If we do not hear from you in 3 days this topic will be archived.