I have created an event program where one of the data elements is beneficiary code. The beneficiary code is a text data type. My use case says the same code can be entered several times and what I want is to create a program indicator to eliminate the repetitive appearance of the same data. Like using DISTINCT clause to count the code only once.
e.g.
From the above example, I should get 8, not 12 as a result because the beneficiary code is repeated in some cells.
I am wondering if any one form the community help me create the program indicator.
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:
Thanks Matthew! From Jim Grace’s comments in the Jira issue you shared, it has been back ported to 2.36.10 (released) and 2.37.5 (2.37.6 is the latest release). And, yes, 2.35.14 hasn’t been released yet so if you’re on 2.35, you’re right you’d need to wait.
I can confirm that this functionality does exist! Very much looking forward to testing and seeing how far I can take this use (for example, if I can concatenate values within the distinct (count()) expression.
Unfortunately this only works for Number fields—or at least I can say definitively that it does not work for text fields. Without string functionality there isn’t much value in this for my use case. Made a note on the ticket in hopes Text fields can also be included!