Need help - Using count distinct clause to eliminate repetitive data

Hi all,

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.


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 @fernando , you might want to follow (and upvote) this jira issue 5934 as distinct count d2 functions are not available (yet).

Hey guys - you can have a look at this thread - using custom aggregation type to count distinct values:

Hi @dhuser,

I have voted the issue.


Hi @Markus,

I can not access the link. I get the following message: ‘The page doesn’t exist or is private.’


H @fernando. seems like the topic was deleted by accident, I undeleted it. Can you see the topic now?

Hi @Karoline,

Yes, Now I can see the topic.

Thank you.