We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Picked the lowest number

cowannbell
9 - Comet

Okay, I have a source and let's say there are two fields and they look like this:

 

Matching NumberType
1234561
1234562
1122331
1122332
1122333
2233442
2233444

 

I need to be able to pull back one record per matching number and I want it to be the lowest numer type.  So in the example above, I would want line 1, 3 and 6

 

How can I do this?

6 REPLIES 6
BS_THE_ANALYST
15 - Aurora
15 - Aurora

@cowannbell  You'd need to use a Summarize tool. 

 

You can use Group By in this tool and select the method of aggregation within the group. 

 

For instance, you would group on Matching Number and use the aggregation method as the Minimum.

 

To see some example configurations of the Summarize I'd navigate to it within the Transform section in the tool palette, right clicking on it and "open example". 

 

This will provide you with plenty of examples of how to configure the tool so you can teach yourself. This applies to 90% of Alteryx tools.

 

All the best,

BS

All the best,
BS

LinkedIN

Bulien
cowannbell
9 - Comet

Thank you for that information. 

 

I have used the tool many times but not for this type of situation.  Unfortunanly examples don't always help, as in the situation, the example did not help me.  In the example I gave, I only showed two fields but I'm actually dealing with Multiple fields and I want to return all of the fields but only the rows where the type is the lowest for each matching number.  

Yoshiro_Fujimori
15 - Aurora
15 - Aurora

Hi @cowannbell ,

 

I guess it's the use case of Sample Tool.

A sample workflow is attached. I hope this helps.

 

Input Data

RecordIDMatching NumberType
11234561
21234562
31122331
41122332
51122333
62233442
72233444

 

Configuration of Sample Tool

SampleToolConfig.png

 

Output Data

RecordIDMatching NumberType
11234561
31122331
62233442

 

Yoshiro_Fujimori
15 - Aurora
15 - Aurora

The assumption is that the data is already sorted by Matching Number and Type (Ascending) before Sample Tool.

cowannbell
9 - Comet

Thank you, this is what I needed and it's work's great.

cowannbell
9 - Comet

Yes, I did have the sort in first.

Labels
Top Solution Authors