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 Apps
Answered

Distinct SQL

(0) ShareShare
ReportReport
Posted on by 88 Season of Giving Solutions 2025

I have a SQL with 40K rows, I have a ID column that contains 70 distinct values so everyone of the ID shall have 570 rows.
The problem is that powerapps only shows 8 of 70 distinct values. Why? I tried to take a collection same problem

Categories:
  • WarrenBelz Profile Picture
    156,543 Most Valuable Professional on at

    Hi @Bergh .

    It is because Distinct() is not Delegable, so the biggest sample you can analyse is 2,000 records with your Data Row Limit set to this.

     

    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.

    MVP (Business Applications)   Visit my blog Practical Power Apps

     

  • Bergh Profile Picture
    88 Season of Giving Solutions 2025 on at

    Hi @WarrenBelz 
    How can I fixit? import the databas to Datavarese and some magic in there or?

  • Verified answer
    WarrenBelz Profile Picture
    156,543 Most Valuable Professional on at

    Hi @Bergh ,

    Unfortunately Distinct is a "client-side" operation and the sample examined is limited to your Data Row Limit. There is a possibility of getting more than this with Power Automate (see this video), however you will not get 40k collected in one action. Another (but messy) possibility would be if you have a unique numeric identifier to grab them 2k at a time, then combine the results (the total cannot be more than 2k) then get unique values of that.

     

    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.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • Bergh Profile Picture
    88 Season of Giving Solutions 2025 on at

    Thanks @WarrenBelz I will check it out.

  • timl Profile Picture
    37,287 Super User 2026 Season 2 on at

    Hi @Bergh 

    If your data source is a SQL Server database, the solution to this is to create a SQL View that returns the distinct values. 

    CREATE VIEW vw_DistinctValues
    AS
    SELECT DISTINCT(ID)
    FROM
    YourTable

    You can then connect to this view from Power Apps. This will run server side and will be completely delegable.

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

#2
Mohsin Ali Profile Picture

Mohsin Ali 368

#3
WarrenBelz Profile Picture

WarrenBelz 244 Most Valuable Professional

Last 30 days Overall leaderboard