The problem is, this funtion gives me the count of aggr() groups which meet the if condition. But I want to count the number of the dimension SDTL_REFERENZ_NR which are in the aggregated group.
If I put the dimensions SSL_TEIL_ID_NO_ZZZZ and EBEF_SSL_ID in a table and add a count on SDTL_REFERENZ_NR it gives me the values I want to count in the table. This should give me "8" as the result of my KPI. My current KPI gives me "2" because there are 2 aggregated rows.