Hi there @LCaynar and @Matthew_Boddie ,
There was a slight mixup in the expression syntax above. When using te “CUSTOM” aggregation type, you would have to insert the aggregation keyword around the expression like this:
count(distinct #{dataElement})