Hi,
I have a customer level dataset. I wish to count distinct customer IDs (grouped by a few fields in my visual), and then add another field that would find the % of customer IDs in each of the groups. For this, I believe I need to do something like:
Because distinctCountOver does not allow Post_Agg calculation, this formula is not working as distinct_count is aggregated field.
This is the error I keep getting:
Mismatched aggregation. Custom aggregations can’t contain both aggregated and nonaggregated fields, in any combination
I cannot do this calculation in my source query, to avoid double counting of customers when groupings change in the visuals. Is there any other way to achieve what I want? This is super frustrating as the same thing works absolutely fine with sum/sumOver
Please check this article. There is a section about handling Mismatched aggregation issues in there. See if you can resolve your issue using the details from this article.