Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

zhenjie911
New Contributor

How to sum by distinct item and not by line?

Hi all, as my excel data I am trying to show distinct purchasing document (PD) and then the sum of that order quantity of that particular PD. Then the sum will be categorize as belong to Below 3,001, Between 3,001 - 10,000, Between 10,001 - 30,000, and Above 30,001.

I am able to Count(Distinct(Purchasing_Document)) for Total Number of PO. For categorizing, I am confused as it only detect each line. By right, supposed 1450+8480+22625+6380 = 38,935 and belong to Above 30,001 and count as 1.

This is how I come up with the category.

1 Solution

Accepted Solutions
niclaz79
Contributor III

Re: How to sum by distinct item and not by line?

Hi,

You need to use Sum(ORDER_QUANTITY) to avoid the splitting of lines. The value will then be summed over the selected dimension in this case Vendor Name.

2 Replies
niclaz79
Contributor III

Re: How to sum by distinct item and not by line?

Hi,

You need to use Sum(ORDER_QUANTITY) to avoid the splitting of lines. The value will then be summed over the selected dimension in this case Vendor Name.

zhenjie911
New Contributor

Re: How to sum by distinct item and not by line?

Ermm okay . I've done that earlier while trying it. Still don't get what I need.

Same expression but differet outcome. Why??