Using Slice to limit the rows in a view (return Top n rows)

#1

Want the first N rows that match a query? Use Slice in your filter:

First 5 tasks with highest priority: thisRow.in([Todo List].Sort(false,Priority).Slice(0,5))

10 Likes

Show only the 3 most recently added rows that match a certain value
Top 10 list from table
Find Unique Matches in Another Table
#2

Great tip! This is especially awesome when using BulletedList() on the canvas so that you can show a summary in list format.

3 Likes

#3

I’m not having the same luck. Based on the above I would expect that just adding Table.Slice(0,3) to the table filter would just give me the top 3 rows of the table. When I do that, that’s not what I’m seeing. I’m actually seeing that it doesn’t do anything.

0 Likes

#4

I’m having problems getting this to work as well. Do you put this in the main filter for the table? It doesn’t seem to have any effect at all.

Thanks!
– Maria

0 Likes

#5

Here’s an example with a walkthrough of the key steps:

6 Likes

#6

Thanks so much! That totally helped.
Makes it easy to sort and filter a row, then just pull out the first X rows of it. Nice!

Thanks,
Maria

0 Likes