Hi Nik - I'm hoping that I am interpreting your question correctly... I've updated your viz so that when you view state or city only the top 10 ranked locations show up. I just added filters to state and city to limit them to top 10 by sales. Is that what you are trying to do?
This is perfect for State and City. For the third parameter, Cust-City, I'm trying to plot the top 10 individual customer-city concatenations. So, top 10 cities would be different from top 10 customer-city combinations. I attempted to duplicate the filter for Cust-City but it just limited the Cities on the map to the 3 that correspond with the customer-city concatenations in the chart. What are your thoughts on this?
How about this idea then - I created a new calculated field that uses an LOD calc to sum the sales at the appropriate geographic level (i.e., if the parameter is set to State then the sales are summed at state level; if city then city, state level; if customer then city, state, customer level). Then I use the State/City/Cust calculated field on Filters and set a top 10 filter so that it pulls the top 10 values at the appropriate LOD.
I think it seems like it's working, but I haven't done any real quality control on it. Take a look and see if it seems like it's doing the right thing.
Almost there! It looks like it's mixing Jacksonville, North Carolina with Jacksonville, Florida to create 11 cities in the top 10 cities breakdown. I tried concatenating State and City in your LOD calculation in order to eliminate Jacksonville, North Carolina but that didn't seem to work. I'm thoroughly confused as to how this would happen.
State and Cust-City work perfectly. If we can fix this then I'm all set!
1 of 1 people found this helpful
Okay, here is a new stab at this... I went a different direction with trying to solve the problem. I scrapped the idea of the LOD calc and just went with a normal sum, but based the groups that it summed into by a calculated field specifying the level of detail (State only, city/state, customer/city/state).
I made a dashboard that shows a bar chart with all values and then color encoded to highlight top 10. This seems to match up with what is showing up in the map now.
There are a few key fields:
* Selected LOD - this just makes a single field that defines how we want to group (state, city/state, customer/city/state)
* I re-use your P-State and created a new State (disambiguate city) so that we can (hopefully) avoid the problem of two Jacksonvilles
Take a look at the Top 10 viewer dashboard to check to see if this is doing what you expect.
That did it! Thanks for the help!
That was quite complicated for something that seemed like it should be pretty simple. Hopefully newer versions of Tableau can tackle this functionality.