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 / filter some items from...
Power Apps
Answered

filter some items from data source

(0) ShareShare
ReportReport
Posted on by 482

Dear community

 

I have a dataverse for teams table called Registered Users. It has a column called Azure AD Object ID

Based on another table called Not Valid, I created a collection colNotValid. It has a lookup to the Registered Users table.

 

In my gallery, I would like to show all items in Registered Users WITHOUT the ones that are in the colNotValid collection (column 'cr466_User2').

 

 

Filter(
 'Registered Users', 
 Not(
 'Azure AD Object ID' in colNotValid.cr466_User2.'Azure AD Object ID'
 )
)

// tried the following alternative, but didn't work either (Registered Users is the unique identifier of 'Registered Users'

Filter(
 'Registered Users', 
 Not(
 'Registered Users' in colNotValid.cr466_User2.'Registered Users'
 )
)

 

 

 

Above code doesn't do that and I don't know why. It simply shows ALL users from Registered Users. If I remove the Not() it won't show any users. What am I doing wrong?

 

Thanks in advance for your help.

 

**edit**

This feature is activated but the behavior is the same with collections directly.

feature-active.png

I have the same question (0)
  • Drew Poggemann Profile Picture
    9,287 Most Valuable Professional on at

    Hi @mrQ,

     

    Can you try the following for the filter:

    Filter( 'Registered Users', !('Azure AD Object ID' in 'Not Valid'.cr466_User2))

     

    I am doing this from memory so hopefully I got it right 😀

     

    Hope this helps.

     

    Thanks,


    Drew

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

    Hi @mrQ ,

    How do you create the collection colNotValid?  Using formula like below(may should be “Not Valids”)?

    Collect(colNotValid, 'Not Valid')

    If yes, try this to create this collection(save the lookup column into a new column called "test2"):

    Collect(colNotValid, AddColumns('Not Valid',"test2",cr466_User2.'Azure AD Object ID'))

    Then in your gallery, try this:

    Filter(
     'Registered Users',
     Not(
     'Azure AD Object ID' in colNotValid.test2
     )
    )

    Best regards,

    Allen

  • mrQ Profile Picture
    482 on at

    Thanks! That worked!

    I just don't get why I need to save it to a new column when this information is already there in a relational database...?

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

    Hi @mrQ ,

    Glad you have solved your issue.

    Actually, I cannot find an official document mentioned that why we cannot directly use formula like "Table2.lookup.Name". So each time I have your issue, I will keep the lookup result into a new column. And this did work😁

    Best regards,

    Allen

  • mrQ Profile Picture
    482 on at

    Sounds to me like a bug... 😕

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 547

#2
WarrenBelz Profile Picture

WarrenBelz 444 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 322

Last 30 days Overall leaderboard