Alteryx Designer Desktop Discussions

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

How to split rows into multiple groups

jfsiegried
7 - Meteor

Hi,

 

I need to split my data into different groups, based on a category. For example, let's say I have sales data and want to select one sale transaction per store location. I need to take the full population, split by store location, then select one transaction per store. I could accomplish this by using a series of filter tools then the random % sample tool, but I am trying to create a workflow that would work if new stores keep getting added. Using the filter tool, I would need to keep adding filters. Is there a way for alteryx to do this on its own?

 

Thanks!

2 REPLIES 2
rarmstrong
8 - Asteroid

You can use the Sample Tool.

Select the option 'Random 1 in N Chance for each Record'

Then select 'Store Location' as a Grouping Field.

 

This will give you a random % sample of records for each store location

tom_montpool
12 - Quasar

You could use the Unique tool.

Specify your store location field as the one you want to be uniquely selected. The "U" output will be the first entire record for that store, based on the sort order of your table. If you wanted the largest transaction, sort by transaction. If you want 'most recent', sort by date.

Labels