8 Replies Latest reply on Sep 16, 2015 6:26 AM by Branched to a new discussion.

Replicating Excel's SUMIFS function

I'm trying to replicate the SUMIFS function from Excel in Tableau. Basically need to return the sum of all similar strings in a dimension field. For example, return the sum of all the values where category is listed as "age range"

• 1. Re: Replicating Excel's SUMIFS function

You will be able to do this by creating a calculation like this:

if [Category] = "age range" then

sum([Measure])

end

Cheers Kasper

• 2. Re: Replicating Excel's SUMIFS function

The "age range" has to be dynamic though.. that's just one of the options in the category field. So it would be "find all similar entries and return the sum of all of their values"

• 3. Re: Replicating Excel's SUMIFS function

if [Category] = "age range" OR [Category] = "string2" OR [Category] = "string3" then

sum([Measure])

end

Otherwise, could you please provide a demo workbook or try to describe the issue further?

• 4. Re: Re: Replicating Excel's SUMIFS function

See attached. I'm trying to replicate the "Category Impressions" column in Tableau.

• 5. Re: Re: Re: Replicating Excel's SUMIFS function

As Tableau is pivot-based, it would give the total sum of each category by dragging the Category dimension to your view.

Otherwise, if each row is unique a table calculation can solve the issue.

Please see the two tabs in the attached workbook.

• 6. Re: Replicating Excel's SUMIFS function

You're awesome!! Thank you!

• 7. Re: Replicating Excel's SUMIFS function Table calculation wont work during drilldown.

• 8. Re: Replicating Excel's SUMIFS function Table calculation wont work during drilldown.