Free Trial

Alteryx Designer Desktop Discussions

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

Combining rows if criteria is met

ew87
7 - Meteor

I'm trying to create a new column that combines data from multiple columns & rows if certain criteria is met. I can't seem to accomplish what I need to do using the multi-row formula, although admittedly I'm still new to that function within Alteryx.

 

Here is a table of example data. The header represents the column names.

 

Project #Project NameStatusDetailsValue
15Project ALateMissing contractor1.2
15Project ADelayedPick RFP winner1.2
16Project BOn targetN/A.8

 

If the project number matches the project number in the row after it, I want to combine the columns & strings from Status & Details. If the project number doesn't match the project number in the row after it, I just want it to combine the columns within that row for Status & Details. Ideally the output would look like this:

 

Project #Project NameNew FieldValue
15Project ALate: Missing contractor
Delayed: Pick RFP winner
1.2
16Project BOn target: N/A.8

 

I'm not sure if this is not possible or just far exceeds my Alteryx knowledge. Any help would be appreciated!!

4 REPLIES 4
Thableaus
17 - Castor
17 - Castor

Hi @ew87 

 

Would this work?

 

 

solution_1212.PNG

 

- Formula Tool to concatenate fields with ":" delimiter

- Summarize tool grouping by every field except the Status + Details field, which I concatenate with \n separator (new line)

 

WF attached.

 

Cheers,

BenMoss
ACE Emeritus
ACE Emeritus

Hey; 

 

Yes this is possible in a few ways; I have used a formula tool, multi-row formula tool and summerize tool to achieve this.

 

In a situation where there are three rows in-a-row, with the same project # I have assumed that you still want to merge these into a single cell too.

 

Example attached.

 

2019-06-25_19-14-40.png

 

Ben

BenMoss
ACE Emeritus
ACE Emeritus

My solution is pretty similar to that of @Thableaus though the solution I have provided will only group those with the same project #s and that are in the adjacent rows (Y) not sure if that is important or not

ew87
7 - Meteor

@Thableaus @BenMoss both of these solutions worked beautifully. Ben - appreciate the additional guidance on how yours differs. Helped me better understand the multi-row formula AND additional functions of Summarize. Really appreciate it!

Labels
Top Solution Authors