12 Replies Latest reply on Dec 17, 2013 8:20 AM by Patrick Calnan

# Problem with scatter mean plot

Hi,

I am trying to replicate the following viz by Andy Cotgreave but I having a very basic issue

http://community.tableau.com/docs/DOC-5236

The table calculation for the Window_Avg(Sum(Demand)) does not appear to be working. I know that there is a really simple solution for this but I can not see it.

• ###### 1. Re: Problem with scatter mean plot

HI Patrick

I'm stumped - both workbooks seem to be set up exactly the same. Sorry - I can't help you - I can't see why mine works and yours doesn't.

Andy

• ###### 2. Re: Problem with scatter mean plot

Hi Andy,

In a perverse way that fact that you are stumped gives me great comfort. I thought it was my lack of knowledge of table calculations that was holding me back

Patrick

• ###### 3. Re: Problem with scatter mean plot

shared problems are much easier to bare. I checked through all your calcs and they do seem to be all exactly the same as mine.

• ###### 4. Re: Problem with scatter mean plot

Hi Andy

If you right click on your Profit and Sales pills the description is a Continuous Measure (Sum) and yet it doesn't label the pill as SUM(Profit) or SUM(Sales)?  How did you do that?

The only way I can get it to show as Profit or Sales and to plot all points on the scatter graph is to change the pill to a dimension which I notice is what Patrick has done also.

If you turn your pills into dimensions I think you get the same error as Patrick does on his chart.

Many thanks.

Juliette

1 of 1 people found this helpful
• ###### 5. Re: Re: Problem with scatter mean plot

Juliette found the clue that points at the problem.The pill arrangement in this view:

and this view:

Look the same, and the table calculations have the same Compute Using settings, but the results are very different. However, in view 1 this is what's on Columns - Demand is a Dimension:

In view 2 this is what's on Columns - Demand is SUM(Demand), but there's no SUM() or AGG() around it:

This is a user interface issue in Tableau - these two pills are very different, but visually look the same. The key is the Analysis->Aggregate Measures setting. Aggregate Measures is On for view 1, and Off for view 2:

When aggregate measures is Off, Tableau returns every row from the data source (after filters), then computes calcs from there. When aggregate measures is On, Tableau groups the data by the unique combination of values of the dimensions in the view (Demand and Wind in this case) and that determines how granular the data is. In this case, both return the same number of rows (16370). I've attached a packaged workbook with the original view using dimensions, and the updated (working) view using aggregate measures Off that duplicates the original Distance from mean that Andy had posted.

Since the user experience can be really confusing (I've been stumped by this in the past, and just now it stumped Andy, for example), the only time I'll turn off Aggregate Measures is when there is no row-level identifier in the data, and whenever I'm building a data set I'll make sure to include a row-level identifier so I don't have to go near Aggregate Measures. Then in views like this one where I do want to have every row, I can include that Row ID and set up any table calcs to work with that.

Jonathan

• ###### 6. Re: Re: Problem with scatter mean plot

Juliette - you solved the problem for me! The difference between the workbooks was that mine had Aggregated Measures turned off (it's an option in the Analysis menu). Whereas Patrick had tried to emulated that by turning the aggregated continuous pill into a Continuous Dimension - they are different pills, even though they look the same in the UI. Our UI needs a bit of work!

• ###### 7. Re: Re: Problem with scatter mean plot

PS: Nice to see you on the forums again, Andy!

• ###### 8. Re: Re: Problem with scatter mean plot

Turns out there wasn't any Idea for this that I could find, I just created one for adding an indicator to the view:

http://community.tableau.com/ideas/2908

Jonathan

• ###### 9. Re: Problem with scatter mean plot

Great.  Yet another lesson learnt today.  Trouble is, I wish I could remember everything!

Thanks.

Juliette

• ###### 10. Re: Re: Problem with scatter mean plot

It's nice to be here, Jonathan - wish I could visit more often!

• ###### 11. Re: Problem with scatter mean plot

+1 to that Juliette.  There's so much material to try and remember (or document)!

• ###### 12. Re: Problem with scatter mean plot

Thanks Everyone for your help. This has been a very productive learning experience for me.

Patrick