6 Replies Latest reply on May 10, 2013 12:47 PM by Joshua Milligan

# Sum of a group of counties

Hello,

In my spreadsheet, I have sales data for every county ( parish) for the state of Louisiana. I am wondering if it is possible to sum up and display this data by a custom Region, which is also defined in my spreadsheet.

Example:

PARISHREGIONSALES
Terrebonne3\$100,000
Lafourche3\$150,000
Assumption3\$125,000

My data is actually more complex than this - sales are broken down by item categories (office supplies, furniture, technology).

I would like to display the sum of the three sales figures, which should be \$375,000 on a map of Louisiana, labeled on the three parishes. So instead of drilling down my sales into categories or cities or zip codes, I actually want to drill up and see the total over a defined group of parishes. Any help is appreciated!

• ###### 1. Re: Sum of a group of counties

Knox,

Here is a workbook that demonstrates two possible solutions.  See screenshots below.  The workbook contains quite a bit of explanation, but I'd also be happy to answer any questions you might have!

Regards,

Joshua

Option 1: Two Views on a Dashboard

Option 2: Use Data Blending with Lat and Lon

• ###### 2. Re: Sum of a group of counties

One other possibility, if you simply want to show the regional total on each county, is to use a table calculation. I've included that in the attached workbook.

Regards,

Joshua

Option 3: Use a Table Calculation

1 of 1 people found this helpful
• ###### 3. Re: Sum of a group of counties

Thanks! That's certainly a step in the right direction. Option 3 was exactly what I'm looking for; however, I can't seem to get it to work.

• ###### 4. Re: Sum of a group of counties

Knox,

The trick with the table calculation is that I had to specify how it should be calculated.  I right-clicked the table calc field in the view, then selected "Calculate Along" --> "County".  That tells Tableau to do the calculation for all counties but any other discrete field such as Region will partition the calculation.  That means the calculation is summing for all counties, but it is done for each region.

Regards,

Joshua

2 of 2 people found this helpful
• ###### 5. Re: Sum of a group of counties

Hey that worked! I finally got it. Thank you so much!!

• ###### 6. Re: Sum of a group of counties

You're welcome!