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 | Equipment | Amount |
Building 1 | Monitor | 12 |
Building 12 | Monitor | 3 |
Building 2 | Monitor | 11 |
Building 1 | Monitor | 9 |
- 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!
Solved! Go to Solution.
@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)
Hi @Applications ,
What is the '{Name}' field you refer to - it is not in the list you have posted.
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.
@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)
So I changed ComboBox 1 to this, it works perfectly, but when I changed ComboBox 2 I get a blank dropdown:
And since none of the values are in there the label doesn't recognize anything to sum it. Any suggestions?
Perfect, and everything else worked as intended now - thank you so much!
User | Count |
---|---|
156 | |
91 | |
81 | |
74 | |
57 |
User | Count |
---|---|
197 | |
166 | |
99 | |
95 | |
79 |