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

Distinct based on a few values

(0) ShareShare
ReportReport
Posted on by

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
    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

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 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard