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 / Best way to create a c...
Power Apps
Unanswered

Best way to create a collection of distinct names from 3 different columns

(0) ShareShare
ReportReport
Posted on by 5,836 Moderator

What is the best way to create a distinct collection of people when the names can be in any one of 4 different columns in the source table?

 

 

 

 

Categories:
I have the same question (0)
  • BCLS776 Profile Picture
    8,994 Moderator on at

    How about?:

    • Create four collections using Distinct() on the four columns
    • ClearCollect() those four collections into one
    • Use Distinct() one more time on the combined collection to weed out any duplicates

    Bryan

  • JR-BejeweledOne Profile Picture
    5,836 Moderator on at

    I trying to avoid that if possible.

  • Verified answer
    v-bofeng-msft Profile Picture
    on at

    Hi @JR-BejeweledOne ï¼š

    I assume there is a table something like:

    ClearCollect(
     TheCollection,
     {Name1:"Aof",Name2:"Bof"},
     {Name1:"Dof",Name3:"Bof"},
     {Name1:"Gof",Name3:"Dof"}
    )

    vbofengmsft_0-1631244835183.png

    Then 

    Distinct(
     Filter(
     Ungroup(
     ForAll(
     TheCollection,
     [Name1,Name2,Name3]
     ),
     "Value"
     ),
     !IsBlank(Value)
     ),
     Value
    )

    Result:

    vbofengmsft_1-1631244896967.png

    Best Regards,

    Bof

     

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