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 combo box is populating blanks

(0) ShareShare
ReportReport
Posted on by 559

Hi All,

I have a combo box(dd ) and using filter and distinct to get unique values. And my code is 

If(
SeniorSearchCombo.Selected.Result in varseniordd.sddname,
Distinct(
Filter(
vardd,
sddname = SeniorSearchCombo.Selected.Result
),
ddname
).Result ,
Sort(
Filter(
Distinct(
vardd,
ddname
),
Not(IsBlank(Result))
),
Result
)
)

The first condition works based on the another combo box (senior dd). When the SeniorDD is selected the respective DD under them would be populated in this Combo box (dd). The second condition would filter all the dd names by default in the SP list.

But my combo box is having blank values even though I have used Distinct function.

Any help would be greatly appreciated.

Screenshot (38).png
Categories:
I have the same question (0)
  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Uthhra 

    You're not checking for blank in both scenarios.

     

    Please consider changing your Formula to the following:

    Sort(
     Filter(
     Distinct(
     Filter(vardd,
     !(SeniorSearchCombo.Selected.Result in varseniordd.sddname) || sddname = SeniorSearchCombo.Selected.Result
     ),
     ddname
     ),
     !IsBlank(Result)
     ),
     Result
    ) 

     

    I hope this is helpful for you.

  • Sri Profile Picture
    559 on at

    Hi @RandyHayes ,

    Thank you so much. It worked perfectly.

  • Sri Profile Picture
    559 on at

    Hi @RandyHayes ,

    I have a continuation to this requirement. First condition is working fine. If Seniordd is selected in another combo box, the respective DD names under the Senior DD loads fine. But the other condition when none of the Senior DD is selected by default it must display all the DD names which are in the SharePoint list.

    But in my case, It works only when Senior DD is selected the DD names are displayed whereby default it is listing only few names (For e.g. If I have 12 names as DD in SharePoint only 5 is getting listed.)

     

    Any help/suggestion on this?

    Thanks in advance.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 610

#2
Haque Profile Picture

Haque 317

#3
WarrenBelz Profile Picture

WarrenBelz 315 Most Valuable Professional

Last 30 days Overall leaderboard