Free Trial

Alteryx Designer Desktop Discussions

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

Grouping of product

123love55448
6 - Meteoroid

Input

Order numberProduct Quantity
1A2
1B1
2A3
3B4
3A5
3C2

 

Output 

Order NumberFirst SKUQuantitySecond SKUQuantityThird SKUQuantity
1A2B1  
2A3    
3B4A5C2

 

Very appreciated all helps

5 REPLIES 5
RobertZiegl
8 - Asteroid

RobertZiegl_0-1663227092064.png

RobertZiegl_1-1663227272082.png

 

I would solve it with getting a row number for each product in the order, and then use the cross-tab with the row number as new columns.

 

Cool small use case!

Qiu
21 - Polaris
21 - Polaris

@123love55448 
This can be done by Tile too;
I also use a Find and Replace tool to be a bit more dynamic for the new column names.

0915-123love55448-1.PNG0915-123love55448-2.PNG

flying008
15 - Aurora

Hi,@123love55448 

 

Dear, if you have few columns to group, there is a easy way:

 

录制_2022_09_15_16_16_53_615.gif

 

The key point here is that the conversion of numbers and words corresponds. If you add a corresponding table, there will be no problem with more  rows / columns.

Dynamic Rename Expression:

Switch(Tonumber(Left(Replace([_CurrentField_],"Column_",""), 1)),"Zero",1,"First",2,"Second",3,"Third",4,"Fourth") + Substring(Replace([_CurrentField_],"Product", "SKU"),8,20)

 

*******

Please mark this as the solution if it answers your question, it will help others to find solutions quicker.

Qiu
21 - Polaris
21 - Polaris

@flying008 
Nice one with the Make Columns tools.

flying008
15 - Aurora

Hi, @Qiu 

 

Dear, thank you !  If the dynamic rename tool support part dynamic replace mode, the case will be more easy for many rows/columns.

Labels
Top Solution Authors