# Matching Workflow: How to limit rows dynamically by group?

**URL:** <https://community.parabola.io/t/matching-workflow-how-to-limit-rows-dynamically-by-group/2756>\
**Category:** Ask a question\
**Created:** [June 22, 2023, 8:28pm UTC](https://community.parabola.io/t/matching-workflow-how-to-limit-rows-dynamically-by-group/2756 "2023-06-22T20:28:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Movig](https://avatars.discourse-cdn.com/v4/letter/m/b782af/32.png) [@Movig](https://community.parabola.io/u/Movig)\
**Post date:** [June 22, 2023, 8:28pm UTC](https://community.parabola.io/t/matching-workflow-how-to-limit-rows-dynamically-by-group/2756/1 "2023-06-22T20:28:13Z")

</div>

I have a list of creators and a list of brands. I’ve combined the two tables to find relevant matches (e.g. are in the same content area), e.g.

- Creator 1, Brand X
- Creator 1, Brand Y
- Creator 2, Brand Y
- Creator 2, Brand Z
- Creator 2, Brand N  
etc.

For each creator, I want to now limit the results so they get only 10 matched brands. How can I go about doing this? The ‘limit rows’ doesn’t work in this case since each Creator needs to have 10 brands each. Also the # of creators is big and dynamic so I can’t set up separate filtered tables. Thanks!

---

<div class="post-metadata">

**Author:** ![Emory\_Stainbrook](https://sea2.discourse-cdn.com/flex020/user_avatar/community.parabola.io/emory_stainbrook/32/1772_2.png) [@Emory\_Stainbrook](https://community.parabola.io/u/Emory_Stainbrook)\
**Post date:** [June 23, 2023, 4:44pm UTC](https://community.parabola.io/t/matching-workflow-how-to-limit-rows-dynamically-by-group/2756/2 "2023-06-23T16:44:38Z")

</div>

Hi @Movig - Welcome to the Community! I know we chatted about this Flow earlier so excited to see the progress you make on it!

One way that you could do this is to use an [Add row numbers step](https://parabola.io/transform/insert-row-numbers) and under the Number Settings section, number based on the unique identifier column that you are using for the creator. The number column will number the rows for each unique creator so if one creator has 20 rows, they will be numbered 1-20 and if another has 14, they will have 1-14 in that column, etc.

From there, use a [Filter rows step](https://parabola.io/transform/filter-rows) and set it to keep rows where that row number column is less than or equal to 10. This will keep the first 10 rows for each creator!

Let me know if you have any questions!

---

<div class="post-metadata">

**Author:** ![Movig](https://avatars.discourse-cdn.com/v4/letter/m/b782af/32.png) [@Movig](https://community.parabola.io/u/Movig)\
**Post date:** [June 24, 2023, 3:46pm UTC](https://community.parabola.io/t/matching-workflow-how-to-limit-rows-dynamically-by-group/2756/3 "2023-06-24T15:46:26Z")

</div>

Thanks yes we did this and is working well! Quick question is there a way to randomize before adding the row number step? so that it’s not necessarily just the first 10 that come from the initial pull
