Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Register for the upcoming Live Community Q&A Session - and don't forget to submit your questions for @DeanS regarding the future role of analytics here.

Two or more data types in same column

7 - Meteor

I am trying to merge two sources, one is string (a bunch of headers and subheaders) and the other is numeric (corresponding amounts) using the Union (circle).  The end result is everything is string.  This is an issue for me as I need the amounts to stay numeric while keeping the headers lines text.  When I try to use Select or Multi-field tools to change the amounts back to numeric, it either deletes the headers or turns them to 0, respective (circles).


How can I keep the lines (top arrow) as text, while everything else below (bottom arrow) as numeric?



Alteryx Certified Partner
Alteryx Certified Partner



for each column, you have to decide for one specific datatype. In the situation you decribed, the column should be V_STRING, as a column of this datatype can contain both numeric and string data (but treats numeric data as "string"). The drawback is, that you have to use conversion formulas (e.g. ToNumber) to perform numeric calculation on the respective field (you will have to check, if it is possible to convert the value to numeric and perform conversion only, if it's possible). I hope, this is helpful in any way ...


Best regards



17 - Castor
17 - Castor

Hi @wlee-pwc 


Like @RolandSchubert said.  One data type per field.  String is the type that can hold any data, so that's what unioned fields end up as.  The vast majority of times that this situation arises is to dump a report to either text or Excel with multi-line header info, which isn't supported in Alteryx.  


The way to mitigate this is to make sure you perform all your numeric calculations and union the rows right before the output tools.