Alteryx Designer Desktop Discussions

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

Multi-row formula or alternative - flagging multiple rows at the same time.

dbmurray
8 - Asteroid

Hi community!

 

I'm a bit stuck - call it  an "Alteryx Block"

 

I've got a dataset like this:

 

IDNAMETEAMROLE
1John SmithTeam ASalesperson
1John SmithTeam AManager
2Sarah TealTeam ASalesperson
2Sarah TealTeam BManager
3Peter PanTeam CSalesperson
3Peter PanTeam CDesigner
4Helen TroyTeam EManager
4Helen TroyTeam FDesigner
5Mary RitterTeam BManager
5Mary RitterTeam BSalesperson

 

I want to be able to flag if a person works in two different teams. I know I can do this using multiple multi-row formulas, but hoping to make something super clean/efficient. 

 

Here is what I've got thus far in my multi-row formula based on this data for a new field called 'Same Team?' (grouped by ID) (see attached workflow).

 

If [ID]=[Row+1:ID] AND [TEAM]=[Row+1:TEAM] THEN "Same Team" ELSE "" ENDIF

 

 

This is the output from this tool. Note I'd like to also flag the cells marked in YELLOW with the string 'Same Team' as well - hopefully in one tool.

 

Capture.PNG

 

 

 

 

 

 

 

 

 

 

Wondering if anyone had a more efficient way of doing this?

 

Cheers in advance

 

D

 

 

 

2 REPLIES 2
binuacs
20 - Arcturus

@dbmurray one way of doing this

image.png

dbmurray
8 - Asteroid

Thank you so much @binuacs - that worked perfectly!!

Labels