Okay, I have a source and let's say there are two fields and they look like this:
Matching Number | Type |
123456 | 1 |
123456 | 2 |
112233 | 1 |
112233 | 2 |
112233 | 3 |
223344 | 2 |
223344 | 4 |
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?
Solved! Go to Solution.
@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
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.
Hi @cowannbell ,
I guess it's the use case of Sample Tool.
A sample workflow is attached. I hope this helps.
Input Data
RecordID | Matching Number | Type |
1 | 123456 | 1 |
2 | 123456 | 2 |
3 | 112233 | 1 |
4 | 112233 | 2 |
5 | 112233 | 3 |
6 | 223344 | 2 |
7 | 223344 | 4 |
Configuration of Sample Tool
Output Data
RecordID | Matching Number | Type |
1 | 123456 | 1 |
3 | 112233 | 1 |
6 | 223344 | 2 |
The assumption is that the data is already sorted by Matching Number and Type (Ascending) before Sample Tool.
Thank you, this is what I needed and it's work's great.
Yes, I did have the sort in first.
User | Count |
---|---|
63 | |
28 | |
23 | |
23 | |
22 |