Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

tcameron
New Contributor

Sum values if they are Distinct based on another field_name

Hello,

I'm trying to find the best place to find the correct syntax definitions for chart functions in the visualization level.

What I'm trying to do is Sum the number of values if for each distinct line of data, that is:

order_keycycles
12345
12345
12354
12365

The expected results for this data would be a total of 14 cycles.

I could count distinct cycles but I would only get 9 cycles. I need to count cycles based on the distinct(order_key), is this possible?

Cheers,

Toby

1 Solution

Accepted Solutions
devarasu07
Honored Contributor II

Re: Sum values if they are Distinct based on another field_name

Hi,

Yes, Try like below

Dimension:

Order_Key


Measure

aggr(sum(distinct cycles),order_key)


1.JPG

1 Reply
devarasu07
Honored Contributor II

Re: Sum values if they are Distinct based on another field_name

Hi,

Yes, Try like below

Dimension:

Order_Key


Measure

aggr(sum(distinct cycles),order_key)


1.JPG