web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Count when using a dis...
Power Apps
Answered

Count when using a distinct filter

(0) ShareShare
ReportReport
Posted on by 28

Not sure if this has been asked before, if it has I can not find it, so sorry for posting again.

 

I have a gallery which is filtered from another gallery. The filter is using the distinct function. I am trying to add a label into the gallery to show the number within the filter, but am having issues getting the syntax to work.

 

The gallery is displaying in room equipment and I want to show how many of each item there is within that room. For example the room would have 4 handheld microphones, the gallery filters and shows the distinct value of Handheld microphone, I need to add that there are 4 of them.

 

I have tried various combinations of syntax and am only getting error message. I have tried using CountRows with the distinct filter syntax used on the gallery, but it showing a total for all the items, not just the total for the items within the selected room. Any herlp advice pointers welcome. The equipment column is a value.

Categories:
I have the same question (0)
  • Verified answer
    Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @SMStevenson 

    Use GroupBy() on the second gallery to group by items in the room.   In a table called "sls", I used Distinct() on the Regions, analogous to your Rooms..  The second table filters sls by region selected in table 1 and Used GroupBy() on the countries (in your case it would be equipment in the room selected in table 1.  I then counted "restofdata" to derive the count of each country. 

    !1.jpg

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
Kalathiya Profile Picture

Kalathiya 372 Super User 2026 Season 1

#2
WarrenBelz Profile Picture

WarrenBelz 303 Most Valuable Professional

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 238 Super User 2026 Season 1

Last 30 days Overall leaderboard