-
1. Re: Switching between multiple datasets on one map
Tracy RodgersJun 6, 2012 10:50 AM (in response to Alex Lea)
1 of 1 people found this helpfulHi Alex,
It sounds to me like a parameter wants to be used to switch between the different dimensions. The following KB article should give some guidance on this (simply change the measures for dimensions):
http://kb.tableausoftware.com/articles/knowledgebase/parameterized-measure
Hope this helps!
-Tracy
-
2. Re: Switching between multiple datasets on one map
Alex Lea Jun 7, 2012 6:46 AM (in response to Tracy Rodgers)Thanks Tracy, not sure I understand what I'm doing, but I get what it's trying to do.
I've followed the steps through to create new parameters but when I'm entering the formula to create new calculated fields,but I've used [Value] instead of [Measure N]. This all seems to work fine and I can create a drop down list to select the dataset I want to display (I've only used one as I'm displaying the data in a polygon map rather than an xy scatter. The only problem is that I can't seem to get the data to display on the map, all I seem to get is the sum of values for each area (3) or a null value rather than each individual area colored accordingly.
Any ideas what I'm dong wrong?
Regards, Alex.
-
3. Re: Switching between multiple datasets on one map
Tracy RodgersJun 7, 2012 4:24 PM (in response to Alex Lea)
Hi Alex,
Would you be able to post the workbook (twbx file)?
-Tracy
-
4. Re: Switching between multiple datasets on one map
Alex Lea Jun 8, 2012 4:00 AM (in response to Tracy Rodgers)Morning Tracy
Please find attached. I've created the parameter and the calculated (I only created on rather than the two in the example as I'm only plotting one onto the map rather than comparing two on a chart).
I'm able to plot the various datasets on the map if I use a traditional flat table (but only one at a time), but when I reshape the data I can't seem to get any datasets to display.
Just let me know if you need any more information.
Thanks for you help so far!
Regards
Alex
-
Internet Returns v2.twb.zip 85.5 KB
-
-
5. Re: Switching between multiple datasets on one map
Jonathan DrummeyJun 20, 2012 9:58 AM (in response to Alex Lea)
Hi Alex,
I tried to take a look at this but you posted a .twb file, which does not contain the extracts. Please export a Tableau packaged workbook (.twbx), thanks!
Jonathan
-
6. Re: Switching between multiple datasets on one map
Alex Lea Jun 21, 2012 2:27 AM (in response to Jonathan Drummey)Sorry Jonathan, the packaged workbook is attached below.
Regards
Alex
-
Internet Returns v2.twbx.zip 219.4 KB
-
-
7. Re: Switching between multiple datasets on one map
Richard Leeke Jun 21, 2012 3:40 AM (in response to Alex Lea)The issue is that you need the value of the parameter to be specified as part of the relationship in order to blend in the contextual data - otherwise the calculated field within the [Contextual Data] data source does not have the Dataset available.
I've added a calculated field which just takes the value of the parameter into the [LSOAs Smoother Extract] data source and added that to Level of Detail and into the relationship definition.
I also added the other two parameter values into your calculated field and added that to the colour shelf.
-
Internet Returns v2 RL.twbx.zip 220.0 KB
-
-
8. Re: Switching between multiple datasets on one map
Alex Lea Jun 22, 2012 3:21 AM (in response to Richard Leeke)Richard
Many thanks for this, it's just what I was looking for! I'm going through what you've done and trying to reverse-engineer it; it seems to me that in effect, the parameter acts like an Excel 'pick from list' and the calculation acts like a VLOOKUP on the list value, if that makes sense.
What I don't understand are the following two lines in the calculation:
WHEN "Measure N Name" THEN [Value]
WHEN "ONS LSOA Classification" THEN [Value]
what exactly are they doing? The second line appears to be in the calculation twice and I'm not sure why!
Regards
Alex
-
9. Re: Switching between multiple datasets on one map
Richard Leeke Jun 22, 2012 2:20 PM (in response to Alex Lea)The original workbook you posted had this calculation:
CASE [Dataset Parameter]
WHEN "IMD 2010" THEN [Value]
WHEN "OAC LSOA Classification" THEN [Value]
WHEN "Measure N Name" THEN [Value]
END
but only "IMD 2010" was a valid parameter value and matched any rows in Contextual Data.
I just changed it by adding the other two valid values, but I left the original entries in case your real data contained more values. Note that you had "OAC" rather than "ONS".