5 Replies Latest reply on Nov 19, 2013 2:27 PM by Joshua Milligan

# Counting Overlapping Marks on a Map

I have what seems to be more difficult question than it appears at first glance. Here is the basic setup:

This is a grid of 200 randomly generated coordinates on a 5x5 grid (this is an example – the real thing is a lot less distinct). Obviously, there are overlapping coordinates:

And each mark has its own values:

The two questions are:

1. How do you get the tooltip to show the number of points underlying the mark?
2. How do you get the tooltip to show the total value of all the points on the same mark?

This is similar to a topic raised back in 2011, "Tooltips of overlaid marks indicated number of marks" but I wanted to see if there are more elegant solutions now, and if somebody can explain the table calculations involved making it possible.

Between this issue and frequency counts, I think these are the two more convoluted visualization problems that I would love Tableau to resolve through a feature addition.

Oh, and here's sample workbook:

• ###### 1. Re: Counting Overlapping Marks on a Map

Nope, your still pretty much stuck with that - here's a more detailed explanation:

Counting Overlapping Marks in Tableau « Data Driven: Data Analytics, Dashboard Design

• ###### 2. Re: Counting Overlapping Marks on a Map

Jeff,

Alex is right about overlapping marks.  However, you can arrange the view in such a way that you get a single mark for all the overlapping marks and then you can get the values you want.

Regards,

Joshua

• ###### 3. Re: Counting Overlapping Marks on a Map

Actually very true Joshua - the new multi-line label means you could even list out individual attributes of each mark with some clever calcs.

• ###### 4. Re: Counting Overlapping Marks on a Map

This is really interesting. Also seems like a more elegant solution than Alex's original version. Any disadvantages to using this approach? Does using MIN or MAX for the coordinate system change which marks are on top?

Thanks to you both!

• ###### 5. Re: Counting Overlapping Marks on a Map

Jeff,

The basic idea is X and Y are defining a single mark for each x/y coordinate -- eliminating the stacked marks and ensuring that there is only one mark for each X and Y location.  The MIN just makes sure the Xs and Ys don't get added together.

However, the view can be simplified even more by treating X and Y on Rows/Columns as continuous dimensions.  That keeps the axis, but defines the level of detail as a single mark for each distinct X/Y value.

Regards,

Joshua

Regards,

Joshua