3 Replies Latest reply on Oct 16, 2012 9:09 AM by Shawn Wallwork

# Help- calculating Geographic Distance and incorporating logical statements

From a real estate prospective, I'm trying to create a dashboard that will do a little bit of thinking for me. As the sample workbook shows, I have a map of the US with various offices and associated square footage, number of employees, and number of empty employee seats.

Is it possible for Tableau to highlight (within the table and/or on the map itself) or otherwise emphasize a particular office when a certain set of conditions are met?

For example, has the measure of SF/Person dropped below 100? If so, highlight in red.

If twp offices are within 100 miles of each other and: one has a negative number of available employee seats (too many people); and the other has 5 or more empty seats; highlight in green, or highlight on the map, or whatever. In other words, identify candidates for merger/acquisition or employee relocation

These are just examples- the criteria might turn out to be 150 miles, or 10 empty seats, and the spreadsheet would always be expanding with new data. Can anyone help write this type of statement?

• ###### 1. Re: Help- calculating Geographic Distance and incorporating logical statements

Carson see attached. Also, you'll want to change the spelling of Gainsville to Gainesville in your data. (I changed it in Tableau when it showed up as '1 unknown'.

--Shawn

1 of 1 people found this helpful
• ###### 2. Re: Help- calculating Geographic Distance and incorporating logical statements

Thank you for the help Shawn. I notice the SF/Person statement works great, that's exactly what I'm looking for. Do you have any thoughts on how to also create another type of statement that would take distance and number of seats into account?

• ###### 3. Re: Help- calculating Geographic Distance and incorporating logical statements

Carson, most of the fields you seem to be working with are fairly straight-forward. You'll probably want to work out some parameter-calculated field combo, so users can investigate various measures/dimensions. The 'distance' issue is the only one that isn't so easy. Here's the KB article that tells you how to calculate distance in Tableau -- not pretty but it will do the job. Good luck.

--Shawn