Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

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

Picking a certain value within tile

radhika_nath
5 - Atom

I have tiled my data based on a particular field and sequenced the cases within the tile in ascending order. I want to create a new variable that picks the case with the maximum value (or last occurring) and mark it for further process. See example table below. Suggestions?

RecID PID (Tiled) Visit Seq New Var.
1

1

1  
2 1 2  
3 1 3 Flag
4 2 1  
5 2 2  
6 2 3 Flag
7 3 1  
8 3 2  
9 3 3 Flag
2 REPLIES 2
RodL
Alteryx Alumni (Retired)

As with all things Alteryx, there are a number of ways to do this. 

One (assuming that your data is in the order shown...which you can ensure by sorting first) would be to use a Multi-Row formula that inserts your flag when the PID changes in the next record.

Another way would be to use the Summarize tool, group by the PID, and use the Max function. This would give you a separate set of results that you could join back to the original workflow and then use that as the basis for the flag.

I'd probably use the first alternative myself.  Smiley Wink

radhika_nath
5 - Atom

Thanks - very helpful!! Two solutions are better than one! - Rad

Labels
Top Solution Authors