Alteryx Designer Desktop Discussions

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

Complicated Multi-Row Formula--Don't even know where to start with the syntax

gene_denny
8 - Asteroid

I honestly have no clue how to even start this one.  Take the snapshot of my current Results pane as reference.

 

Results.GIF

 

I would like to add a column named 'Cohort' that is populated with a simple Yes/No.  The logic is if the value of schoolID is equal for both Winter 2017 and Winter 2018 for each personID, then a Yes is written.  Else, it is a No.

 

For personID=929, the schoolID for each of these rows is not equal, so a No is rendered in the final column of Rows 28 and 29.  The same is true for personID=934 because there is no row for Winter 2018.  For personID=1031, the schoolID field matches for both Winter 2017 and Winter 2018 and, thus, a Yes would be rendered in the final column of Rows 31 and 32.

 

I don't know how to reference a particular field value based on another field value.

 

Any gurus want to lend me some of their intelligence?

4 REPLIES 4
patrick_digan
17 - Castor
17 - Castor

I think you can use a multi-row tool or a summarize tool to accomplish this. I've provided both in the attached. If you're situation turns out to be more complicated, then the logic may need to be tweaked.

gene_denny
8 - Asteroid

 

Owe you one.

 

The Multi-Row formula syntax was what I was after, although both solutions you provided look workable.  Sincerely appreciate the help!

gene_denny
8 - Asteroid

I tried to apply the same logic to a similar, but separate, workflow but now it doesn't work properly and I am unable to determine the difference.  Here is the data set Results, without the final column populating.

 

Capture.GIF

 

I am still using the Multi-Row tool as 

Capture2.GIF

 

So, what am I missing?

gene_denny
8 - Asteroid

Disregard, I see my mistake.  Needed to change the Values for Rows that don't Exist to Null

Labels