-
1. Re: How can I make one Pie Chart per Region on a Filled Map
Vusi Nkomo Jul 24, 2012 3:02 PM (in response to Weily Shay) -
2. Re: How can I make one Pie Chart per Region on a Filled Map
Jonathan DrummeyJul 24, 2012 8:04 PM (in response to Weily Shay)
1 of 1 people found this helpfulHi,
I'm not sure what you mean by having "one pie chart per region that shows total sales, profits, and order quantity of that region." A pie chart shows a part-to-whole relationship, so usually the slices are divided by a dimension or discrete measure, and the three measures you list are all continuous.
There are a couple of ways to set this up. The key is that you need to give Tableau a latitude and longitude, so I imagine you had to put the State in the view since it has those assigned. As Ndabezinhle wrote, if you pick out a latitude and longitude, you can create a file with region, lat, and long and then blend that into the data set to generate your pie charts. That's option 1 in the attached workbook, and is the simplest.
Option 2 uses State to get the geography, and then replaces the measure (SUM([Sales]) in this case), with a table calculation with the Compute Using set to State, and a second INDEX() calc that also has a Compute Using set to State to filter out all but one result per Region. In this case, the point is associated with whatever State is first on the list based on how the dimensions are sorted.
Cheers,
Jonathan
-
3. Re: How can I make one Pie Chart per Region on a Filled Map
Vusi Nkomo Jul 24, 2012 10:14 PM (in response to Jonathan Drummey)My understanding of what he wants is to have a filled background map at the state level, and then using the dual axis functionality, to have pie charts shown at region level. Hence in the example above, i have a filled map at state (province) level and then what we could turn into a pie chart (didn't have a proper data source) at region level. I could be wrong, but my understanding is that we can only do this by having the lat and long values in the data source.
-
4. Re: How can I make one Pie Chart per Region on a Filled Map
Shawn Wallwork Jul 25, 2012 7:47 AM (in response to Vusi Nkomo)1 of 1 people found this helpfulNdabezinhle,
I could be wrong, but my understanding is that we can only do this by having the lat and long values in the data source.
This isn't exactly true; at least not for the US. Tableau has a Region field predefined in the geo-database for the US, so your data doesn't have to supply the lat/longs for this field. (I'm guessing this isn't true for SA?) Combining your dual-axis with Jonathan's regional pie chart you can get this:
...without having to supply any lat/longs in your data. (See attached.)
--Shawn
EDIT: Note I was completely wrong on this, see entries below.
-
5. Re: How can I make one Pie Chart per Region on a Filled Map
Vusi Nkomo Jul 25, 2012 3:25 AM (in response to Shawn Wallwork)Hi..thanks for pointing that out. In SA we would need to create the region as we don't have it in our standard geo-code list. Hence the in-built lat long will likely not work for us as our regions are custom created
-
6. Re: How can I make one Pie Chart per Region on a Filled Map
Weily Shay Jul 25, 2012 6:23 AM (in response to Shawn Wallwork)This is exactly what I want!
Could you tell me how to transfer AVG(Latitude) and AVG(Longitude) from one sheet to another? I'm still very new at Tableau so I'm a little lost on how you did this step.
-
7. Re: How can I make one Pie Chart per Region on a Filled Map
Shawn Wallwork Jul 25, 2012 6:46 AM (in response to Weily Shay)Weily,
Actually I totally biffed this one! Ndabezinhle is right, you do need to provide the lat/long for the region field, which Jonathan did using a clipboard connection. Sorry Jonathan, I totally missed that! So to make amends I'll provide a step-by-step set of instructions of how to create the map from scratch. Give me a couple of minutes.
--Shawn
-
8. Re: How can I make one Pie Chart per Region on a Filled Map
Shawn Wallwork Jul 25, 2012 7:42 AM (in response to Weily Shay)-
Pie-Fill Map.twbx.zip 1.1 MB
-
-
9. Re: How can I make one Pie Chart per Region on a Filled Map
Jonathan DrummeyJul 25, 2012 8:14 AM (in response to Shawn Wallwork)
Excellent instructions, thanks, Shawn!
-
10. Re: How can I make one Pie Chart per Region on a Filled Map
Weily Shay Jul 25, 2012 8:21 AM (in response to Shawn Wallwork)Thank you so much! This was really helpful!