Calculation error

How do I fix the calculation

Hi @Vysh27 ,

If you would like to perform a calculation within an ifelse() statement, then you can do it in two ways. You can enclose your intended calculation, in this case it is ‘day 1 groups’ *1, in parentheses and that will allow your statement to work. Another way is to create an additional calculated field just for your intended calculation and then add that calculated field to your ifelse() statement. Moreover, I would refer to this resource for more information on ifelse() statements (Ifelse - Amazon Quick Suite).

Hope this helps!

I have tried to create a separate calculation , but still facing the same issue

Hi @Vysh27 ,

Apologies on my last response but I think I see what the problem is. This error usually comes up when a calculation is mixing fields that QuickSight is evaluating at different levels. In QuickSight, a calculated field has to be evaluated entirely at one level (row-level or aggregated), and ifelse() doesn’t change that behavior.

In this case, I would assume 'bt_broad_tag’ is being evaluated at the row level, while ’day_1_groups’ is being treated as an aggregated value. Because of that, my previous response will not be a solution as once a field is aggregated, it stays that way wherever it’s referenced.

I would recommend referring to this resource for more explanation on how to properly address this error (Finding solutions for mismatched aggregation errors in Quick Sight calculations - Learn / Technical Articles - Amazon Quick Suite Community). Hope this helps and let me know if you are still running into some problems!

Hi @Vysh27,

Just checking back in since we haven’t heard from you in a bit. I wanted to see if the guidance shared earlier helped resolve your question, or if you found a solution in the meantime.

If you still have any additional questions related to your initial post, feel free to share them. Otherwise, any update you’re able to provide within the next 3 business days would be helpful for the community.

Thank you

Hi @Vysh27,

Since I haven’t received any further updates from you, I’ll treat this inquiry as complete for now. If you have any additional questions, feel free to create a new post in the community and link this discussion for context.

Thank you