Reply
DEM1968
New Member

Odata feed filtering error API v4 datafeed.

Recently, we had switched to an API v4 data feed. Now the $filters "and" are not working. I can still pull the data but the problem is it is all the data and takes a long time to refresh. The filter line would look similiar to this: "$filter=employment eq 'County' and inspectortype eq 'F - Food Services' and payrollid eq '111111' and reportyear gt 2019". It will give me an error saying you cann't use filter and "and". I will remove the filters get the data but like I said it is all the data instead of just the recent data which was working on our previous query. 

1 ACCEPTED SOLUTION
v-yaningy-msft
Community Support
Community Support

Hi, @DEM1968 

 

According to your description, when you build the query, "and" does not work in the $filter system query option and return all the data, you can try the following methods to solve your problem:

1. Please double check that the field names in your syntax are not wrong.

2. Confirm that the OData service you are querying supports the $filter system query option with multiple conditions combined using and. Check the service metadata document (usually accessible at the service URL followed by /$metadata) to see if there are any restrictions on filtering.

3. Start with simple filtering conditions and gradually add more conditions to determine if specific parts of the filtering conditions are causing problems.

Best Regards,
Yang
Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

View solution in original post

2 REPLIES 2
DEM1968
New Member

Thank you it was item 2 that you suggested that solved the problem. 

v-yaningy-msft
Community Support
Community Support

Hi, @DEM1968 

 

According to your description, when you build the query, "and" does not work in the $filter system query option and return all the data, you can try the following methods to solve your problem:

1. Please double check that the field names in your syntax are not wrong.

2. Confirm that the OData service you are querying supports the $filter system query option with multiple conditions combined using and. Check the service metadata document (usually accessible at the service URL followed by /$metadata) to see if there are any restrictions on filtering.

3. Start with simple filtering conditions and gradually add more conditions to determine if specific parts of the filtering conditions are causing problems.

Best Regards,
Yang
Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

avatar user

Helpful resources

Announcements
March PBI video - carousel

Power BI Monthly Update - March 2025

Check out the March 2025 Power BI update to learn about new features.

March2025 Carousel

Fabric Community Update - March 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors (Last Month)
Top Kudoed Authors (Last Month)