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 / Distinct function for ...
Power Apps
Unanswered

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.

Categories:
I have the same question (0)
  • Verified answer
    RandyHayes Profile Picture
    76,297 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

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