cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Station1901
Helper III
Helper III

Lookup & Sum

I am looking for some help with creating a Gallery within a power app.

The Gallery is simply named 'Gallery5' which takes draws most of its information from a Sharepoint list named 'StandardsOffered'. Also within that Gallery I have a label named 'ThisCar' which takes its information from the 'Cars' sharepoint list and returns the vehicle number so essentially taking information from 2 different sharepoint list - everything is good to this point.

 

In the 'StandardsOffered' sharepoint list there is a Column which contains the Vehicle numbers - numerous entries (these are added by a separate power app.  There is also a column which records how many times a vehicle has been called which is named 'CalledCount'

 

What I need is a textbox or label with gallery5 that will lookup the vehicle number which is in the 'ThisCar' label (Taken from the 'Cars' Sharepoint list) and then return the sum of 'CalledCount' for that vehicle from the StandardsOffered sharepoint list.

 

Can this be done and if so how????

 

Thanks

 

1 ACCEPTED SOLUTION

Accepted Solutions
RusselThomas
Microsoft
Microsoft

Hi @Station1901 ,

 

It sounds like you're looking for the Sum() function - something along these lines;

Sum(Filter(StandardsOffered, VehicleNumberColumn=ThisCar.Text), CalledCount)

 Hope this helps,

RT

View solution in original post

2 REPLIES 2
RusselThomas
Microsoft
Microsoft

Hi @Station1901 ,

 

It sounds like you're looking for the Sum() function - something along these lines;

Sum(Filter(StandardsOffered, VehicleNumberColumn=ThisCar.Text), CalledCount)

 Hope this helps,

RT

Station1901
Helper III
Helper III

That works perfectly, thankyou.

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,282)