Hello everyone,
I am new to alteryx, have been working on it for a couple of months now. I have this issue for gender calculation from a given name, Now the names are in the below format, so the middle part gives away the gender which I will be replacing with a given gender code. For that I need to be able to pick out only the middle part of the name. An example:
I have this name field with data like: John SonOf Doe, Jane d/o Doe.
Any idea what function to use for this?
Thank You.
Solved! Go to Solution.
Hey @Shounak
Could you use the Contains() function in the formula tool to identify the gender?
For example:
If Contains([Field1], "SonOf") then "Male"
Elseif Contains([Field1], "d/o") then "Female"
Else Null()
Endif
If you can provide an example datatset we can help you further :)
Part time Tableau, Part Time Alteryx. Full Time Awesome
hello,
Thanks for your reply on this. I actually have thought of using the if else, but if any other format of "son of" of "s/o" comes up then Ive to modify the formula each time. Hence I am using a way, where I take the name field, take out the middle part of the names like the above mentioned, then find/replace with the master file which has the gender defined in 2 fields.
Gender Code Gender
d/o Female
s/o Male
Son of Male
Something like the above.
I will attach the sample file for the name field. To pick out the middle part is the only issue I am unable work out.
Thank You.
This works.
But I tried getting the same data that u took from a text input, but from a .csv masterfile. Doesnt seem to work so I tried with parsing the middle character and then sending only s/o d/o to be found and be replaced.
Thanks =)
ps
I believe the correct word i should use is to Parse the middle name out.
Ok, so if you want the Parse out the "middle" part of the field you can use the RegEx parse function:
Part time Tableau, Part Time Alteryx. Full Time Awesome
Thanks a ton :)
Now i have 3 solutions.