Let’s talk Alteryx Copilot. Join the live AMA event to connect with the Alteryx team, ask questions, and hear how others are exploring what Copilot can do. Have Copilot questions? Ask here!
Start Free Trial

Alteryx Designer Desktop Discussions

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

Splitting a column into 2 on its value

rajputakansha
8 - Asteroid

Hi all,

 

I have a data set with column- Month, ID and Value.

 

I want Alteryx to create a separate column "Value2", dynamically for the last month and column "Value1" for all other months.

 

Example:

MonthIDValueValue 1Value 2
1AA1010 
1AB1515 
2AA1010 
2AB2020 
2AC55 
3AA1010 
3AB3030 
4AA25 25
4AB15 15
4AC0 0

 

Can you suggest a way to achieve this?

 

Appreciate your help!

 

 

Thank you

 

2 REPLIES 2
T_Willins
14 - Magnetar
14 - Magnetar

Hi @rajputakansha,

 

Here is an easy way to accomplish this.  This will work if your month in is a numeric or date format.  If it is a string format, then some additional data prep will be required.

 

Sort.JPG

 

DiganP
Alteryx Alumni (Retired)

@rajputakansha Attached is the workflow that dynamically finds the last month and separates it from the rest. 

 

Capture.PNG

Digan
Alteryx
Labels
Top Solution Authors