In order to map something, you have to have data - in this case, Wyoming data even when there are no sales in Wyoming. Is there any way you can get that "no sales" data into your data set?
Alternatively, you could create a new data source: a list of all states. Use that new data set as the left side of a join to your other data. That will provide a complete list of all possible states, even ones that do not have any sales data. You'll likely have to work with the ZN() function to get it all to display the way you want.
Hi Michael - thank you very much for your response. I really appreciate it.
Retailer 1 and Retailer 2 are the retailer footprints, their locations. So if there are no Retailer 2 in WY I can't really put something like "no sales" like you suggested because Retailer 1 and Retailer 2 are showing where those retailers are.
The background (grey) is showing where we would like to run our promotion. And we do have counties in WY that we are running our promotion. So I would like to see which counties I am covering vs where different retailers are (for each unique retailer)...
Suman, can you set it up so that your County table contains ALL US counties? That will give you a complete county data set to work with. I can't be completely sure, but I think that right now you only have counties that have sales in them, correct?
Keep the join relationship (although I'm not sure a full outer is necessary) the way it is. By adding all the counties that don't have sales into the data set, you'll create a bunch of NULL rows but that's OK.
Does that make sense?
Michael, You are right. Currently I have selected only those counties where we are doing promotion. And several counties (43 to be specific) in Wyoming are a part of the County Table -- meaning, we are running promotion in those counties of WY. My issue is - when I select retailer 1 from the filter, everything else looks perfect but the state of WY blanks out. I would still like to see all the counties we are covering our promotion, including those 43 counties in WY, in gray and then see all the Retailer 1 as shapes.
So do you think adding ALL US counties would help the case?
Again thank you so much for your response.
OK, starting to understand better what you're trying to do!
This is tricky: filters apply to the entire data set, so even if you have a dual-axis map, you can't limit the filter scope to just one axis, which is really what you're trying to accomplish.
Let me play around with alternatives and I'll get back to you.
Hi there Michael,
Did you get a chance to look further in to this for me? Appreciate it !
Yes, you should have all counties in the data set. If you don't, you will get blanks on the map, regardless of whether or not a given retailer is selected.
Moving on, what you're trying to do isn't completely supported by Tableau yet. You have 2 data sets (County and Retailer_Test) joined on the State field. That means that if you filter the Retailer, it's also going to filter the State list. No way to avoid that.
What you need is known as a Spatial Join: you need to join 2 sets of geo-data on the Lat/Long information. That's coming, but it's not yet available in Tableau. I don't know of another way to get what you're looking for in Tableau today.
Perhaps another mapping expert knows of a better solution. Sorry I couldn't be of more help!
Any other experts who can help here?
Thank you so very much for trying to help me out. This is a very important project to me and I got to figure out a way to get this done. I will keep researching...
- What type of datasource are you connecting to?
- How many retailers are there in your real dataset?
1) I am connecting geography (location) data. But the point is - I am not sure if it is necessary to join these two tables. Again, I am trying to create a view where I will have counties coverage as a static on the background and retailers footprint that should change based on my selection. Currently the County data set is showing all the counties where we are running promotion. And several counties (43 to be specific) in Wyoming are a part of the County Table -- meaning, we are running promotion in those counties of WY. My issue is - when I select retailer 1 from the filter, everything else looks perfect but the state of WY blanks out. I would still like to see all the counties we are covering our promotion, including those 43 counties in WY, in gray and then see all the Retailer 1 as Shapes.
2) I will have around 15 retailers in my real data set.
Can you help?
What type of datasource? Excel? CSV? Microsoft SQL Server? JSON?
I understand your requirement and it won't be possible without a cross join or union or similar. Your ability to do that is going to depend on the type of source you're connecting to.
It is an Excel file.
1 of 1 people found this helpful
Here's a quick method which might get you what you need, but there are some limitations.
- Remove your filter on CompanyName to select all companies
- Create a parameter which is a string type. Change the allowable values type to a List and type in all of your 15 company names.
- Right click the parameter and select 'Show Parameter Control'.
- Create a new calculated field called ShowZip and enter this formula; IF [Company Name1]=[PARAMETERNAME] then [Zip (5 digits)1] end
- Right click the ShowZip field and change the Geographic role to Zipcode.
- On the marks card for your second series (the one showing the shapes), replace the Zipcode field with the Showzip field.