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.

e.g.
image

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.

Thanks

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:
https://community.dhis2.org/t/program-indicator-for-count-of-unique-distinct-values/37946/9

Hi @dhuser,

I have voted the issue.

Thanks

Hi @Markus,

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

Thanks