cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
DublinOH_User
Helper II
Helper II

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

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

 

20 REPLIES 20
WarrenBelz
Super User
Super User

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
Super User
Super User

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.

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

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

 

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
Helper II
Helper II

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

@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
Super User
Super User

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.

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

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (3,144)