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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
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

1 Solution

Accepted Solutions
sunny_talwar

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

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