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 / Getting the Sum of Val...
Power Apps
Answered

Getting the Sum of Values from a ComboBox GroupBy and Filter Functions?

(0) ShareShare
ReportReport
Posted on by

So let's start with that I'm new to PowerApps and I tend to watch YouTube videos to help guide me on how to build the way I need to haha.

 

But here's my current problem-set and what I need accomplished:

- SharePoint List dataset with multiple items that have the same name with different values, it was a "on-the-go" inventory sheet, example:

 

Buildings

EquipmentAmount
Building 1Monitor12
Building 12Monitor3
Building 2Monitor11
Building 1Monitor9

 

- Cascading ComboBoxes because it needs to be grouped for singularity, then filtered down by equipment in buildings

- My current problem is that I need to display the sum of the equipment after those two ComboBoxes have been selected, see below for example:

 

ComboBox1: Which building you're selecting:

GroupBy('Tracker', "{Name}", "Buildings")

 

ComboBox2: Which equipment youre selecting from that building:

GroupBy(Filter('Tracker', Building = ComboBox1.Selected.'{Name}'), "Item", "TEST")

 

And this is where I'm at, I've tried doing labels and text input boxes for displaying the sum of the values from ComboBox2 but I fail every time. I would greatly appreciate some help with this one! And if I'm doing this in a way that isn't efficient, I'll take guidance on that too haha. Thank you all!

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

    Hi @Applications ,

    What is the '{Name}' field you refer to - it is not in the list you have posted.

  • RuneBH Profile Picture
    24 on at

    Hi Applications 🙂

     

    If I understand you correct you want to get the total amount of the equipment selected in combobox2? If so try to add a label and for the text property insert this formula:

     

    Sum(Filter(tracker, Equipment in ComboBox2.SelectedItems), Amount)

     

    Where "tracker" is the SharePoint list that holds all the buildings and equipments, and where Equipment and Amount are the corresponding columns from that list. 

     

    This should work even if you Amount field in SharePoint is text type field. 

     

     

  • Verified answer
    CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @Applications Please try the following,

    Set the Items property of the first ComboBox to, Distinct(Tracker, Buildings)

    Set the Items property of the second ComboBox to, Distinct(Filter(Tracker, Buildings=ComboBox1.Selected.Result), Equipment)

    Set the Text property of the Label to, Sum(Filter(Tracker, Buildings=ComboBox1.Selected.Result && Equipment=ComboBox2.Selected.Result), Amount)

  • Applications Profile Picture
    on at

    So I changed ComboBox 1 to this, it works perfectly, but when I changed ComboBox 2 I get a blank dropdown:

     

    Applications_0-1638915715153.png

    And since none of the values are in there the label doesn't recognize anything to sum it. Any suggestions?

  • CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @Applications Check this for the 2nd ComboBox,

    CNT_0-1638954789938.png

     

  • Applications Profile Picture
    on at

    Perfect, and everything else worked as intended now - thank you so much!

  • CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @Applications 

    Glad to help!

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 88

#2
WarrenBelz Profile Picture

WarrenBelz 85 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 45

Last 30 days Overall leaderboard