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 / Operator <> or NOT In....
Power Apps
Answered

Operator <> or NOT In. In and Exactin work but I would like the opposite

(0) ShareShare
ReportReport
Posted on by 113

I have 2 gallerys. The first Gallery is filtered by selected date. I would like to filter the 2nd gallery by a field not equal to a field in the filtered 1st gallery. 


Gallery 1 items=Filter(colFilterGallery1, Start>=StartDateSearch.SelectedDate&&end<=EndDateSearch.SelectedDate)

 

Field in colFilterGallery to compare "TechnicianText"

 

Gallery 2 = colGallery2

Field in colGallery2 to compare "ADTxt"

 

Im am trying to filter colGallery2 items. This is what I have:

 

 

Filter(colGallery2,Department = "On Call" && ADTxt exactin Filter(colFilterGallery1,start >=StartDateSearch.SelectedDate && End <= EndDateSearch.SelectedDate).TechnicianText)

This shows the match and is filtered correctly by date. But I would like it to show the opposite. Provide the "ADTxt" items that do not match the TechnicianText but are within the date range. 

 

Any help would be appreciated

 

Categories:
  • davidstone Profile Picture
    471 on at

    I'm a little confused by what you're doing - is 'colFilterGallery1' a datasource?

     

    Could you do a Collect() of the TechnicianText, and then in the filter of your second gallery set it to filter to items IN your collection, but wrap that inside a Not()?

  • Rebeccak Profile Picture
    113 on at

    Yes, I am sorry. It's 2 different data sources. I just want to compare a field in each datasource to filter by.

  • Rebeccak Profile Picture
    113 on at

    I figured it out. I used my original filter and wrapped it in a Not()  Thanks

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

    Hi @Rebeccak,

    Have you solved your problem?

    If you want to filter your Gallery 2 whose ADTxt" items that do not match the TechnicianText but are within the date range, please modify your formula as below:

    Filter(
    colGallery2,
    Department = "On Call" &&
    Not(ADTxt exactin Filter(colFilterGallery1,start >=StartDateSearch.SelectedDate && End <= EndDateSearch.SelectedDate).TechnicianText)
    )

    More details about the Not function, please check the following article:

    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-logicals

    If you have solved your problem, please go ahead and click “Accept as Solution” so that this thread will be marked for other users to easily identify.

     

    Best regards,

    Kris

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 258

#3
Mohsin Ali Profile Picture

Mohsin Ali 231

Last 30 days Overall leaderboard