Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
d4rlie891
Contributor III
Contributor III

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.

Sum of Distinct Value.png

Thanks

Dmw

1 Solution

Accepted Solutions
vinieme12
Champion III
Champion III

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))

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.

View solution in original post

6 Replies
Anonymous
Not applicable

Try using aggr

Anil_Babu_Samineni

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

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
d4rlie891
Contributor III
Contributor III
Author

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

I also attach the sample data

Thanks !

vinieme12
Champion III
Champion III

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))

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
Anil_Babu_Samineni

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

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
d4rlie891
Contributor III
Contributor III
Author

ok thanks Vineeth. it works using this expression :

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