6 Replies Latest reply on Dec 19, 2017 8:36 PM by Shinichiro Murakami

# Distinct Sums

I cant figure out our to do a distinct sum in Tableau. Was hoping Tableau would have an equivalent to Excel's SUMIFS but can't seem to find it. My data looks like this below, where we have transactional data for each customer and their purchases. I want to sum the cost of all their purchases, so Geoff would be \$2,055, John \$634 etc.

• ###### 1. Re: Distinct Sums

Attached is data to work with

• ###### 2. Re: Distinct Sums

Hi Elie

That's the simplest calc and I don't understand where you have trouble.

Thanks,

Shin

• ###### 3. Re: Distinct Sums

If you are looking for sum for each customer like this, then use LOD:

• ###### 4. Re: Distinct Sums

I agree with Shin,

it's direct requirement.

• ###### 5. Re: Distinct Sums

I should have been more clear with my intentions.

What I need is a calc that groups the totals into four groupings eg: Less than \$100, \$100-\$199, \$200-\$299, More than \$300 etc.

But I have done the following calc:

IF SUM([Value (DG&S)]) < 500 THEN "Less than \$500"

ELSEIF SUM([Value (DG&S)]) >= 500 AND SUM([Value (DG&S)]) < 1750 THEN "\$500-\$1,750"

ELSEIF SUM([Value (DG&S)]) >= 1750 AND SUM([Value (DG&S)]) < 3000 THEN "\$1,750-\$3000"

ELSEIF SUM([Value (DG&S)]) >= 3000 THEN "More than \$3,000"

ELSE ""

END

• ###### 6. Re: Distinct Sums

Hi Ellie,

In that case, follow below steps.

Regards

Shin