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 the gallary based...
Power Apps
Answered

sort the gallary based on the quantity of InsatallBaseEndUser

(0) ShareShare
ReportReport
Posted on by 4

Hi, I am trying to sort the gallary based on the quantity of InsatallBaseEndUser. On my gallary's item's property I have 'Sort(Distinct(ColEU,installedbaseEndUserName),SortOrder.Descending) ' .gall.PNG

Categories:
  • v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @RafeAdilSk,

    Do you want to distinct each installedbaseEndUserName and cauculate how manys rows in each distinct user group?

     

    If so, please set the Items property as below:

    Sort(AddColumns(Distinct(ColEU,installedbaseEndUserName),"Quantity",CountIf(ColEU,installedbaseEndUserName=Value)),"Quantity",SortOrder.Descending)
  • RafeAdilSk Profile Picture
    4 on at

    Hi @v-qiaqi-msft updated the items property still not sorting accordingly.2ng.PNG

  • v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @RafeAdilSk,

    I have tested it in my scenario, the formula works as expected, tell me what makes the difference in your scenario?

    Count a wrong quantity for some special user?

  • RafeAdilSk Profile Picture
    4 on at

    Hello @v-qiaqi-msft 

    The sorting is happening on the enduser names instead of the quantities they have. Nothing seems changed.

     

  • Verified answer
    v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @RafeAdilSk,

    That's weird.😂

    The logic is correct and the syntax is also correct.

     

    This is my testing result

    vqiaqimsft_0-1688716809014.png

    Try to re-write the formula.

     

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

#2
M Bilal Khan Profile Picture

M Bilal Khan 325

#3
Mohsin Ali Profile Picture

Mohsin Ali 232

Last 30 days Overall leaderboard