I am looking for the best way to create a formula to roll up a zipcode field into counties. I will then create a report grouped by this field. Any help would be greatly appreciated.
I have done something similar but did not do it in Crystal. What I did was create a look up table that would match my counties by zip code. I then based my report off of that information. I would think it could get cumbersome in Crystal. What happens where there are more zip codes added in the data. I would think you would have to add those zip codes into the formula.
You may want to choose to do it in a query instead.
If you don't currently have the Counties that the zips are in, it's more complicated.
If your records contain the County, you can just group by County.
If not, as Kallen suggested, you can create a table which contains the zips and counties (there are probably free tables on the web somewhere...) and join to it, then group by County.
The alternative would be to create an ugly formula which has something like:
If (table.zip} in ["12345","12346","12347","12348"]
Then
"Somecounty"
else
if (table.zip} in ["12349","12350","12351","12352"]
Then
"Anothercounty"
K,
Thanks alot, that formula is the one I was looking for. Unfortunately there is not a county field in the table (I don't get to design the tables, just write reports!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.