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 / Sort grouped by distin...
Power Apps
Answered

Sort grouped by distinct users gallery by countif value

(0) ShareShare
ReportReport
Posted on by 65

Hi All

 

I need your support in the below case

I have a gallery containing distinct users based on selection form another gallery (Gallery5)

i need to sort this gallery based on the number of repeating this user on the gallery

 

this formula is working fine with the gallery but i can't add the needed column to sort the gallery by it

Filter(
ForAll(
Distinct(
Kudos ,
'Kudos to'.Email
),
LookUp(
Kudos,
'Kudos to'.Email= Result And Title=Gallery5.Selected.Title
)
),Title=Gallery5.Selected.Title)

 

this is the count formula and it's working

 

CountIf(Kudos,Title=Gallery5.Selected.Title And 'Kudos to'.Email=ThisItem.'Kudos to'.Email) 

 

Categories:
  • mohanade Profile Picture
    65 on at

    any support guys?

  • Verified answer
    Al_10 Profile Picture
    1,691 Super User 2024 Season 1 on at

    @mohanade 

     

    With({tempFiltered: Filter(Kudos, Title = Gallery5.Selected.Title)},
     Sort(
     AddColumns( Distinct(tempFiltered, 'Kudos to'.Email),
     "countAppear", CountRows(Filter(tempFiltered, 'Kudos to'.Email = Result))
     ),
     countAppear, Descending
     )
    )

     

  • mohanade Profile Picture
    65 on at

    thank you so much, it works

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
11manish Profile Picture

11manish 393 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 278 Most Valuable Professional

Last 30 days Overall leaderboard