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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Need to count & sum it...
Power Apps
Unanswered

Need to count & sum item from Large SharePoint list (10,000-15,000 items) in canvas app

(0) ShareShare
ReportReport
Posted on by 150

Hello,
I am grateful for any help or ideas anyone can offer.

I have a Sharepoint list as a source for a canvas app that will vary between 10,000 to15,000 lines each month.
Challenge A -  is how can I break the data into filtered (collections, groups, other) so filtered results can be counted, and then with those results add and divide as needed. 

Challenge B - how to create a Distinct list from one column [F] since the list has a >2000 data set. The [Distinct] would result in a list under 200 choices and I am trying to avoid building a second lookup list or a manually built collection - if possible.

 

Roadblocks I have encountered:

  • There are two columns that will filter the data into results less than 2000 rows, but delegation does not allow the collection to filter through the whole SharePoint list. (only returning the first 2000)
  • Even if it was possible to create collections under 2000, one collection would still have to be filtered a second time before those results would be under 2000. (collect based on D filtered by P)

I have found all the formulas I need for adding collections and filtered groups - because I can verify that my results match the data from the first 2000.

 

I saw the articles on trying to make collections with ID numbers - but wasn't able to successfully create a 'number' ID column that canvas would treat as an integer. They used the ID number to collect rows 1<1999, rows 2000<2999...and so on.


For the sake of communicating let's just say I have a table with the following:
Column F  - choice data of which a distinct should return about 200 names

Column D - choice data of which there are 7 distinct, and if used as a filter - only one would be greater than 2000 ( so it would have to be sub-filtered into two smaller collections - meaning use 2 criteria

Column P - choice data of which there are 5 distinct, half of which return more than 2000


Example of formulas we are trying to accomplish that need to include all 15,000:

Filtered count of [P] for each [F]/ Count total number of all [P] for each [F]

Filtered count of [P] for all [F]/ Count total number of all [P] for all [F]

 

Thank you for your valued time,
Dublin Ohio User

 

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    153,079 Most Valuable Professional on at

    Hi @DublinOH_User ,

    I have a blog on Delegation that contains some workarounds with large collections - these might suit your purpose.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • WarrenBelz Profile Picture
    153,079 Most Valuable Professional on at

    Hi @DublinOH_User ,

    Just checking if you got the result you were looking for on this thread. Happy to help further if not.

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • DublinOH_User Profile Picture
    150 on at

    No solution as of 6/30/2021.
    The solution of creating an IDFilter column makes sense -but I could not get it to execute correctly.
    The SP list in question will vary between 10K-15K rows, as we will be changing the data set each month.

    (I was able to write a Flow that deletes all SP rows from a manual trigger and a second one that imports data from Excel with a manual trigger - so we won't have to delete & then copy/paste)

     

    I am stuck with how we should establish the 'IDFilter' column in the SP list.

    • What column type, Calculated?
    • Which formula and format type should be used to make sure the column can be filtered by Canvas? 
    • Writing a Flow for assigning the 'IDFilter' has the potential to time out when I run the import from excel FLOW, Correct?
      • Would not a calculated column solution run more efficiently?


    I tried creating collections from multi-condition filters, but still could not get Canvas to filter through all the rows to bring back results. It would only return results from the first 2000 rows no matter the filter conditions.

    This worked but only is on the first 2000
    I tried creating a collection from filtering but it did not work. (I tested the filter on a gallery to make sure it worked)

    did not work
    Collect(collectCurrentWest,(Filter('PF_PM_ Compliance_Current',REGION="00WEST",'PM SERVICE TYPE'="INSPECTION",'NAME OF PM'="DOT INSPECTION"));

     

    This only collected from the first 2000 rows - 

    Collection issue.png

     

    Thank you for asking if we had a resolution.
    DublinOH_User

  • DublinOH_User Profile Picture
    150 on at

    Images of attempted IDFilter solution attempt:
    IDFilter Column Setting


    ID Filter Column settingID Filter Column setting

     

    Collection results 

     

    No results returnedNo results returned

     

     

     

     

     

     

     

    OnVisible property of screen: formula has delegation warning

     

    Delegation waring for Large data setDelegation waring for Large data set

     

  • WarrenBelz Profile Picture
    153,079 Most Valuable Professional on at

    Hi @DublinOH_User ,

    Calculated columns are not Delegable (and have many other issues in power apps).

    I simply use a numeric column and a "When an item is created" Flow trigger and set it to the ID of the item just created. Note that you will have to "back populate" any existing records. You can do this is a SharePoint datasheet view in "edit in grid mode" by copying and pasting down (you need to keep to about 100 at a time to avoid throttling).

    I have several large lists that work effectively this way.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • DublinOH_User Profile Picture
    150 on at

    Edit in grid mode is still not reliable when we have 12000 rows to paste in.  It would take too long. 
    You don't see any issues with the ID flow causing the Import Flow to time out? Or interfering with one another when running the import FLOW

  • WarrenBelz Profile Picture
    153,079 Most Valuable Professional on at

    @DublinOH_User ,

    I am always reluctant to run "Apply to each" Flows across an entire data set, but theoretically, it should do the job. Just be aware (and this has happened to me once) it has to leave all other values alone or you will have a heap of version reinstating to do.

  • WarrenBelz Profile Picture
    153,079 Most Valuable Professional on at

    Hi @DublinOH_User ,

    Just checking if you got the result you were looking for on this thread. Happy to help further if not.

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • DublinOH_User Profile Picture
    150 on at

    Interesting issue

    The data set will be deleted and reloaded each month. I created FLOWS to delete all items, then built FLOWS to upload new data from an excel file. Plus, there is another FLOW creating the number IDFilter when a new item is created in the list.

    Here is an interesting twist. 

    The IDFilter number continues to grow - even though all lines were deleted and new lines were uploaded with FLOWS.
    Can the number be "reset to start at 1" each time the FLOWs used monthly?
    The number does not resetThe number does not reset

  • WarrenBelz Profile Picture
    153,079 Most Valuable Professional on at

    Hi @DublinOH_User ,

    Unfortunately not unless you create a new list - SharePoint just continues on. What you have to realise is that the deleted items are in the recycle bin (for 93 days anyway) and can be reinstated, so you cannot have duplicate IDs.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard