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 / Delegation warning wit...
Power Apps
Answered

Delegation warning with Month () function

(1) ShareShare
ReportReport
Posted on by 110

 

 

 

 

I am using the below code for counting sum when I am using I am getting delegation warnings with && and month function

 

Sum(
Filter(
Resource_Allocations,
Mission_ID.'Mission ID' = DataCardValue16_2.Text &&
DateValue(Plan_Start_Date) <= Today() &&
DateValue(Plan_End_Date) >= Today() &&
Year(Today()) = Year(DateValue(Plan_Start_Date)) &&
Year(Today()) = Year(DateValue(Plan_End_Date)) &&
Month(Today()) >= Month(DateValue(Plan_Start_Date)) &&
Month(Today()) <= Month(DateValue(Plan_End_Date))
),
'Resource FTE'
)

 

 

 

Categories:
I have the same question (0)
  • SpongYe Profile Picture
    5,616 Super User 2025 Season 2 on at

    Hi @faruk1 

     

    This may not be a total solution - you have three non-Delegable elements in your Filter - Sum(), Year() and Month(). If the number of Resource_Allocations in your list are less than your Delegation limit, then this should work:

     

    With(
     {
     _Company:
     Filter(
     Resource_Allocations, 
     Mission_ID.'Mission ID' = DataCardValue16_2.Text
     )
     },
     Sum(
     Filter(
     _Company,
     DateValue(Plan_Start_Date) <= Today() &&
     DateValue(Plan_End_Date) >= Today() &&
     Year(Today()) = Year(DateValue(Plan_Start_Date)) &&
     Year(Today()) = Year(DateValue(Plan_End_Date)) &&
     Month(Today()) >= Month(DateValue(Plan_Start_Date)) &&
     Month(Today()) <= Month(DateValue(Plan_End_Date))
     ),
     'Resource FTE'
     )
    )
    
    
    Source: https://powerusers.microsoft.com/t5/Building-Power-Apps/Delegation-warning-on-Month-and-Year-Formula-in-gallery-label/m-p/2330011


    ------------------------------------------------------------------------------------------------------------------------------
    If I have answered your question, please mark your post as Solved. Remember, you can accept more than one post as a solution.

    If you like my response, please give it a Thumbs Up.

     

  • Verified answer
    KeithAtherton Profile Picture
    3,705 Most Valuable Professional on at

    Hi @faruk1,

     

    The delegation warnings may be appearing because Month / Year functions are not delegable:

    https://learn.microsoft.com/en-us/power-apps/maker/canvas-apps/delegation-overview

     

    Try retrieving filtered 'Resource FTE' data without delegation warnings (e.g. filtering on 'Mission ID', etc) then saving it to a local collection, e.g. colResourceFte. Then filter the local colResourceFte collection using Month / Year functions.


    If I have answered your question, please mark your post as Solved.
    If you like my response, please give it a Thumbs Up.
    Follow me online.

  • faruk1 Profile Picture
    110 on at

    Actually i want that value in my forms datacard but when i added that it removes delegation warning but the value was not coming at all

  • SpongYe Profile Picture
    5,616 Super User 2025 Season 2 on at

    You have something for me to work with? e.g. screenshot?

  • faruk1 Profile Picture
    110 on at

    Actually value is coming correct , but its not showing in data card

  • SpongYe Profile Picture
    5,616 Super User 2025 Season 2 on at

    Hi @faruk1 

     

    In the formula bar, set the Text property of this datacard to aboved formula.

    If not test it with a random label and see what the different is. 

    Most of the time is just a settings that is set wrong. 

     


    ------------------------------------------------------------------------------------------------------------------------------
    If I have answered your question, please mark your post as Solved. Remember, you can accept more than one post as a solution.

    If you like my response, please give it a Thumbs Up.

  • faruk1 Profile Picture
    110 on at

    There is default property availabe but no text property update and default is available

  • SpongYe Profile Picture
    5,616 Super User 2025 Season 2 on at

    I mean the Default property.

    Try with the Text() function and see of that works.

    Also try it with a random label and see what the different is. 


    ------------------------------------------------------------------------------------------------------------------------------
    If I have answered your question, please mark your post as Solved. Remember, you can accept more than one post as a solution.

    If you like my response, please give it a Thumbs Up.

  • faruk1 Profile Picture
    110 on at

    your Solution works thanks to both of you.

  • KeithAtherton Profile Picture
    3,705 Most Valuable Professional on at

    Glad to hear it! Thanks for the update.


    If I have answered your question, please mark your post as Solved.
    If you like my response, please give it a Thumbs Up.
    Follow me online.

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 765 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 272

Last 30 days Overall leaderboard