7 Replies Latest reply on May 9, 2016 7:30 PM by Mark Smith

# Scatter plots when trying to sum "hidden" data - SUM? TOTAL?

I think this is very simple, but I think my lack of understanding is keeping me from understanding a bunch of things about Tableau

I am having trouble trying to understand how to keep sums when the data is the "visible" at that level. Not sure if I should use a SUM, TOTAL, WINDOW, etc. Or if it is something much simpler!

Goal:

Create scatter plot of

X-axis: total revenue from deal

Y-axis: number of units purchased of only a single selected product ("P")

P: a parameter (I think should be a parameter, but maybe just a filter instead?) where the user can select from Product 1, 2, 3 or 4

Data

I have a large number of customers and would like a scatter plot that includes all of them.

As an example (attached) the data is

Customer/State/Product/Revenue/Units

 Customer A California Product 1 10 1 Customer A California Product 2 20 3 Customer A California Product 3 0 0 Customer A Washington Product 1 30 4 Customer A Washington Product 2 25 8 Customer A Washington Product 3 35 10

What I could like is to when I select "Product 1" I would like the point for this customer to be:

Point: (\$120, 5)

When I select "Product 2"

Point: (\$120, 11)

When I select "Product 3":

Point: (\$120, 10)

Of course, when they select each product above there will be points for all of the customers I have (so there will be hundreds of points).

I've attached a file where I try to do this, but can't quite figure it out.

I can get the table to work, but then when I try to remove the "Product" from the table (or a scatter), the units always revert to 0.

Any help would be great. Thank you!

• ###### 1. Re: Scatter plots when trying to sum "hidden" data - SUM? TOTAL?

Hi Mark

revenue* units as calculation1 and moved to column shelf

• ###### 2. Re: Scatter plots when trying to sum "hidden" data - SUM? TOTAL?

Hello Mark - I think you are looking for this.

Created a new Calculated field:

Thanks,

Manideep

• ###### 3. Re: Scatter plots when trying to sum "hidden" data - SUM? TOTAL?

Thanks Manideep.

This is very close! The one portion that isn't quite correct is that points should be, for the Product 2 example,

Customer A: 11, 120

Customer B: 2, 50

So the revenue (y-axis) is the revenue for just that single customer (as opposed to total revenue across all customers).

Your file does get the units correct, but it is now summing all revenue across both customers, whereas I am trying for each customer to have its own revenue on the y-axis. Does that make sense?

So your file shows for Product 2:

Customer A: 11, 170

Customer B: 2, 170

Thank you Manideep-

• ###### 4. Re: Scatter plots when trying to sum "hidden" data - SUM? TOTAL?

Hello Mark - Changed the Formula of Total Revenue and you got your answer

Thanks,

Manideep

• ###### 5. Re: Scatter plots when trying to sum "hidden" data - SUM? TOTAL?

Thank you I really appreciate the assistance Manideep. And so timely it has been a lot of help

2 questions:

1. How can I learn more about the function you used? I never would have figured that out on my own. Basically what it is called, how to use it, etc.

2. If I would like to never see one or more products in the filter, such as I never want the user to be able to select "Product 2", but I still want Product 2's revenue to be included in the total, is there an easy way to do this? Basically if I just want to "hide" Product 2 in the filter (leaving it unchecked).

Thanks again much Manideep-

M

• ###### 6. Re: Scatter plots when trying to sum "hidden" data - SUM? TOTAL?

Hello Mark - The filter is only working for  Units, so your problem is solved.

Have a look in the following Link

This is called Level of Detail (LOD)