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 / Collection: Counting P...
Power Apps
Unanswered

Collection: Counting Products from Category?

(0) ShareShare
ReportReport
Posted on by 48

I want to build a quote tool. I will use a collection called colSelectedProducts. I want to prohibit users from adding too many products from certain categories. 

 

 

ClearCollect( colSelectedProducts, { Item: "Denim Jeans", Category: "Pants", Quantity: 2 }, { Item: "Rolex Watch", Category: "Watch", Quantity: 1 })

 

 

I'll have a table with {Category: "Jeans",Limit: 5}.{Category:"Watch",Limit:1} to set the limitations per category.

 

How do count the products in the colSelectedProducts Collection to make sure that there aren't, for example, 2 watches?

Categories:
  • AaronKnox Profile Picture
    514 Super User 2024 Season 1 on at

    Hi @oguruma ,

    The solution might be the CountRows() function:

    CountRows(Filter(colSelectedProducts, Category="Watch"))

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

#2
Mohsin Ali Profile Picture

Mohsin Ali 225

#3
M Bilal Khan Profile Picture

M Bilal Khan 192

Last 30 days Overall leaderboard