This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
Hi,
I have a column of V_String inputs that have repeating values, I am trying to write a formula that will search that column for repeats and then output the corresponding number of repeats into a seperate column.
The column is last names, and I am trying to determine # of people in each family based on how many last names repeat. So, if the last name is Abbott and there are 10 Abbots in the Last Name column, I want 10 to appear next to each Abbott in last name in the FamilySize column next to it.
Hope that is clear.
Thanks!
I would use the Running Total tool. You can group by any field, so if you ensure that the Last Name column is sorted, you can group by the Last Name field which should start over the running total.
You could then use a Summarize Tool and group by the Last Name and take the Max value of the Running Total column, and then join it back to your original data source so that the total shows up next to each name.
Let me know if you don't understand and I can put together a quick example.
Thanks,
Rod
Doesn't the Running Total node only handle numeric values? I am still having some difficulty with this.
Sorry, yes, you are correct. What you could do is just add a column in a Formula tool that gives the constant of '1', and then do a running total on that.
But in creating an example for you, I figured out that is WAY overkill, and not sure why my mind went that way.
Just use a Summarize tool to begin with, group by the name, and count the number of records. Join that back to the original data set.
Example attached...
Sorry again to confuse...
Rod
No problem! Thank you for the help!
Using the following flow you would be able to label duplicate and count them later with Summarize tool