Alteryx Designer Desktop Discussions

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

Copying values to a new column from existing column with values in certain cells

jf97hernandez
7 - Meteor

Dear all,

 

I am trying to copy values from one column into another one. The problem is that the values in the original column are in selected cells, instead than in every single cell. I want to apply all of these values into a new column for each item.

 

Something Like this:

 

LetterOriginal ColumnNew column
A11
B 1
C11
D 1
E11
F11
G 1
H11
I11

 

I have already added the formula to add the new column, and tried an IF ISEMPTY formula to no avail.

 

Thank you in advance for your time and assistance.

 

Best,

Juan

8 REPLIES 8
BrandonB
Alteryx
Alteryx

Is it the same value down the entire column? If so you can just hard code that value in your formula where you create a new field and set the value. Is there something special that you need to do with the empty cells? If so I am thinking something like this:

 

Formula tool to create new field with this formula

 

If IsEmpty([Original Column]) or IsNull([Original Column])

THEN 1

ELSE [Original Column]

ENDIF

Buzz
8 - Asteroid

Hi,

 

you could also add 

OR [Original Column]=""

 to the statement from @BrandonB , couldn't you?

 

Buzz 

jf97hernandez
7 - Meteor

Thank you Bandon for your response.

 

The problem is that I cannot Hardcode the value as it changes depending on certain parameters in my workflow.  For example, my workflow standardizes a report from a website in which everything is one-to-one always aside from a few parameters (values column). Please see the following table:

 

Letter (always the same)Values (changes every time)New column
A11
B 1
C11
D 1
E11
F11
G 1
H11
I11

 

The values for column B are these:

Values that can be used
1
2
3
4
5
6

 

Thus, what I want is that when I run the workflow, the "New Column" will have the values from column B in every row.

 

I do not know if this makes sense, but I appreciate your response!

 

Thank you again for your time and assistance.

Juan

jf97hernandez
7 - Meteor

Or an easier way to put it, I want whichever string that is in the values column applied to every row of the New Column.

Qiu
21 - Polaris
21 - Polaris

@jf97hernandez 
By "whichever string that is in the values column", are they same value? like all '1' or all '2'?

Qiu
21 - Polaris
21 - Polaris

@jf97hernandez 
Parepared 2 case for you. Check if this is what you need.

1211-jf97hernandez.PNG

jf97hernandez
7 - Meteor

It worked!

 

Thanks you!

Qiu
21 - Polaris
21 - Polaris

@jf97hernandez 

You are welcome and thank you for the accept mark!

Labels