6 Replies Latest reply: Mar 14, 2017 4:12 AM by Darmawan Suria

# How to Get Sum or Total of Distinct Value

HI,

Anyone Can Help me, how to create a set Analysis for this case :

I want to create a set Analysis to get the Sum of Count Distinct Value ->112656.

I tried to create a set Analysis but result is 6,305.

Thanks

Dmw

• ###### Re: How to Get Sum or Total of Distinct Value

Try using aggr

• ###### Re: How to Get Sum or Total of Distinct Value

Image showing Simple Distinct. But, KPI seems Total keyword(Don't required to get the same). Can you cross check/ Copy paste the expression. or else you may share sample to get it

• ###### Re: How to Get Sum or Total of Distinct Value

This is the expression : Count({\$<MONTHYEAR = {"\$(=max(MONTHYEAR))"}>} Distinct JOB_MEM_NAME).

I also attach the sample data

Thanks !

• ###### Re: How to Get Sum or Total of Distinct Value

What are the Dimensions here, Can you tell us MONTHYEAR. How you are taken this?

• ###### Re: How to Get Sum or Total of Distinct Value

Your KPI object is showing correct distinct count, your table is showing you a sum of rows

if you want to match the same, try below

=sum(AGGR(  COUNT(....), DAY))

• ###### Re: How to Get Sum or Total of Distinct Value

ok thanks Vineeth. it works using this expression :

sum(AGGR(COUNT(Distinct {\$<MONTHYEAR = {"\$(=max(MONTHYEAR))"}>} JOB_MEM_NAME), DAY))