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 Platform Community / Forums / Power Apps / Reference the contents...
Power Apps
Answered

Reference the contents of the gallery

(0) ShareShare
ReportReport
Posted on by 260

Hello

 

I am hoping to improve performance by referencing the gallery instead of the data directly.

I have a column "Load" and "Cumulative Load". I have a gallery that filters by the current user and created today. I'd like the information for the cumulative column to come from the gallery instead of the Sharepoint site to speed things up

 

Sum(Filter('Pour Data','Creator Email' =User().Email,Text(Created, DateTimeFormat.ShortDate) =Text(Today())),'Load (m^3)')+DataCardValue36

 

This is the code for the cumulative column, which itself is DataCardValue36

 

If anyone had any idea on how to get a delegable filter for created today too would be a bonus, but my understanding is that this is not possible

 

Any advice appreciated

Conn

Categories:
I have the same question (0)
  • Verified answer
    WarrenBelz Profile Picture
    155,315 Most Valuable Professional on at

    Hi @ConnM ,

    Have you found the date filter to be not Delegable ?

    With(
     {
     wData:
     Filter(
     'Pour Data',
     'Creator Email' = User().Email &&
     Created = Today()
     )
     },
     Sum(
     wData,
     'Load (m^3)'
     ) + Value(DataCardValue36.Text)
    ) 

    What is your data source  - I hope SharePoint . . .

     

  • ConnM Profile Picture
    260 on at

    Thanks @WarrenBelz 

     

    Source is Sharepoint

    Your code is not delegable with my setup. The issue is Sum, which should not be of too much concern, since there will only be about ten deliveries per user per day

    ConnM_0-1679391211145.png

    But it wasn't actually accumulating. Because I use dd/mm/yyyy I  substituted the following for Created = Today(), otherwise it just showed the current value of Load

     

    Text(Created, DateTimeFormat.ShortDate) =Text(Today())

     

    Testing them both in text labels side by side yours updates faster, but now I have the original delegation warning

    ConnM_1-1679392298558.png

     

    I'm happy with the performance boost. If there is nothing more to add on delegation I will mark this as solved

     

    Thank you very much

    Conn

  • WarrenBelz Profile Picture
    155,315 Most Valuable Professional on at

    HI @ConnM ,

    I did the "pre-filter" to keep the Sum() out of the Delegation equation. I am still confused as to why

    Created = Today()

    is not Delegable on a SharePoint list for you - it certainly is for me. I also use dd/mm/yyyy (Australia). If there are only 10 deliveries per day, you should have no Delegation issues - you might be interested in this blog of mine.

  • ConnM Profile Picture
    260 on at

    The updated code is fully delegable. It doesn't accumulate results for me.
    Just typing Today() in a label gives me 3/21/2023, but my Sharepoint items show as 21/3/2023. So Created = Today() won't match.

    I believe neither the "Text" nor "DateTimeFormat" functions can be delegated

    Interesting to find out that you are not encountering this despite using dd/mm/yyyy. It could be something deep in the settings

    Thank you for your notes on "With". I have been aware of, but not well informed about it

     

    I very much appreciate your help

    Conn

  • WarrenBelz Profile Picture
    155,315 Most Valuable Professional on at

    Hi @ConnM ,

    I don't know where you are located, but dates are stored in UTC in SharePoint and converted back both in actual time zone and format by the Regional Settings on your SharePoint site and/or your local device. The time format you see has nothing to do with Today() equalling this data source value, so unless you have your dates stored as Text, Created = Today() will always resolve and be Delegable, regardless of the format you have. 21/3/2023 and 3/21/2023 both resolve as 23 March 2023 if you show them in LongDate.

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 April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 936

#2
Valantis Profile Picture

Valantis 604

#3
11manish Profile Picture

11manish 518

Last 30 days Overall leaderboard