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 / Distinct on a Choices ...
Power Apps
Unanswered

Distinct on a Choices column

(0) ShareShare
ReportReport
Posted on by 193

Hi everyone,

I would like to do a Distinct on a Choices column (Lookup field)

 

this is original: Choices([@'Academy-Series'].'LUP-Employees')

 

Writing with Submitform works perfectly fine.

 

If I add the distinct, it doesn't write anything
Distinct(Choices([@'Academy-Series'].'LUP-Employees'),Value)

 

What am I doing wrong?

 

Regards,

 

Raymond

Categories:
I have the same question (0)
  • SpongYe Profile Picture
    5,909 Super User 2026 Season 1 on at

    Hi @rvdhorst 

     

    You are missing the .Result at the end. 

    Distinct(Choices([@'Academy-Series'].'LUP-Employees'),Value).Result

     


    ------------------------------------------------------------------------------------------------------------------------------
    If I have answered your question, please mark your post as Solved. Remember, you can accept more than one post as a solution.

    If you like my response, please give it a Thumbs Up.

  • Prabhakar_S Profile Picture
    735 Moderator on at

    Hi @rvdhorst ,

     

    The 'Distinct' function in PowerApps is used to return distinct values from a data source, but it's typically applied to a collection or table of data. It might not work as expected when applied directly to the 'Choices' function, especially for a Choices column or a Lookup field. Instead, you can first retrieve the distinct values from the Choices column and then use them in your app.

     

    Here's a step-by-step approach:

     

    Create a Collection:
    - Start by creating a collection to store the distinct values from your Choices column. You can do this in the 'OnStart' property of your app or on a specific screen.

    ClearCollect(DistinctEmployees, Distinct(Choices([@'Academy-Series'].'LUP-Employees'), Value))

    This code creates a collection named 'DistinctEmployees' that contains the distinct values from the 'LUP-Employees' Choices column.

     

    Use the Collection:
    - After creating the collection, you can use it in your app wherever needed. For example, if you want to populate a dropdown with the distinct employee values, set the `Items` property of the dropdown to 'DistinctEmployees'.

    DistinctEmployees

     

    SubmitForm:
    - When you want to submit the form, you can use the selected value from the dropdown or any other control bound to the 'DistinctEmployees' collection. The 'SubmitForm' function should work as expected with the selected value.

    By creating a collection with distinct values from the Choices column, you separate the data retrieval from the actual usage in your app, making it easier to work with the distinct values in various parts of your application.

     

    Thanks!!!

     

    Please consider marking my response as the accepted solution if it successfully resolves your concern. If you found the information beneficial in other aspects, kindly express your appreciation by giving it a thumbs-up.

  • rvdhorst Profile Picture
    193 on at

    If I add .Results, I get the red line underneath (see image) Regards, RaymondNaamloos.jpg

     

  • rvdhorst Profile Picture
    193 on at

    Thank you for your detailed answer.

    But unfortunately this does not fill the lookup column.

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 June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 325 Most Valuable Professional

#2
11manish Profile Picture

11manish 165

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 88 Super User 2026 Season 1

Last 30 days Overall leaderboard