Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Darger
Regular Visitor

Filtering data (Date/Time) taking forever from a large file.

Hello,

 

I'm pretty new to Power Query, please excuse my ignorance.

I'm connecting CRM 2016 to power query through an OData Feed. I can filter most columns relatively quickly. When I filter for date PQ tries to download the entire data source, at least 50 GB in size.

 

I tried:

-I removed all extra columns

-Filtering for date/time

-Splitting date/time, then only filter for Date

-Duplicating the date column and extracting the Year and trying to filter that column

 

They all cause the same problem, PQ begins downloading the entire data source. I tried leaving this overnight to see what would happen and after downloading 50BG PQ just crashed...

 

Do you have any advice on how to filter this data? I don't have access to the original source.

1 ACCEPTED SOLUTION
BA_Pete
Super User
Super User

Hi @Darger ,

 

It sounds like you should be doing your initial filtering within the connection string, similar to how you would manage an API source, in order to implement the filters server-side. You may need to check your source documentation to find the correct parameter names, but you'd create a connection string something like this:

 

https://analytics.dev.azure.com/{organization}/{project}/_odata/v3.0-preview/WorkItems?
    $select=WorkItemId,Title,WorkItemType,State,CreatedDate
    &$filter=startswith(Area/AreaPath,'{area path}')
    &$orderby=CreatedDate desc
    &$top=10

 

 

MS Learn source:

https://learn.microsoft.com/en-us/azure/devops/report/powerbi/odataquery-connect?view=azure-devops 

 

Additionally, a lot of ODATA feeds actually support query folding, even though PQ may not display the 'View Native Query' option as you might expect. As such, you should check carefully that you haven't broken folding in a step previous to your filter step causing PQ to implement the filter locally.

 

BA_Pete_0-1684216299363.png

 

MS Learn source:

https://learn.microsoft.com/en-us/power-query/power-query-folding 

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




View solution in original post

1 REPLY 1
BA_Pete
Super User
Super User

Hi @Darger ,

 

It sounds like you should be doing your initial filtering within the connection string, similar to how you would manage an API source, in order to implement the filters server-side. You may need to check your source documentation to find the correct parameter names, but you'd create a connection string something like this:

 

https://analytics.dev.azure.com/{organization}/{project}/_odata/v3.0-preview/WorkItems?
    $select=WorkItemId,Title,WorkItemType,State,CreatedDate
    &$filter=startswith(Area/AreaPath,'{area path}')
    &$orderby=CreatedDate desc
    &$top=10

 

 

MS Learn source:

https://learn.microsoft.com/en-us/azure/devops/report/powerbi/odataquery-connect?view=azure-devops 

 

Additionally, a lot of ODATA feeds actually support query folding, even though PQ may not display the 'View Native Query' option as you might expect. As such, you should check carefully that you haven't broken folding in a step previous to your filter step causing PQ to implement the filter locally.

 

BA_Pete_0-1684216299363.png

 

MS Learn source:

https://learn.microsoft.com/en-us/power-query/power-query-folding 

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors