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 / Sum a column from a Lo...
Power Apps
Unanswered

Sum a column from a Lookup Table.

(0) ShareShare
ReportReport
Posted on by 158

I'm not sure why I'm not getting a result from this.  This function is in a label within a gallery.  Screen Shot 2020-01-31 at 1.39.52 PM.png

 

I'm pretty sure the filter is working correctly, I made a separate gallery using the same filter (replacing ThisItem with the appropriate references).  I think the problem is in my Sum function.  

 

Context:

Within a gallery using an entity called "Inventories", I'm trying to add the values in a filtered column from a related entity called "Reserved Stocks".  Each Item in the Inventory gallery has a few related records in the Reserved Stocks entity.  For each item, I'm using a filter, and then summing a column called "ReservedStock".  

 

The function is showing no errors (other than delegation, which shouldn't be an issue because I'm using CDS) - any idea why my label is blank?

 

Thanks in advance!

Categories:
I have the same question (0)
  • eka24 Profile Picture
    20,923 on at

     

    Filter(Sum(Gallery1.AllItems,’Reserved Stocks’),StartDate>=(Value(StartDate_Label.Text)&&
    StartDate<=Value(End_label.Text)

     

    If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution.

  • Connor55 Profile Picture
    158 on at

    @eka24 

     

    Maybe I'm misunderstanding, but this isn't working.  I need to take the sum of a filtered table - wouldn't the sum function need to be outside the filter function?

  • eka24 Profile Picture
    20,923 on at
    Just as you said the filter work without the sum. If the label in which you have put the formula is inside the gallery then I misunderstood you. If the label is not part of the gallery but outside somewhere on the screen then:
    1. Do your filter on the gallery that works
    2. Put in the label this formula: Sum(gallary1.AllItems, 'Reserved stock')
    3. If its inside the gallery, is it a running total. Because a label cannot be only one in a gallery.

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 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard