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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
maxime66
Creator
Creator

Sum distinct by customer

Hi Qlikers.

I would like to get in the total line of the graphic attached 5 products (and not 7)

I tried Aggr stuff but it removes some lines ( i need to keep all the 4 rows displayed)

i also tried "sum( distinct [Nb product] ) " but  it make distinct on customer 23 and 50.

any ideas ?

thanx

Labels (1)
1 Solution

Accepted Solutions
sunny_talwar
MVP
MVP

May be this

=If(Dimensionality() = 0, Sum(Aggr(Sum(DISTINCT [nb product]), customer)), Sum([nb product]))

View solution in original post

3 Replies
sunny_talwar
MVP
MVP

May be this

=If(Dimensionality() = 0, Sum(Aggr(Sum(DISTINCT [nb product]), customer)), Sum([nb product]))

maxime66
Creator
Creator
Author

whaoo , thanks Sunny.

What is Dimensionality ? works very fine !!

sunny_talwar
MVP
MVP