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 / Get SUM for filter com...
Power Apps
Answered

Get SUM for filter comparing dropdown value and SP lookup column

(0) ShareShare
ReportReport
Posted on by

Dear all,

 

I'm recently struggling with the following scenario:
I need to present a number in a label, which would be SUM of all rows from a SP list filtered as per a value of a dropdown.

I have the following formula:

 

Sum(Filter('SP List', 'Dropdown'.Selected.Result = 'Local Code'.Value), 'Amount in EUR')

 

The 'Amount in EUR' is a currency type column.

The 'Local Code' is a lookup type column.

 

The formula above doesn't throw any errors, but there is no result, it's just blank.

Any idea how to improve it?

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    153,793 Most Valuable Professional on at

    Hi @xsomej33 ,

    Firstly try

    Sum(
     Filter(
     AddColumns(
     'SP List',
     "LocalCode",
     'Local Code'.Value 
     ),
     LocalCode = 'Dropdown'.Selected.Result 
     ), 
     'Amount in EUR'
    )

    What type of field is 'Local Code' ?

     

    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.

  • xsomej33 Profile Picture
    on at

    Hi @WarrenBelz,

     

    Thanks - I can see some values being calculated now, but the sum is not correct - looks like it's not taking into account all the rows from the list. Could this be caused by a delegation limitation?

     

    Local Code is a lookup type field.

  • Verified answer
    WarrenBelz Profile Picture
    153,793 Most Valuable Professional on at

    Hi @xsomej33 ,

    Yes - Sum() is not Delegable. As well, Lookup fields are problematic in many ways and require the AddColumns() function (which is also not Delegable) to work with many things including Sum(). Other than setting your Delegation limit to 2,000, the only other way of achieving what you are after if you have more records is making a big collection (this blog of mine may assist).

    Also if you used a Text column instead of a lookup (another blog you might read) , you would be able to sum the records if the filter returned less than  2,000 records.

     

    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.

  • xsomej33 Profile Picture
    on at

    Thanks @WarrenBelz - I have increased the limit to 2000 items and it's now calculated correctly.

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!

Leaderboard > Power Apps

#1
Haque Profile Picture

Haque 70

#2
WarrenBelz Profile Picture

WarrenBelz 64 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 36 Super User 2026 Season 1

Last 30 days Overall leaderboard