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 / 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)
  • CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @Applications 

    Glad to help!

  • 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 Check this for the 2nd ComboBox,

    CNT_0-1638954789938.png

     

  • 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?

  • 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)

  • 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. 

     

     

  • WarrenBelz Profile Picture
    153,507 Most Valuable Professional on at

    Hi @Applications ,

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

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
Kalathiya Profile Picture

Kalathiya 401

#2
WarrenBelz Profile Picture

WarrenBelz 334 Most Valuable Professional

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 325 Super User 2025 Season 2

Last 30 days Overall leaderboard