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 function for ...
Power Apps
Answered

Distinct function for combobox is populating blanks

(0) ShareShare
ReportReport
Posted on by 30

Hey guys, im trying to do a simple thing - I have a SP List in which the "Title" column have some duplicate values.
In my app, i would like to populate a combobox with all the UNIQUE "Title" values using the Distinct function, but when im doing it, im getting only blanks:

Barak_S_1-1611485537632.png

Barak_S_2-1611485555662.png

Barak_S_3-1611485566789.png



Any idea why and how can i fix this?

**BTW the "Title" column is text.

 

Thanks

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    156,100 Most Valuable Professional on at

    Hi @Barak_S ,

    Firstly that syntax is correct if test1 is the name of your list and Title is a Single Line of Text column containing values.

    A combo box will not show a value until a selection is made. Just for a debugging exercise, put this

    Sort(
     Distinct(
     test1,
     Title
     ),
     Result
    )

     

    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.

  • Barak_S Profile Picture
    30 on at

    Works Perfect now!
    Why did i need to put in in "sort" and what is "Result"?  Thanks!

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

    @Barak_S ,

    Just a little bug I have struck before - not sure why it happens at random times. Result is the output of an Distinct Filter.

     

    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.

  • RWO Profile Picture
    39 on at

    Hi,

     

    I'm having the same problem using Power Apps for teams.  When I use the Distinct function in combobox Items property, Sort(Distinct(tbl_employees,'BUOrg'),Result), I get a list of blank entries.  If I place this same string in a gallery I get the expected list of values.  Even stranger, if I preview the app and select one of the blank entries in the combobox, the correct selected result is displayed in a label control. If appears that all functions are correct, the combo box list just does not display the text of the list item:

    RWO_0-1640363745671.png

    Also, published the app and got the same result.  Any guidance would be greatly appreciated!

  • Pstork1 Profile Picture
    69,599 Most Valuable Professional on at

    Two things to try to try.  

    1) Make sure the Display Fields and Search Fields properties are set to the column you want to show in the dropdown.

    2) Add a Filter around the outside of the Distinct to remove blank entries.  I've seen an issue where Distinct will return a blank entry as the first item and that seems to blank out all the rest.  This works for me.

    Sort(Filter(Distinct(tbl_employees,'BUOrg'),Not(IsBlank(Result))),Result)
    
  • RWO Profile Picture
    39 on at

    Thanks!

    Your suggestions led me to the resolution.  To the Edit Fields I added Result and moved it to the top of the list.  The list now displays. 

     

    It is a confusing control.  When you add the Combo Box it forces you to selected a datasource which populates the Edit Fields with the fields in the datasource.  When you add an Items formula it appears to orphan the edit fields, i.e. you can delete the edit fields but they do not appear if you try to add them back.  Control needs some work, but at least there is a solution!  Thanks again!

  • Pstork1 Profile Picture
    69,599 Most Valuable Professional on at

    I've seen the same.  That's why I suggested #1.  #2 shows up if there are any blank entries in the list.  When you sort they become the first entry displayed and it doesn't seem to like showing any more after that.

  • Pstork1 Profile Picture
    69,599 Most Valuable Professional on at

    I've seen the same.  That's why I suggested #1.  #2 shows up if there are any blank entries in the list.  When you sort they become the first entry displayed and it doesn't seem to like showing any more after that.

  • RWO Profile Picture
    39 on at

    Similarly, if you use the Choices function in the Combo Box Items property, you need to add the Value field to the top of the Edit Fields list.

  • AnnaMarciniak Profile Picture
    20 on at

    Hallelujah!!!!

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