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

Count rows Delegation problem

Hi everyone

I think I have delegation issues due to count rows, my app will be storing a lot of records, about 500 a day. I have been trialing with fake data for testing purposes, and when I hit 500 records in my gallery it won't add anymore. Just wondering if there is a work around.

 

AddColumns(
    SortByColumns(
        Filter(
            GroupBy(
                Sanford_Pallet_Serial_Number_Record,
                "DateOfProduction",
                "SNDumped",
                "SNGroup",
                "PalletNumber",
                "OPProductCode",
                "DataPool"
            ),
            DateOfProduction >= DatePicker01_1.SelectedDate && DateOfProduction <= DatePicker02_1.SelectedDate
        ),
        LabelSwitchCode.Text,
        Descending
    ),
    "ItemCount",
    CountRows(DataPool)
    
)

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

You might want to try putting your Filter inside your Group By - it should then be processed first. Hopefully your record count from the Filter is below your delegable limit (500 to 2000) for the selected date range.

AddColumns(
    SortByColumns(
            GroupBy(
        Filter( Sanford_Pallet_Serial_Number_Record,           
DateOfProduction >= DatePicker01_1.SelectedDate && DateOfProduction <= DatePicker02_1.SelectedDate),
                "DateOfProduction",
                "SNDumped",
                "SNGroup",
                "PalletNumber",
                "OPProductCode",
                "DataPool"
            ),

        LabelSwitchCode.Text,
        Descending
    ),
    "ItemCount",
    CountRows(DataPool)
    
)

What is your data source? PowerApps is not great/efficient at data manipulation so the best approach is to do as much as possible on the database server so that PowerApps is just presenting the data which has already been 'shaped' into the format that you need. SQL is great for this, but CDS and SharePoint are very limited in what data manipulation the server will support.

View solution in original post

4 REPLIES 4
Super User III
Super User III

Hi @Corissandageri ,

You can increase this to 2,000 in Advanced Settings, however beyond that GroupBy() is also not Delegable.

 

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.

Hi @Corissandageri ,

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.

Super User
Super User

You might want to try putting your Filter inside your Group By - it should then be processed first. Hopefully your record count from the Filter is below your delegable limit (500 to 2000) for the selected date range.

AddColumns(
    SortByColumns(
            GroupBy(
        Filter( Sanford_Pallet_Serial_Number_Record,           
DateOfProduction >= DatePicker01_1.SelectedDate && DateOfProduction <= DatePicker02_1.SelectedDate),
                "DateOfProduction",
                "SNDumped",
                "SNGroup",
                "PalletNumber",
                "OPProductCode",
                "DataPool"
            ),

        LabelSwitchCode.Text,
        Descending
    ),
    "ItemCount",
    CountRows(DataPool)
    
)

What is your data source? PowerApps is not great/efficient at data manipulation so the best approach is to do as much as possible on the database server so that PowerApps is just presenting the data which has already been 'shaped' into the format that you need. SQL is great for this, but CDS and SharePoint are very limited in what data manipulation the server will support.

View solution in original post

Hi Paul

I have increased the delegable limit for now, which will suffice for daily production, not the ideal for reporting. I also moved the filter as you suggested to limit data retrieved.

Thank you all for your contributions 

P.S Sharepoint is  the datasource.

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (49,001)