Would you provide a little more detail on exactly what you mean?
When we click on any state i want to see cities.on the dashboard. right now i have implemented creating multiple sheets and used actions to navigate.Is there any other way ?
Krish, yes there is another way, although it's not very useful. If you click the "+" in State it will drill to City (using the default hierarchy):
There's two problems with this method. First you get messages like this (but you can rid of those). The bigger problem is that pills (necessary for drilling) are not available to Reader/Server users, so this only works for Desktop users. Also pills aren't available on dashboards.
In most other hierarchies you could set up a calculated field driven by a parameter to accomplish this. But Tableau's native geographies are a special case because each field needs to be assign a geography individually, and T doesn't maintain these geographic roles when called from a calculated field. [That sounds like an Idea someone needs to post.]
Bottom line: Using dashboard actions is your best option.
ok thanks shawn
Allan, yes I did play with that just a few days ago when I was answering a forum map question. That's when I discovered this limitation. If you create a CASE or IF statement using [Country], [State], [County] for instance, the calculation becomes a string. And when you try to assign the calculation a geography, you can't because the assignment needs to float with the result of the calculation. I tried several workarounds but they all came back to the same problem.
It appears there isn't a way to use a calculated field to call a Tableau native geometry based on a parameter. If you find a way please post it. This certainly would be handy.
I ran into this problem when I wanted to be able to show market share by county or zip code based on a parameter. For the reasons Shawn stated, I couldn't get this to work for a single view. So I just created separate views for county and zip and used a parameter to hide/show the relevant view. Since they are placed inside a vertical container, they expand/collapse in a way that it appears that you are looking at the same view at a different level of detail.
I've just had one of those "aha" moments.
Could this be possible:
Set up a dummy hierarchy:
CF - ConcatonateCountrywithState
CF - Choose Country or State
IF [ShowState]='ALL' AND [=]=FALSE THEN [Country Group]
ELSEIF [ShowState]='California' AND [=]=TRUE THEN [ConcatonateCountrywithState]
ELSEIF [ShowState]='Utah' AND [=]=TRUE THEN [ConcatonateCountrywithState]
CF - Country Group
WHEN "USA" THEN "USA"
CF - Show State
IF STARTSWITH ([ConcatonateCountrywithState], 'USA")=TRUE THEN 'California'
ELSE IF STARTSWITH([ConcatonateCountrywithState] etc etc
CF - =
Message was edited by: Allan Walker, reposted not under my secret sauce email.
Allan I'm not sure I completely follow your logic, but the moment you start getting into string manipulation that produces a string result like "California", unless you specifically assign a geographic role to the result, T doesn't know what to do with it.
If I'm wrong about this, please post a packaged workbook. I'd love to see it.
Meanwhile I think Marks solution is a good one.
As usual, totally time-crunched, but I'll give it a whirl later.
Sorted...by my colleague.
Dallin, nice work...and all that with your first post on T's community forum
Dallin, so I'm with Allan welcome to the conversation, but I think you're missing the whole point of the exercise. In your workbook all you've done is stay on the State/Province level and switch out the country. But you haven't actually "drilled down", you've drilled sideways.
Now if you are able to stay in the US and drill-down from the state level to the county level, then you'd have it. Looking forward to more of your posts (especially if you figure this one out).