Important Community update: The process for changing your account details was updated on June 25th. Learn how this impacts your Community experience and the actions we suggest you take to secure your account here.

Alteryx Designer Desktop Discussions

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

Splitting Values inside a cell to multiple rows

learnalteryx
7 - Meteor

Hello! I have an unusual situation where a Product Code is referenced in a single cell. I need to split this information into multiple lines and adjust the Amount accordingly. If there's three Product Code, I need to split it into three lines and divide the Amount by three. However, if there are two Product Codes, I need to split it into two lines and divide by two. Depending on the number of Product Codes, the lines should be added at the bottom. Please refer to the example below. The delimiters used are spaces, slashes, and commas. I would greatly appreciate your assistance.

 

Table  
ProductProduct CodeAmount
Apple1.234.2,2345100
Orange1.345/3456/234590
Pear23.4 5643 867390

 

Expected Output  
ProductProduct CodeAmount
Apple1.234.250
Apple234550
Orange1.34530
Orange345630
Orange234530
Pear23.430
Pear564330
Pear867330
3 REPLIES 3
PhilipMannering
16 - Nebula
16 - Nebula

Hi @learnalteryx 

 

Here's a way you can do that. See example attached,

PhilipMannering_0-1682099224193.png

 

learnalteryx
7 - Meteor

@PhilipMannering 
Thank you for providing a solution. While it has partially resolved the issue, I have a concern regarding the summarise tool counting Apple at the bottom (i've added new rows- see below), which results in an incorrect summarize tool total count of 5. My intention is to obtain the respective count of the product code only. Could you please advise if there is a solution to this?

Table  
ProductProduct CodeAmount
Apple1.234.2,2345100
Orange1.345/3456/234590
Pear23.4 5643 867390
Apple88/78/65150

 

Expected Output  
ProductProduct CodeAmount
Apple1.234.250
Apple234550
Orange1.34530
Orange345630
Orange234530
Pear23.430
Pear564330
Pear867330
Apple8850
Apple7850
Apple6550
PhilipMannering
16 - Nebula
16 - Nebula

Yes,

 

Then I think you just need to add a unique RecordID. See attached,

PhilipMannering_0-1682105287007.png

 

Labels