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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
moko33
Regular Visitor

Query Folding in Excel 2016 connected to Dynamics CRM 2016 On-Premises

When I connect Excel 2016 Power Query to a CRM On Premise 2016 system using the OData Feed and OData 4.0 or 2.0 connection URL, how can I make sure that QueryFolding takes place?

 

I read some articles stating that you should be able to rightclick on a step in Query Editor and choose "View Native Query" when Query Folding is applied. However this menu entry is always grayed out in my environment. Is it because Excel 2016 doesn't support Query Folding? Or am I missing something else?

2 REPLIES 2
v-sihou-msft
Employee
Employee

@moko33

 

If a SQL Query can't run against the source, the View Native Query function will not be available. In this scenario, you may get Metadata in Power Query. Please refer to Chris Webb's blog:

 

Another Way To Check Query Folding In Power BI/Power Query M Code

 

Regards,

Thank you Simon_Hou-MSFT for your answer!

 

I have tried that out what is described by Chris Webb's Blog: 

 

Added into the advanced editor

    GetMetadata = Value.Metadata(#"Filtered Rows"),
    QueryFolding = GetMetadata[QueryFolding]

and replaced

#"Filtered Rows"

with the last step of my query.

 

However I'm always getting IsFolded: False, even with the most simple steps applied like select columns or rows.

 

Is Query Folding not applied for CRM On Premise? Or is it simply not detectable here?

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors