I need to combine rows , if all the 3 criteria’s meets
Field1 | From | To | Length | Field2 |
ABC | 2518.9 | 6002.1 | 3483.22 | Texas |
ABC | 6002.1 | 6542.8 | 540.3 | Texas |
CDE | 1234 | 4234 | 456 | WY |
EFG | 2234 | 8234 | 123 | WY |
Output looking for is -one row with sum of length and first of From value and last of To value.
Field1 | From | To | Length | Field3 |
ABC | 2518.9 | 6542.8 | 4023.52 | 3 |
CDE | 1234 | 4234 | 456 | 3 |
EFG | 2234 | 8234 | 123 | 3 |
I am very new to Alteryx and not sure even if this is possible?
Thanks,
Solved! Go to Solution.
I am sure this is possible, but I am a little lost on the formatting of your question. How did we get the number 3 for field2?
I would take a look at the multi-row tool. This allows you to compare values in/or across columns.
Hi @pri_GIS,
Agree with Treyson that the 3rd rule is unclear and Multi Row tool will suit your requirement.
Please see attached my suggested solution. You can apply the 3rd row in the Multi Row tool.
Hope it helps.
Cheers,
Lelia
Thanks Treyson for your response.
My bad. It should have been Field 2 (Row 2=3).
Thanks Lelia for your help.
I will try this solution.
Since you are new to Alteryx, I'd like to ask if we can simplify or maybe just rephrase the 3 criteria you are using.
I'll also clarify our understanding of the question by adding to your data set:
Field1 | From | To | Length | Field2 |
ABC | 2518.9 | 6002.1 | 3483.22 | Texas |
ABC | 6002.1 | 6542.8 | 540.3 | Texas |
ABC | 6542.8 | 7000 | 457.2 | Texas |
CDE | 1234 | 4234 | 456 | WY |
EFG | 2234 | 8234 | 123 | WY |
Is this what your new output would look like?
Field1 | From | To | Length | Field2 |
ABC | 2518.9 | 7000 | 4480.72 | Texas |
CDE | 1234 | 4234 | 456 | WY |
EFG | 2234 | 8234 | 123 | WY |
If so we can simplify the ask by doing the following?
Group each record where field 1 and field 2 match
Return the First of a given group for the From Field
Return Last record of a given group for the To Field
Return the Sum of Length Field.
If this is what you are looking for, you'll be able to accomplish this using a single summarize tool:
This is a much less complicated solution for what I understand your true criteria is:
As a last note, you can substitute Min or Max for First or Last depending on your data. Please let me know if you'd like me to elaborate on this.
If this solution helped, please consider liking it and/or marking as the accepted solution.
*
Lelia this was a great help. This tool worked like wonder.
You are awesome!
Thank you so much.