5 Replies Latest reply on Sep 15, 2016 12:06 PM by Tracy Rodgers

# Tableau, fix your doc, or The Curious Case of Peter Fuller

Reading this Tableau doc - you want to do the same, to follow my post - I got stuck on this paragraph

What happened to Peter Fuller, formerly in second place? The goal was to show the top 10 customers in New York City, but now the view is actually showing the top 10 customers overall. The problem is that top and general dimension filters are applied simultaneously—they are both dimension filters, and they appear in the same place in the Tableau order of operations:

Ok, the "simultaneously" bit has got to mean that Tableau is getting the intersection of Set A - "Top 10 Customers" and Set B - "NYC Customers". (Let me call it Set C - "Top 10 Customers, Who Also Live in NYC"). But how would that explain the disappearance of Peter Fuller? If Peter Fuller bought more than Caroline Jumper, and Caroline made it to Set C, Peter should be there too?

Here are the top NYC customers. (This is the table equivalent of the doc's first viz).

And here is Set C. (This is the table equivalent of the doc's second viz).

Why are Peter Fuller, Tom Boeckenhauer and Keith Dawkins not on the last list while Caroline is?

Come to think of it, how did everyone except Tom Ashbrook get on the list, when they are not among top 10 customers?

Oh, and why does Tom Ashbrook have sales of \$14k here, when it was \$13k before?

Here's the answer to the last question

Ah, the worst-practice of using people's names as identifiers... Tableau's behavior is something to think about, but later.

I don't see answers to the earlier two questions, and thus do not understand the doc's explanation about "top and general dimension filters [being] applied simultaneously"

Does anyone?

• ###### 1. Re: Tableau, fix your doc, or The Curious Case of Peter Fuller

Hi Dimitri,

You wrote:

Ok, the "simultaneously" bit has got to mean that
Tableau is getting the intersection of
Set A - "Top 10 Customers" and Set B - "NYC Customers".
(Let me call it Set C - "Top 10 Customers, Who Also Live in NYC").

The important (missing) bit is (Overall), so the reading could be:

Set A - "Top 10 Customers (Overall)". Set B - "NYC Customers".

Set C - "Top 10 Customers (Overall), Who Also had purchased in NYC".

The resulting Set C consists of only 5 Customers, and Peter Fuller is not among them.

Though he is ranked second -- but only if NYC Sales come into play.

Please find the attached (version 10).

Hope it could help a bit.

Yours,

Yuri

• ###### 2. Re: Tableau, fix your doc, or The Curious Case of Peter Fuller

Yuri, there is no confusion about "Top 10 Customers Overall" vs. "Top 10 Customers". They mean the same thing, and my third screenshot lists top customers overall.

Second, I don't have Tableau 10, and cannot open your .twbx, but if what you do there is create those Sets A and B - as Tableau sets - then create their intersection (I too get 5 people, listed below), and don't find Peter Fuller there, then - so what? My point is that the set on my second screenshot, which Tableau doc suggests is the intersection Set C - well, that's my reading of "simultaneously", etc. - isn't, in fact, that intersection. (And so I ask what it is).

Incidentally, your definition of Set C departs from my wording in another regard, when it says "who also had purchased in NYC". An important point, since in this dataset, one-to-many customer-to-city relationships (across purchases) seem to be very common. If one adds City to Rows shelf above, each customer has multiple cities!

• ###### 3. Re: Tableau, fix your doc, or The Curious Case of Peter Fuller

Thinking in terms of pseudo-queries could be productive. E.g.,

Set A

with c as

(

select customer, sum(sales) as sales

from data

group by customer

)

select top 10 customer

from c

order by sales desc

Set B

select distinct customer

from data

where city = 'New York'

Then you could construct the intersection, but also this thing

with c as

(

select customer, sum(sales) as sales

from data

where city = 'New York'

group by customer

)

select top 10 customer

from c

order by sales desc

Methinks that's what Tableau did for the second screenshot.

• ###### 4. Re: Tableau, fix your doc, or The Curious Case of Peter Fuller

Hi Dimitri,

with c as

(

select customer, sum(sales) as sales

from data

where city = 'New York'

group by customer

)

select top 10 customer

from c

order by sales desc

The bold WHERE... above is essentially

a Context filter as implemented in Tableau.

Yours,

Yuri

• ###### 5. Re: Tableau, fix your doc, or The Curious Case of Peter Fuller

Thanks for bringing this up Dimitri. I've sent this thread on to our Documentation team to see if it can be laid out a little more clearly.

-Tracy

1 of 1 people found this helpful