Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

distinct of Sum

I am trying to find out how many distinct SUM of point each Nmae has

I am getting: Error in expression Nested aggregation not allowed  when trying : Count(DISTINCT(sum(Point)))

I tried various use of aggr but I have not yet found the solution.

Any idea?

for example for:

1.bmp

I would expect to see:

1.bmp

1 Solution

Accepted Solutions
Anil_Babu_Samineni

May be this?

Count(Aggr(Sum(TOTAL <Date> Point), Date, Name))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful

View solution in original post

14 Replies
vishsaggi
Champion III
Champion III

You might want to use like

= Count(Aggr(Sum(DISTINCT Point), Name))

Anil_Babu_Samineni

May be this?

Count(Aggr(Sum(Point),Name))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Anonymous
Not applicable
Author

does it work for you?

for me it does not, it gives 2 for A and 1 for B, should give 1 for both A and B

Thanks

Anonymous
Not applicable
Author

no, it gives 1 and 1 in this case but also when not true

vishsaggi
Champion III
Champion III

Sorry did not check your output. I have updated the expression. LIke

= Count(Aggr(Sum(DISTINCT Point), Name))

Anonymous
Not applicable
Author

no for example for

LOAD * INLINE [

    Name, Point, Date

    A, 2, 01/01/2018

    A, 400000, 01/01/2018

    A, 2, 02/01/2018

    A, 1, 02/01/2018

    A, 2, 05/01/2018

    A, 4, 05/01/2018

    B, 6, 01/01/2018

    B, 6, 01/01/2018

    B, 6, 02/01/2018

    B, 6, 02/01/2018

    B, 7, 05/01/2018

    B, 600000, 05/01/2018

];

also gives 1 and 1 ?

vishsaggi
Champion III
Champion III

What is your expected output for this data?

Anonymous
Not applicable
Author

A = 3 as  over the period there were 2 distinct Sum 400002 ,3, 6

B = 2  as  over the period there were 2 distinct Sum 12 and 600007

Anil_Babu_Samineni

Can you show image after use this?

Count(DISTINCT Date)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful