4 Replies Latest reply on Nov 1, 2012 8:00 AM by Alex Kerin

# Sum a distinct numeric field.

Hi, I am new to Tableau software.  I was wondering if there is a way to sum a distinct numeric field such as a paid amount.  The data I am using is on a line level and the paid field repeats per claim.  In order to get an accurate summation of the paid field, I need to sum a distinct amount.  Thanks!

Attached is dummy data I made that replicates the issue.  As of right now, it seems Tableau sums the Amt_Paid field on a line level.  What I need is a distinct summation based on claim level.  So, the total amt_paid field needs to be \$1,600. Thanks!

• ###### 1. Re: Sum a distinct numeric field.

If you could post a sample dataset possible in excel it would be helpful.

• ###### 2. Re: Sum a distinct numeric field.

Kevin,

Difficult to do this without changing the source data or being really careful...

2 options:

• In your source data, on a row level add the number of rowitems per claim, e.g. claim 11 has 5 rows, so add a column with nr_of_claimrows = 5. Then you can divide the total paid amount by the number of rows and then add them in your calculation
• Using AVG, MAX or MIN by showing the different claims as a dimension--> this is rather prone to error. See my attached screenprint

I hope this helps...

Best regards,

DErk

1 of 1 people found this helpful
• ###### 3. Re: Sum a distinct numeric field.

Thanks Derk.  I will give your solutions a try.

• ###### 4. Re: Sum a distinct numeric field.

You could also solve this through table calculations - see attached.

You have to be careful about partitioning. For example, the single value has Claims on the left, rev on the right, so that only the first row for each claim has an amount associated with it.

The sum has both on the right because we want to sum all single values. But you still have to set the partitioning for single value in the sum partitioning (via the drop down).

1 of 1 people found this helpful