I would like to know the most appropriate tool to create a new column which multiplies the values of an existing column by a percentage e.g. 20% (0.20)
The column which needs to be multiplied contains zero values.
I believe the "Formula" tool is the most appropriate, i can select add new column and name it accordingly however multiplying the column header name that i want by 0.20 throws up an error.
Solved! Go to Solution.
@AlteryxUser001 Not sure i understand your requirement properly, based on my understanding you can create a new column using the formula tool something like below
thanks for that - the error reads that I am trying to apply the formula to a string value - I guess I have to go back cleanse the data and ensure the column in question is numeric/double?
@AlteryxUser001 you can use the toNumber() function to change the value into numeric. make sure no space followed by the fields
I apply To Number([column]) and run the formual tool, however when i add another forumale tool after that and follow your first step formula - i still get the error "tried to apply numeric operator to string value"
@AlteryxUser001 @Check your first formula output data type is numeric or not?
it looks as the ToNumber formula is successful after I click run
all resolved now - it was the ordering of the tools for my specific spreadsheet I did not have correct.