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 Apps
Suggested Answer

Delegation problem

(1) ShareShare
ReportReport
Posted on by 136
Hello,
why is that this - comparing data and only showing future dates is not making up a delegation issue:
 
ClearCollect(colBoard; Filter(DelnikPrescasy; Kdy >= Today()));;
 
and this (only a calendar week number is in the column) so:
 
ClearCollect(colBoardT; Filter(DelnikPrescasyT; Value(KdyT) >= WeekNum(Today())));;
 
 
And furthermore, how can I prevent this issue (best not only visually but functionally, because this will be a big table :-))
Many thanks
Categories:
I have the same question (0)
  • Suggested answer
    Soufyane Profile Picture
    69 on at

    Hi, 
    The reason is Kdy >= Today() is a plain date comparison, Dataverse understands that natively and does the filtering on its side. No problem.

    But with Value(KdyT) >= WeekNum(Today()), Dataverse has no idea what WeekNum or Value means, it can't translate that into a server query. So Power Apps pulls the first 500 rows locally and filters there. That's your delegation issue, and with a big table you'll be missing records without even knowing it.

    The real fix honestly is to store a proper date in that column instead of just the week number. Then you filter the same way as your first query and the problem goes away completely.

    If changing the column isn't an option, load everything into a collection first with ClearCollect, then apply WeekNum on the collection. Since collections live in memory, delegation doesn't apply. But fair warning, on a big table that's going to be slow on app load.

    --------------------------------------------------------------------------------------------------------------------

    If this response resolves your issue, please mark it as the Verified Answer so it can help other community members as well.

    📩 Need more help? Just mention @Soufyane and I’ll be happy to assist.

    💛 A Like always motivates me to keep contributing!

    Soufyane DARDAZ
  • Radovan Santa Profile Picture
    40 on at

    Before diving into the root cause, could you please confirm which data source you're using (e.g. SharePoint, Dataverse, SQL Server)?

     

    Delegation behavior varies significantly depending on the connector, and the functions used in your second example (Value, WeekNum) may or may not be delegable depending on that.

     

    Once confirmed, I can provide a more precise and scalable solution 👍

  • MS.Ragavendar Profile Picture
    6,545 Super User 2026 Season 1 on at
     
    Try this formula but collection will limit only upto 500-2000 records based on the limit which you have configured.
     
    With(
        { curWeek: WeekNum(Today()) },
        ClearCollect(
            colBoardT,
            Filter(
                DelnikPrescasyT,
                Value(KdyT) >= curWeek
            )
        )
    )
    ✅If this helped, please Accept as Solution to help others ❤️ A Like is appreciated 🏷️ Tag @MS.Ragavendar for follow-ups.
  • JM-14081323-0 Profile Picture
    136 on at
    It is DFT tables (Teams).
     
    Guess I have to use that old trick with stacking up collection per /2000 pieces and then filter that, or?
     
    I need to work with calendar weeks on this matter, should I dont want to calculate it somehow from the date or the other way round which I dont really.
  • Suggested answer
    11manish Profile Picture
    1,391 on at
    In Microsoft Power Apps, delegation works differently in your two formulas:
     
    Working Formula
    • Filter(DelnikPrescasy; Kdy >= Today())
    Delegable because:
    • Direct Date column comparison
    • No transformations
    Non-Delegable Formula
    • Filter(DelnikPrescasyT; Value(KdyT) >= WeekNum(Today()))
    Not delegable due to:
    • Value() → type conversion
    • WeekNum() → non-delegable function
    Causes data limit (500/2000 rows)
    Impact
    • Incomplete/incorrect results for large datasets
    Best Fix
    • Store data in proper format:
    • Use Date or Number column (WeekNumber)
    • Avoid functions inside Filter()
    Prefer:
    • Date >= Today() (fully delegable)
  • JM-14081323-0 Profile Picture
    136 on at
    Hi all,
     
    I managed to work with normal dates in date format in a table and have a second formula column which makes it calendar week.
    Then I filter collection to show up like that (KdyKTT is the formula column):
     
    ClearCollect(colBoardT; Filter(DelnikPrescasyT; KdyKTT >= WeekNum(Today())));
     
    Will there be a hidden delegation issue on this or not? Warning doesnt come up. Thank you.
  • WarrenBelz Profile Picture
    155,052 Most Valuable Professional on at
    Adding to what @MS.Ragavendar has provided, you can be sure of Delegation using a Variable and the correct data type for KdyT
    If it is a Number
    UpdateContext({varWeek: WeekNum(Today())};
    ClearCollect(
       colBoardT; 
       Filter(
          DelnikPrescasyT; 
          KdyT >= varWeek
       )
    );;
    If it is a Text value
    UpdateContext({varWeek: Text(WeekNum(Today()))};
    ClearCollect(
       colBoardT; 
       Filter(
          DelnikPrescasyT; 
          KdyT >= varWeek
       )
    );;
     
    Please Does this answer your question 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 answering Yes to Was this reply helpful? or give it a Like
    Visit my blog
    Practical Power Apps    LinkedIn  
     
  • WarrenBelz Profile Picture
    155,052 Most Valuable Professional on at
    A quick follow-up to see if you received the answer you were looking for. Happy to assist further if not.
     
    Please Does this answer your question 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 answering Yes to Was this reply helpful? or give it a Like ♥
    Visit my blog
    Practical Power Apps    LinkedIn   
  • JM-14081323-0 Profile Picture
    136 on at
    Hi Warren, I used my solution which I wrote two replies above and will be happy if you confirm that this will be O.K.
  • WarrenBelz Profile Picture
    155,052 Most Valuable Professional on at
    I was responding to your question on a "hidden" delegation limitation, which certainly can exist in some circumstances - I have found some strange ones with dates that are defined in With() statements. I was simply giving you an option that will always be Delegable.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 490

#2
WarrenBelz Profile Picture

WarrenBelz 427 Most Valuable Professional

#3
Vish WR Profile Picture

Vish WR 381

Last 30 days Overall leaderboard