web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Limit count of rows fe...
Power Apps
Unanswered

Limit count of rows fetched from sharepoint list in powerapps

(0) ShareShare
ReportReport
Posted on by 287

Is there any way i can limit the no:of rows being fetched from sharepoint list in powerapps ?

 

Scenario : 

Need to display last month data to user from my sharepoint list (having >6000 items),so i need to fetch hardly one month data in powerapps only at the screen where i am calling my list (so i don't want to change the overall threshold set for the app)

Categories:
I have the same question (0)
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @vish_p 

     

    did you try Filter function on the date field

     

    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-filter-lookup

     

    Thanks.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hey,

     

    you can try onStart doing something like this. 

    ClearCollect(Collection1, Filter('Datasource', ID >= 1 && ID <= 2000, another_filter)),
    ClearCollect(Collection2, Filter('Datasource',ID >= 2001 && ID <= 4000, another_filter)),
    
    ClearCollect(MergedCollection, Collection1, Collection2)

    Hope this helps.

  • RezaDorrani Profile Picture
    12,145 on at

    Hi @vish_p 

     

    2 things 

     

    1- filtering a data source on a date field in SharePoint will run into delegation issue because Date fields are not delegable https://docs.microsoft.com/en-us/connectors/sharepointonline/

    What you can do is for the date field create an equivalent date_number field which stores the date information in numeric format

     

    example :    Date 8/20/2019

    Your date_number field stores this value as a Number like 20190820

    Note: YYYYMMdd format 

    This is the extra step you would have to take currently to avoid delegation on date fields

     

    2- Since your list has grown beyond 5000 items, you need to ensure that the column you are filtering on has an index set on it

    You can go to list settings and set index on the Date_Number field

     

    The you can safely query your SharPoint list using the Date_Number field (numeric)

     

    Regards,

    Reza Dorrani

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

     

  • vish_p Profile Picture
    287 on at

    Hi @Anonymous ,

     

    I tried using the date filter,but since my list exceeds view threshold ,my app is throwing a limit view threshold error.

  • vish_p Profile Picture
    287 on at

    HI @Anonymous ,

    Thanks for the suggestion

    This can be used as a temporary fix but not permanent as i am showing recent data and the ID is also not proper also if i give ID>4000 ,then all the datas after 4000 will be shown and once my list crosses lets say 6500 rows again i have to go to the formula and change the number 4000..thats king of semi automatic.

     

    Also as per your formula i dont have to show all the 6000 entries here..only recent month's i have to show

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 387

#2
timl Profile Picture

timl 340 Super User 2026 Season 1

#3
Vish WR Profile Picture

Vish WR 301

Last 30 days Overall leaderboard