Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Formula help

yasin
6 - Meteoroid

Hello,

I am trying to find a formula to find same first three digits of zibCode in a big data column. return value to be "1" or "0".

example:

zibcode

59527

59528

59523

59505

80120

80133

80122

 

Thank you for your help.

4 REPLIES 4
nerces
8 - Asteroid

You can use left([zibcode], 3) to extract the first 3 digits and use that to compare. I can help you further with a workflow if you provide further detail and an example of what you expect the output to look like.

yasin
6 - Meteoroid

Hi, 

I have attached a sample of my data sheet.

ZipCodeStateCityPopulationSquareMiles
59001MontanaAbsarokee1,566135.7
59002MontanaActon6315.3
59003MontanaAshland1,023316.7
59006MontanaBallantine86567.8
59007MontanaBearcreek12059.1
59008MontanaBelfry37485.0
59010MontanaBighorn185513.9
59011MontanaBig Timber3,0141050.2
59012MontanaBirney170236.1
59013MontanaBoyd20330.8
59014MontanaBridger1,474842.3
59015MontanaBroadview488338.9
59016MontanaBusby936497.9
59018MontanaClyde Park408104.9
59019MontanaColumbus3,347290.5
59020MontanaCooke City112103.7
59022MontanaCrow Agency2,290591.7
59024MontanaCuster348511.8
59025MontanaDecker96533.3
59026MontanaEdgar19347.0
59027MontanaEmigrant372127.8
59028MontanaFishtail518340.8
59029MontanaFromberg77033.7
59030MontanaGardiner1,7921086.1
59031MontanaGarryowen29640.7
59032MontanaGrass Range391387.1
59033MontanaGreycliff12129.9
59034MontanaHardin4,726847.0
59035MontanaYellowtail326479.4
59036MontanaHarlowton1,630711.8
59037MontanaHuntley1,554193.5
59038MontanaHysham720774.2
59039MontanaIngomar121864.3
59041MontanaJoliet1,748154.1
59043MontanaLame Deer2,908370.4
59044MontanaLaurel9,618186.0
59046MontanaLavina408600.0
59047MontanaLivingston12,103854.1
59050MontanaLodge Grass1,731562.0
59052MontanaMc Leod199537.8
59053MontanaMartinsdale378771.4
59054MontanaMelstone282258.7
59055MontanaMelville142211.9
59057MontanaMolt442300.7
59058MontanaMosby40307.7
59059MontanaMusselshell164213.0
59061MontanaNye305160.5
59062MontanaOtter79395.0
59063MontanaPark City1,70498.4
59064MontanaPompeys Pillar215179.2
59065MontanaPray8816.0
59066MontanaPryor713373.3
59067MontanaRapelje221345.3
59068MontanaRed Lodge3,498622.4
59069MontanaReed Point463208.6
59070MontanaRoberts75891.4
59071MontanaRoscoe10667.1
59072MontanaRoundup4,0321376.1
59074MontanaRyegate604511.9
59075MontanaSaint Xavier255303.6
59076MontanaSanders4711.3
59077MontanaSand Springs83592.9
59078MontanaShawmut148255.2
59079MontanaShepherd3,059242.6
59081MontanaSilver Gate262.1
59085MontanaTwo Dot76304.0
59086MontanaWilsall757411.4
59087MontanaWinnett4931700.0
59088MontanaWorden1,203333.2
59089MontanaWyola491306.9
59101MontanaBillings36,335498.8
59102MontanaBillings44,39115.1
59105MontanaBillings23,343103.5
59106MontanaBillings8,009126.9
59201MontanaWolf Point5,0271416.1
59211MontanaAntelope174122.5
59212MontanaBainville310233.1
59213MontanaBrockton855527.8

 

Requirement: 

 For this case, rural is defined as an area with less than 100,000 people. To simplify this analysis, areas are defined as having the same first three digits of the ZIP code.

  • Add a “rural” variable to the ZipCodes tab indicating whether each ZIP code is associated with a rural city (1) or an urban city (0).
nerces
8 - Asteroid

Thank you for the extra detail. I've attached a solution for you. Please let me know if you have any issues.

yasin
6 - Meteoroid

Hi,

After I run the hole data set j join given me all null. could you please look into it. 

Thanks

Labels