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 / Need help using AVERAGE
Power Apps
Answered

Need help using AVERAGE

(0) ShareShare
ReportReport
Posted on by 421

Hi everyone, I am trying to use AVERAGE in a gallery, but its showing only the first number in the table not averaging the column.  The code is Average(LookUp('Depot-LineItems',crd63_partorderedname = ThisItem.cr3db_crd63_partname).ARRepairCostTotal).

 

Depot-LineItems is a table where I record repairs to items, and the table Depot-Parent is where the parts are listed.

 

Any help would be amazing, thank you!!  Ive never used AVERAGE before.

 

Chris

Categories:
  • CarlosFigueira Profile Picture
    Microsoft Employee on at

    You are probably looking for something along the lines of the expression below:

    Average(
     Filter(
     'Depot-LineItems',
     crd63_partorderedname = ThisItem.cr3db_crd63_partname
     ),
     ARRepairCostTotal
    )

    The LookUp function only returns a single item, and you need all the items that have matching part names to average their cost - in this case the Filter function is more appropriate.

    Hope this helps!

  • ckserra33 Profile Picture
    421 on at

    And just like that Chat GPT has helped me out, thanks all!!!

     

    Chris

  • Verified answer
    ckserra33 Profile Picture
    421 on at

    Average(Filter('Depot-LineItems',crd63_partorderedname = ThisItem.cr3db_crd63_partname),ARRepairCostTotal)

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 220 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 194 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 150

Last 30 days Overall leaderboard