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 / Best way to get the co...
Power Apps
Unanswered

Best way to get the count of a column that contains multiple lookups?

(1) ShareShare
ReportReport
Posted on by 377

Hi 

I have a Canvas App that displays data from some SharePoint Lists.

 

Companies is a list of Companies 🙂

Articles is a list of Articles about those Companies.

An Article can be about one or more Companies.

 

I do a Lookup from the Articles List to the Companies Lists.

 

I have two galleries.

Is there a way to show the amount of Articles about a Company in the Companies Gallery?

The Articles and Companies galleries are one two different pages.

 

Thanks

P

 

 

 

Categories:
I have the same question (0)
  • MVP-Phipps Profile Picture
    3,521 Super User 2024 Season 1 on at

    Yes do a CountRows with a Filter.

    Or @pmwhelan You can use a:
    CountIf(Articles ,companyLookupId=ThisItem.Id))

    Please Accept as Solution if it solves your question. Or just give it a Thumbs Up if it is helpful because this can help others.

    LinkedIn: https://www.linkedin.com/in/charlie-phipps-%F0%9F%91%A8%E2%80%8D%F0%9F%92%BB-91338715b/
    YouTube: https://www.youtube.com/channel/UChmFBGU1YKIU91sNMQ7buGg
    Twitter: https://twitter.com/phipps0218

  • g1224 Profile Picture
    348 Super User 2024 Season 1 on at

    You can use something like : 

    CountIf(Articles ,companyLookupId=ThisItem.Id)). 

    To avoid delegation you can, use collections and put countRows over collection. 

     

     

     

  • pmwhelan Profile Picture
    377 on at
  • g1224 Profile Picture
    348 Super User 2024 Season 1 on at

    No its not delegable . You can use countif if your data limit is less . If you have to handle more records , go with delegable functions/collection method . 
    Try following this thread :https://rezadorrani.com/index.php/2020/08/07/power-apps-count-rows-in-a-sharepoint-list-library-avoid-delegation/ . Credits to Reza Dorrani.

  • WarrenBelz Profile Picture
    156,277 Most Valuable Professional on at

    Hi @pmwhelan ,

    If your Filter returns less records than your Delegation limit, you can do this

    With(
     {
     wComp:
     Filter(
     Articles,
     companyLookupId = ThisItem.Id
     )
     },
     CountRows(wComp)
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 396 Most Valuable Professional

#2
11manish Profile Picture

11manish 134 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 101 Super User 2026 Season 2

Last 30 days Overall leaderboard