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 / Help with Distinct for...
Power Apps
Answered

Help with Distinct formula

(1) ShareShare
ReportReport
Posted on by 601

Hello,

 

I'm trying to filter a look up drop-down to sort by ascending order, remove all blank values, and show only distinct values as well. My current formula is:

 

Distinct(Filter(Choices('HAFS US OTC Help Desk Ticket Log'.'State Lookup'), Not(IsBlank(Value))),'State Lookup')

 

If I remove the Distinct part of the formula it works and there are no blank values but with the distinct filter added I get no results. The formula does not return an error in PoweApps, however. Any help would be greatly appreciated. Thank you!

Categories:
I have the same question (0)
  • Verified answer
    CarlHRVA Profile Picture
    601 on at

    Figured it out. Had to use the "Value" column. Formula looks like this:

    Distinct(Filter(Choices('HAFS US OTC Help Desk Ticket Log'.'State Lookup'),Not(IsBlank(Value))),Value)

     

     

  • rimatos Profile Picture
    Microsoft Employee on at

    Hi @CarlHRVA ,

     

    So the reason your formula worked is because the Syntax of the Distinct formula requires you to input 2 values as such:

     

    Distinct( Table, Formula )

    • Table - Required. Table to evaluate across.
    • Formula - Required. Formula to evaluate for each record.

     

    The Distinct function evaluates a formula across each record of a table. Distinct returns a one-column table that contains the results, with duplicate values removed.

     

    Fields of the record currently being processed are available within the formula. You simply reference them by name as you would any other value.

     

    In this specific case you needed to provide the column with the data to be processed, thus the formula only working when using the "Value" column

     

     

    Although you had already found the solution by yourself, I hope this additional information helped you have a better insight to this formula. 🙂

     

     

    Regards,

    Ricardo

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

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 392 Most Valuable Professional

#2
11manish Profile Picture

11manish 136 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 109 Super User 2026 Season 2

Last 30 days Overall leaderboard