3 Replies Latest reply on Aug 23, 2013 4:03 PM by Dan Cory

    quick filter for DC metropolitan statistical area

    Mark Palmberg

      I'm wondering what the best way is to go about creating a filter for the Washington, DC MSA from a file that contains fields for state, county, city, and ZIP. Looks like I probably only need the state and county fields, but I'm hoping there's a simpler method than a calculated field like IF [STATE] = "MD" AND [COUNTY] = "Calvert" etc., etc., etc. Thanks!

        • 1. Re: quick filter for DC metropolitan statistical area
          Matt Lutton

          I'm not sure what exactly you mean, but you should be able to put [City] (or [ZipCode]) on the filter shelf, and Filter to Washington DC from there.  Is this not what you want?


          If you only want the filter to show DC and all other options as your choices, you could also write a calculation like

          IF CONTAINS([city], "DC")

          then "Washington DC"

          else "Other"


          (this assumes no other city will contain the "DC" combination of letters)

          If you clarify exactly what you want to do, we can help you get there.  The best way to get help is to post a packaged workbook that demonstrates the problem.  Troubleshooting can be very difficult based on a text description alone.  Why is it that you don't want to use other fields, like City?  

          1 of 1 people found this helpful
          • 2. Re: quick filter for DC metropolitan statistical area
            Mark Palmberg

            Thanks, Matt Lutton, for your reply.


            Imagine of file of individuals, one line/record per individual, with fields for ID, City, County, and State for addresses throughout the US. I'd like a filter, or even a set that I then use as a filter, that reflects inclusion in the Washington–Arlington–Alexandria, DC–VA–MD–WV metropolitan statistical area as it's defined here: Washington metropolitan area - Wikipedia, the free encyclopedia.


            Used as a quick filter, my user could view only records with addresses within the DC MSA. I could use the IF THEN ELSE method you mention, but given the granularity of the definition of the DC MSA, I'd be typing for a while. Just wondering if there's a quicker way, is all.

            • 3. Re: quick filter for DC metropolitan statistical area
              Dan Cory

              Create a viz of State and County, pick the ones you want, and choose Create Set. If you are using 8.0, you can use the Add to Set and Remove from Set commands to do this a few at a time.


              Then put the set on the filter shelf for your vizzes.