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

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

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