Do you use Alteryx in a language other than English? If so, we want to hear from you! Please help us improve the international experience of our products by participating in this 5 minute survey.

We are updating the requirements for Community registration. As of 7/21/21 all users will be required to register a phone number with their My Alteryx accounts. If you have already registered, you will be prompted on your next login to add your phone number.

Alteryx Designer Discussions

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

Multi Row/Field Formula For Finding Largest Value Over A Specific Type

jlrouquette
7 - Meteor

Howdy Community,

 

I'm looking for help with a multi something formula, or whatever works best, to identify the largest value for a specific pad.  Every pad has several wells and every well has several events.  Some events will be null.  The number of wells per pad, and events per well can change but I need to identify the largest value per pad regardless of those inconsistencies.  

 

I've attached an example dataset and shown a simple example below.  In the example below the "Large" category represents the output I'm looking for from a formula.  The other 4 columns are those that are available to me.   

 

WELLPadEventValueLarge
Well 01Pad 1Event 17.5YES
Well 01Pad 1Event 2 NO
Well 01Pad 1Event 31NO
Well 02Pad 1Event 12NO
Well 02Pad 1Event 2 NO
Well 02Pad 1Event 31NO
Well 01Pad 2Event 16NO
Well 01Pad 2Event 23NO
Well 02Pad 2Event 1 NO
Well 02Pad 2Event 29YES
Well 02Pad 2Event 31NO

 

Any assistance would be much appreciated!

 

Luke

5 REPLIES 5
LordNeilLord
15 - Aurora

Hey @jlrouquette 

 

The summarize tool would be the tool here 🙂

 

Group by Pad, Max of Value, then you can rejoin this back to get your original data to get your "large" flag

 

Neil

Thableaus
17 - Castor
17 - Castor

Hi @jlrouquette 

 

Here's a solution:

 

Validation_1.PNG

 

- Find the Max value per pad using Summarize Tool

- Left Join this max value to the original dataset

- Use formula tool to apply "YES" or "NO" condition

- Organize your dataset again by sorting by a Record ID

 

At the end I validated the desired output and it matched.

 

WF attached.


Cheers,

NicholasM
Alteryx
Alteryx

Neil, that is exactly what I was thinking, you beat me to the punch!

 

Attached is the workflow 

andyuttley
11 - Bolide
11 - Bolide

Hi @jlrouquette 

Couple of ways, you can do it in a multi-row formula like you say (of which there's many approaches within it you could take in the formula)

 

Or like @LordNeilLord says, you can use a summarise.

Both options included as examples here... 

 

Be mindful of whether you want the solution to name just the first instance of the largest number as "YES", or all of them (e.g. if you had several all with the value 33.5 in pad 1) - either option is doable; see attached workflow 

 

Andy 

LordNeilLord
15 - Aurora

@NicholasM 

 

Simple minds think alike?

 

Labels