Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Renaming Entire Column Based on Single Row

NgYingXue
5 - Atom

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!

3 REPLIES 3
Thableaus
17 - Castor
17 - Castor

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,

Thableaus
17 - Castor
17 - Castor

@NgYingXue 

 

Using append Tool also works:

 

appendsolution.PNG

 

Cheers,

ChrisTX
15 - Aurora

Another option using Append Fields

 

Capture.PNG

Labels