Alteryx Designer Desktop Discussions

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

Return "0" on multiple match based on criteria in previous row

collinsj75
5 - Atom

Hoping someone can help.  I have the attached, this is the output of my workflow.  I want duplicate values in "Sales" to only show the first match then "0" on subsequent matches. For example "Sales" in row 2 would show "79.66" but rows 3-9 would dhow "0" for "Sales", then Row 10 would show "88.02" because it is a new value in the "Order ID" field.

collinsj75_0-1625164931472.png

 

6 REPLIES 6
Maskell_Rascal
13 - Pulsar

Hey @collinsj75 

 

There are a couple of ways you can do this, but I'd probably use a couple of Multi-Row Formula tools. 

Maskell_Rascal_0-1625165539991.png

 

Attached is a sample workflow for you to try.

 

Cheers!

Phil

collinsj75
5 - Atom

Phil, you are a genius my Friend!  thanks for the help!

apathetichell
18 - Pollux

The tile tool really shines here - it automatically creates a record id for each count of a specific value (in this case you group by sales) and then a simple formula tool extracts those situations where the record id is greater than 1.

Maskell_Rascal
13 - Pulsar

@apathetichell Great solution! I always forget about the Tile Tool. I also realized after I answered that I didn't need the second Multi-Row Formula tool. I could've just used a regular formula tool. 

apathetichell
18 - Pollux

@Maskell_RascalThanks - I love how the Tile Tool seems so unassuming and uninteresting but is so versatile - it's like the antithesis of Dynamic Input which sounds like something you'll use a ton but has a fairly limited set of uses. Now - off to find a use for Multi-Field Binning.

Vaithi
7 - Meteor

Hi All,

 

This can be done in one step formula in Multiple row formula tool. Attaching the workflow for your reference.

 

Vaithi_0-1625503119951.png

 

 

Labels