community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Upgrade Alteryx Designer in 10 Steps

Debating whether or not to upgrade to the latest version of Alteryx Designer?

LEARN MORE
SOLVED

Renaming Entire Column Based on Single Row

Looking at renaming/creating and then populating an entire column based on condition fulfilled for any row.

 

What I have: 

NameValue
TomA
SallyB
NickA

 

Basically, I want to create a new column (Condition) where the entire column will be populated with "True" if any of the rows have the value "B", while if all the rows values' are "A", the entire Condition column will be "False"

 

Ideal Output: 

NameValueCondition
TomATrue
SallyBTrue
NickATrue

 

Thanks in advance!

Alteryx Certified Partner
Alteryx Certified Partner

Hi @NgYingXue 

 

There are probably better solutions. But I came up with this one:

 

Renaming.PNG

 

- Add a Formula to assign a single value for all the Rows (I assigned RecordID as 1)

- Summarize tool grouping by Record ID and concatenating all Values

- Use a Formula tool to apply the condition:

IF Contains([Concat_Value], "B") THEN "True"
ELSE "False" ENDIF

- Join the Condition field back to the original dataset

 

WF attached.


Cheers,

Highlighted
Alteryx Certified Partner
Alteryx Certified Partner

@NgYingXue 

 

Using append Tool also works:

 

appendsolution.PNG

 

Cheers,

Bolide

Another option using Append Fields

 

Capture.PNG

Labels