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

Community site session details

Session Id : TyUXmh9OPK3HZJCrAuNmSg
Power Apps - Microsoft Dataverse
Unanswered

Distinct for large Dataverse table

Like (0) ShareShare
ReportReport
Posted on 23 Feb 2022 10:52:31 by 6

Hey,

I just started playing around with Dataverse and trying to find out well large Datasets work in a Powerapp.
So: I have some toy data with 50k rows or so. Each entry has a random country in the "location" column.

I'd like to create a Dropdown with all possible countries and filter my data by this selected country. 

Here's the problem, I tried setting the Items of my Dropdown to: 

 

Distinct(myData, location) 

 

 

This is the way you'd expect it but due to Disctint not being delegable, this only returns the distinct location values for the first 2000 entries. How do I get all the distinct values? 
(Just to clarify: These are real countries, so there should be around 200, I think)

I thought I might be able to set up a view in Dataverse with either Distinct or GroupBy but I can't find out how to do that either...

Categories:
  • atireg Profile Picture
    2 on 23 Jan 2023 at 15:23:13
    Re: Distinct for large Dataverse table

    Please try the below

     

    Upper(Sort(Distinct(Filter(myData,StartsWith(location,Self.SearchText)),location),Result))

  • Andy3 Profile Picture
    7 on 24 Feb 2022 at 15:53:09
    Re: Distinct for large Dataverse table

    I guess you could run a data flow that pulls the distinct countries from your main data and pushes it to a countries table (similar to previous suggestion but automatic). It's just a quick bit of power query to do that, but I agree still not ideal. I'm similarly finding row limits in PowerApps very frustrating! Most business systems need access to more than a couple thousand rows, come on Microsoft! 

  • AlexTou Profile Picture
    6 on 23 Feb 2022 at 13:28:15
    Re: Distinct for large Dataverse table

    Thanks again.

    Sadly, this isn't a great option. This would work for my toy data set but for any real data where data gets added all the time this isn't viable. 

    I just don't understand how something so simple isn't a default possibility as a view...

  • Drew Poggemann Profile Picture
    9,278 Most Valuable Professional on 23 Feb 2022 at 13:04:22
    Re: Distinct for large Dataverse table

    Hi @AlexTou 

    What I mean is you would do the following:

    1.  In Dataverse, export your rows from your data table into Excel and identify the unique country names (through remove duplicates).  Might take a few exports with 50K rows :).

    2.   Once you have all the duplicates removed then use these distinct rows to populate a "Country" table.  You should be able to do this through an Excel Import...

    3.  Add lookup column to the original table for the Country field (keeping current Location field for now)

    4.  Create a view with the Name, Location and new Country field for your original table

    5.  Export the original table records to Excel with that view and then take the values in the Location column and populate them to the "Country" column

    6.  Import the records and as long as the Name field on the Country table matches the value it will populate the lookup.  

     

    Hopefully this makes sense.

  • AlexTou Profile Picture
    6 on 23 Feb 2022 at 12:58:01
    Re: Distinct for large Dataverse table

    Hi @dpoggemann and thanks for your answer.

    How would I do that though? I mean, it's easy enough to create a table called countries. But I can't populate this with a Distinct() on the other table's column... Or at least I don't know how...

  • Drew Poggemann Profile Picture
    9,278 Most Valuable Professional on 23 Feb 2022 at 12:41:36
    Re: Distinct for large Dataverse table

    Hi @AlexTou ,

    I see your challenge.  My recommendation is to create a Countries table (or Choice if desired) in Dataverse and add the lookup (or choice column) to the table in Dataverse.  This will allow you long term to see how many records by Country and use the Country in other tables as well maintaining the relationships.  After doing this then you can just populate the dropdown with the value from the Countries table (or Choice).

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

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 637 Most Valuable Professional

#2
stampcoin Profile Picture

stampcoin 570 Super User 2025 Season 2

#3
Power Apps 1919 Profile Picture

Power Apps 1919 473

Featured topics

Loading complete