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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Adding Filter to Disti...
Power Apps
Unanswered

Adding Filter to Distinct not working

(0) ShareShare
ReportReport
Posted on by 31

Hi guys

 

I've got the strangest issue. I have a PowerApps screen with a few comboboxes. The comboboxes all use the Distinct() function to get values from a SharePoint list without duplicates. All the comboboxes work. The columns I am looking up in SharePoint are all Single line of Text. My SharePoint list is called 'Items to Action'.

 

Distinct('Items to Action',TypeDisplay)
Distinct('Items to Action',EmployeeName)
Distinct('Items to Action',EmployeeNumber)

 

I decided to filter the results a bit further based on the signed in user, so I added a filter to the datasource part of the Distinct function based on a Person or Group column called "AreaManager":

 

Filter('Leave to Action',User().FullName = AreaManager.DisplayName)

 

Which looks like this when I apply it:

 

Distinct(Filter('Leave to Action',User().FullName = AreaManager.DisplayName),TypeDisplay)
Distinct(Filter('Leave to Action',User().FullName = AreaManager.DisplayName),EmployeeName)
Distinct(Filter('Leave to Action',User().FullName = AreaManager.DisplayName),EmployeeNumber)

 

What I find so strange is that the TypeDisplay combobox continues to work, but the EmployeeName and EmployeeNumber comboboxes stop working.

 

I also perfomed a test where I compared the signed in person to the author field (a.k.a. Created By) and all 3 of the comboboxes work:

Distinct(Filter('Leave to Action',User().FullName = Author.DisplayName),TypeDisplay)
Distinct(Filter('Leave to Action',User().FullName = Author.DisplayName),EmployeeName)
Distinct(Filter(Filter('Leave to Action',User().FullName = Author.DisplayName),EmployeeNumber)

 

Any idea why this would be?

 

The list does not return a lot of items and the 500 item limit will not be reached and I have upped this value to 2000 items under App Settings in any case.

 

Any suggestions would be great. This has been doing my head in!

Categories:
I have the same question (0)
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    HI @MrsNaniPenny,

    First, click on the combobox and on the right hand column, click on Advanced.  Half way down  are two boxes for displayfields and searchfields. I have found that they sometimes are emply and look like this [ ]  If you used the Distinct() function on the datasource of the combobox, they should both be ["Result"].  If this resolves the issue, please mark the discussion as solved.

  • MrsNaniPenny Profile Picture
    31 on at

    Hi @Drrickryp

     

    Thanks for responding. Unfortunately adding "Result" between the [] on the DisplayFields and SearchFields did not make a difference 😞

     

    I also noticed that my Type field is actually a drop down and not a combo box, which is probably why it is working when the other two are not. Going to change them to drop down boxes now to see if it works.

  • MrsNaniPenny Profile Picture
    31 on at

    I changed the control from combo box to drop down and that fixed my issue. 

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard