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 based on a fe...
Power Apps
Answered

Distinct based on a few values

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello there!

I want to use the Distinct function to remove double values, but I also need to filter on a few things. 

So I have a gallery where I need to put this code.

Current code;

Distinct(
 colCombined;
 Order0
 )


What I need;
I have a variable named "bedrijfNaam", which is the company name of the user logged in. For example;     PowerUsers

 

We need to allow the user to only see the items where the companyname is the same as the variable bedrijfNaam

colCombined sadly doesn't have the order number, so we need to get it from another SharePoint list named ProjectLijsten

We need to look at 2 columns from ProjectLijsten;     Order         CompanyName

 

So colCombined does have the order number, so we have a connection between the 2.

 

Formula needs to be;

if CompanyName from Projectlijsten equals the variable bedrijfNaam && Order from ProjectLijsten equals Order from colCombined

And then we need to Distinct on the order number

 

 

Sorry for the bad explanation. Hopefully you get what I mean.

Categories:
I have the same question (0)
  • Jagadeeshk Profile Picture
    457 on at

    try this,

    Distinct(filter(source, condition),columnname).

    Note distinct is not a delegated function 

  • Verified answer
    v-albai-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

    From your information, I think you want to achieve below:

    1. If CompanyName from Projectlijsten equals the variable bedrijfNaam, get Order value of these records.

    2.Filter colCombined if Order value equals above returned Order value, then distinct these returned records.

     

    If my understand is correct, you can try this formula:

    (from your information, Order0 is the column name in colCombined )

    Distinct(Filter(colCombined;Order0 in Filter(Projectlijsten; CompanyName = bedrijfNaam).Order);Order0)

    Best regards,

    Allen

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

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 530

#2
WarrenBelz Profile Picture

WarrenBelz 459 Most Valuable Professional

#3
Haque Profile Picture

Haque 314

Last 30 days Overall leaderboard