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

Multi-Row formula

Sarath27
8 - Asteroid

Hi All, 

 

Pls assist me on this scenarios. Basically each product will have three different levels (i.e Level 1, Level2 & Level 3).

 

Scenario 1: If 2 out of 3  levels has values populated in it, then we need to create two duplicate line and split the values in both the lines.

Scenario 2 : If 3 out 3 levels has values populated in it, then we need to create three duplicate lines and split the value in each lines. 

 

Note: Splitting values can be in any level, but it should be unique.

 

Scenario 1  
Input
ProductLevel 1Level 2Level 3
A110
    
Desired output
ProductLevel 1Level 2Level 3
A100
A010

 

Scenario 2  
Input
ProductLevel 1Level 2Level 3
A111
    
Desired output
ProductLevel 1Level 2Level 3
A100
A010
A001
2 REPLIES 2
Prometheus
12 - Quasar

@Sarath27 I was able to solve without using a Multi-Row formula tool. First, I used the Transpose tool to pivot the data, a RecordID tool to give the records something else to group by, otherwise the data would've been summed at this point and it would've been set back to its original form after the next tool, with is the Cross Tab tool. The Cross Tab tool pivots the data back, but leaves nulls where there is no data, so I replaced those nulls with zeroes using the Multi-Field Formula tool. I then added all the Level fields together and only allowed records to pass through a Filter tool if Total Value > 0. After using a Dynamic Rename tool to replace the "_" in field names with a space, I deselected unnecessary fields and sorted on Product ascending to get what you're looking for.

Transpose Data.PNG

Add ID to Fields.PNG

Pivot Data Back.PNG

Replace Zeroes.PNG

Get Total Value.PNG

Filter Out Zeroes.PNG

Sarath27
8 - Asteroid

@Prometheus Amazing solution! 100% working!!! Thanks much.

Labels