Aggregate values in calculated fields

Ok, thank you very much.

Originally I thought it may be bc I’m trying to use the calculated field (column total) in a KPI, which only takes one field, but it won’t even let me create the calculated field before I create the visual. So pulling in all of the fields into my visual shouldn’t be the issue (yet).

This is the error from the calculated field that should recreate the table column total value. Sorry, it’s long bc I have a whole bunch of filters/parameters. The error is pulling in the values from the filters/controls currently set. My code actually contains the names of the parameters :

“Nesting of aggregate functions like DISTINCT_COUNT and COUNT(DISTINCT CASE WHEN SUMOVER(SUM(“edtr_visit”), “member_identifier”) >= 0 AND SUMOVER(SUM(“edtr_visit”), “member_identifier”) <= 100 AND SUMOVER(SUM(“urgcare_visit”), “member_identifier”) >= 0 AND SUMOVER(SUM(“urgcare_visit”), “member_identifier”) <= 100 AND SUMOVER(SUM(“office_visit”), “member_identifier”) <= 100 AND SUMOVER(SUM(“office_visit”), “member_identifier”) >= 0 THEN “member_identifier” ELSE NULL END) is not allowed.”