Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Partner
Partner

Sum Distinct problem

Hey,

I have a problem with this formula:

sum(distint Quata)

The dimension in the tabel is Salesperson and the problem is that we have two the same Quata's

Example:

SalesP1 650
SalesP2 650

If you take the formula sum(Distinct Quata) for this example you get 650 as total...

How can i solve this?

greetings

1 Solution

Accepted Solutions
Not applicable

Sum Distinct problem

Hi,

My suggest:

SUM(TOTAL AGGR(SUM(DISTINCT Quata), Salesperson))

3 Replies
Not applicable

Sum Distinct problem

Hi,

My suggest:

SUM(TOTAL AGGR(SUM(DISTINCT Quata), Salesperson))

Not applicable

Sum Distinct problem

That's right, because of DISTINCT. It group the data first and does the SUM() after that. Use sum(Quata) to get 1300.

Partner
Partner

Sum Distinct problem

This is the correct formula but thanks for the help!

=

SUM(AGGR(SUM(DISTINCT Quata), [SalesPerson],Quarter))