Missed the Q4 Fall Release Product Update? Watch the on-demand webinar for more info on the latest in Designer 24.2, Auto Insights Magic Reports, and more!
Free Trial

Alteryx Designer Desktop Discussions

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

How to create a new column which multiplies the value of an existing column by a number

AlteryxUser001
6 - Meteoroid

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. 

8 REPLIES 8
binuacs
21 - Polaris

@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

 

binuacs_0-1668204709349.png

 

AlteryxUser001
6 - Meteoroid

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?

binuacs
21 - Polaris

@AlteryxUser001 you can use the toNumber() function to change the value into numeric. make sure no space followed by the fields 

AlteryxUser001
6 - Meteoroid

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"

binuacs
21 - Polaris

@AlteryxUser001 @Check your first formula output data type is numeric or not? 

AlteryxUser001
6 - Meteoroid
Spoiler
it looks as the ToNumber formula is successful after I click run
AlteryxUser001
6 - Meteoroid

it looks as the ToNumber formula is successful after I click run

AlteryxUser001
6 - Meteoroid

all resolved now - it was the ordering of the tools for my specific spreadsheet I did not have correct.

Labels
Top Solution Authors