- Create a Parameter with "Revenue" and your other measures as a list. Include "ALL" in this list.
- Create a CF that will swap your Measures - Case statement your parameter - and use WHEN "Revenue" THEN [Revenue]. Add the other Measures as necessary.
- Create a filter on the CF with the IFNULL([Calculated Field Name],'Null') = IF [Parameter] != 'ALL' THEN [Parameter name] ELSE IFNULL([Calculated Field Name], 'Null') END as the condition.
- Drop the CF into the color shelf. If you need to customize the color palette, there are instructions here.
I'm not sure that I was explicit enough in my request.
How would I shade in the polygons? I know how to put single marks on a background image. Instead of that, is there a way for me to fill in a polygon (I know the coordinates of each polygon)?
Sorry Chris, I wasn't explicit in my answer, either!
(Assuming 7E - 8J is [Polygon ID]), assign an integer value to each Polygon ID, so Polygon ID comes in as a measure. Put that as one of the measures into the parameter list. Then Place the CF in the color shelf .
Here is a quick rundown on how to do polygons that I did for someone else.:
While single point annotating can be useful, the main drawback is that the points lose perspective like you said when you zoom in and out. I faced a similar problem when doing my project. Polygons are definitely the way to go and are not as complicated as you might think. Here is a tutorial. http://kb.tableausoftware.com/articles/knowledgebase/polygon-shaded-maps
While this tutorial is useful, I found it a bit hard to follow at first because I was new at this. Here is the basics for what you need to make polygons.
2.Coordinates of at least 3 points to the polygon (otherwise you just end up making a point or a line if you only use 1 or 2 points respectively)
3.Point Order This determines how tableau connects the dots
Since you already know how to obtain coordinate points on a background ill skip that step and use coordinate (0,0),(1,0),(1,1), and (0,1) (You can pick whatever coordinates you like for this base on the geography of your floor-plan)
So the polygon data sheet should look this this
Polygon Name X Y Point Order Square-1 0 0 1 Square-1 1 0 2 Square-1 1 1 3 Square-1 0 1 4
Now you just drop [X] and [Y] into column and row shelf,
Then select polygon for mark type and drop [Point Order] into path
Then put [Polygon Name] into the Level of detail below the marks tray and that will draw you a square with those coordinates as corners
Now to add data to the shape "Square-1" you can either join this polygon sheet with your data sheet that has data you want to correspond to each shape.
Area Students Category Square-1 55 Tech Square-2 44 Furniture
This data sheet could be joined by [Area] to [Polygon Name] and the data would be linked to the shapes. Alternatively, if you are working in excel you could to a vlookup for you polygon data sheet so that you only bring in one table that isn't joined
For instance you could do this
Polygon Name X Y Point Order Students Category Square-1 0 0 1
Tech Square-1 1 0 2 55 Tech Square-1 1 1 3 55 Tech Square-1 0 1 4
and that polygon would have all the associated data that you have on your data sheet that you want to correspond to your polygon.
So all you need to change are the polygon names, the coordinates, and the data associated with those polygons.
Edit- After you get the polygons to show up on the map, you might want to revisit what Allan was talking about to get a parameter selector to change between data fields easily.
As you've noticed, the label shelf isn't there. A workaround is to use a tooltip. Insert [BIN] into it.
What is the best way to initially generate the polygon coordinates and point order from something like Chris's graphic?
I guess I would recommend this be added to the online help...