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 / Sum on multiple lookup...
Power Apps
Answered

Sum on multiple lookup values

(0) ShareShare
ReportReport
Posted on by 5

Hi,

 

I'm building a "welcome form" for new employees in my company. For each new employee, we fill in a form with materiel and licences needed. We want to calculate the total annual cost for licences depending on the selected licences. I have 2 sharepoint lists :

  • a list with all the informations (name, firstname, department...) and a dropdown list allowing multiple selections for licences
  • This dropdown list points to a second sharepoint list containing 2 columns : name (of the software ie SAP, Dynamics...) and annual cost.

My dropdown list is called "selection" and the datasource in power app "logiciels_1".

So I created a label with this formula : 

 

Sum(LookUp(Logiciels_1;Nom=selection.Selected.Value;'Coût annuel'))

 

The problem is that only the cost of the last selection is displayed on my label.

Any ideas ?

 

Many thanks 🙂

Categories:
  • WarrenBelz Profile Picture
    156,754 Most Valuable Professional on at

    Hi @Raywyrr ,

    I have not tested this, but you might try

     

    Sum(
     Filter(
     Logiciels_1;
     Nom=selection.Selected.Value;
     'Coût annuel'
     )
    )

     

    however, if. not and you have a gallery formed with the filtered list, the sum is

     

     Sum([Gallery name].AllItems,[Sum column name])

     

    The easiest solution would be to have a small hidden gallery with this column in it.


    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.

     

  • Verified answer
    v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @Raywyrr ,

    Do you choose multiple licenses within the selection Dropdown list?

     

    Based on the formula that you mentioned, I think you have some misunderstanding with the LookUp function. The LookUp function could only return single one record which matches the filter condition you specified.

     

    In addition, the selection.Selected.Value formula could only return the latest selected option within the ComboBox. I assume that you could select multiple options within the selection Dropdown list (ComboBox), and the selection Dropdown list list available License name within it, is it true?

     

    Please consider modify your formula as below:

    Sum(
     Filter(Logiciels_1; Nom in selection.SelectedItems.Value);
     'Coût annuel'
    )

    Note: I assume that the selection Dropdown list that you mentioned is actually a ComboBox. The "logiciels_1" represents your second SP List.

     

    Best regards,

  • Raywyrr Profile Picture
    5 on at

    Hi,

     

    It works !!

     

    You are right, I totally misunderstood the Lookup function.

     

    many thanks !

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 271

#3
Mohsin Ali Profile Picture

Mohsin Ali 239

Last 30 days Overall leaderboard