1 of 1 people found this helpful
I'm afraid I don't have a good answer or even an explanation for why this behavior exists. Interestingly, if you create a calculated field hard-coded to 1 and then use the MIN(One) on both Rows and Columns, you CAN get a pie chart. That is of course the simplest of all scatter plots -- but why it would work in that case but not in other cases is something I don't understand. Does anyone else have any ideas?
Hi Katy and Joshua,
This is a great example for understanding how dimensions and measures affect the level of detail in the view.
In the attached, I set up this view, the filter on Order ID just grabs the top 100 orders by SUM(Sales):
We see 100 marks in the status bar.
Now, when I add the Department dimension to Color, there are 164 marks and the marks have moved:
This is because the Department dimension has increased the level of detail in the view. In SQL terms, all the dimensions in the view are added to the GROUP BY clause, and Tableau draws a mark for each tuple (aka combination of dimension values), leading to the 164 marks. The other effect of this is that Tableau is now computing the measures - Sales, Profit, Shipping Cost - based on the combination of Order ID and Department, and that changes the results.
What we need to do is get back to a Sales for each entire Order, a Profit amount for each entire order etc. so Tableau will draw all the Department Segments of the pie in the same place and actually assemble a pie chart. Since we want Department to color the segments and have a finer level of detail, but need to generate a calculation at a coarser level of detail, table calculations come to our rescue. I set up some simple table calcs with TOTAL(SUM([Sales])), etc. and set their Compute Using to Department so they'd have the same result for each Order:
Once that's all set up, building the view is a matter of duplicating the workout worksheet and dragging pills around:
Note that Tableau still shows 164 marks, this is because each pie segment is a mark, Tableau assembles the pies based on all the marks in the same location. Also, if you compare the Size legends between the "starting 100 pies" and "final view" worksheets, the final view has a different legend because Tableau is computing the legend size at the Order level by summing the sizes across the Dimension. I think this is a bug, because the largest size is really 210.5, I'll send it along to Tableau tech support.
The takeaway from this that pill awareness (what are dimensions &measures, secondarily discrete & continuous) is key to understanding what Tableau is doing.
Hope this helps!