Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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
Anonymous
Not applicable
Author

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