cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Rebeccak
Helper III
Helper III

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

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

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-xida-msft
Community Support
Community Support

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

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
davidstone
Kudo Kingpin
Kudo Kingpin

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()?

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

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

v-xida-msft
Community Support
Community Support

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

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,242)