Qlik Community

Qlik Sense App Development

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

callan_dooley
New Contributor

Sum fucntion not counting values which are the same

Hello,

I was wondering if you guys could help.

Below is a table with groupings. The value highlighted in yellow is the totals field of all the values in red.

The only issue is the totals doesn't count all three of the same values (In Blue) it only counts one.

Here is my function. - sum(distinct{<[DG.class]={1}>+<jobnum={jobnum}>}[DG.uomactqty])


I believe its to do with the 'Distinct' but i need this as otherwise my figures (In red) are not correct.

Any Ideas?

Capture.PNG

1 Reply
callan_dooley
New Contributor

Re: Sum fucntion not counting values which are the same

I have tried using an if function like below.

if( jobnum="jobnum",

    sum(distinct{<[DG.class]={1}>+<jobnum={jobnum}>}[DG.uomactqty]),

    'test'

)


but what would the second part of the function be( the test part) i need it to sum all the below values. (in red)

Capture.PNG

Community Browser