Jerry Sullivan
MrExcel MVP
- Joined
- Mar 18, 2010
- Messages
- 8,787
I'm using Power Query to access data from an OLAP source. Some queries work, but are extremely slow. Other queries timeout after 60 minutes before completing.
I've found several articles that discuss query folding, which allows processing of the query to occur on the server instead of the local computer.
https://blog.crossjoin.co.uk/2015/01/13/a-closer-look-at-power-queryssas-integration/
https://devinknightsql.com/2016/07/03/power-bi-checking-query-folding-with-view-native-query/
https://social.technet.microsoft.co...-slow-via-powerpivot-is-fast?forum=powerquery
These articles and others all recommend checking each Applied Step of the query to see if the View Native Query option is enabled, then modifying (or moving down in the sequence) commands that are breaking the query folding.
Unfortunately, none of the steps that I have in my short test query have the Native Query option enabled.
My test query looks like this...
The Applied Steps pane displays this code in 3 steps: Source, Navigation and Added Items. None of these steps has View Native Code enabled.
The same occurs on longer queries where speed becomes an issue.
Can anyone explain why View Native Code is disabled for all steps and how I might remedy that?
I've found several articles that discuss query folding, which allows processing of the query to occur on the server instead of the local computer.
https://blog.crossjoin.co.uk/2015/01/13/a-closer-look-at-power-queryssas-integration/
https://devinknightsql.com/2016/07/03/power-bi-checking-query-folding-with-view-native-query/
https://social.technet.microsoft.co...-slow-via-powerpivot-is-fast?forum=powerquery
These articles and others all recommend checking each Applied Step of the query to see if the View Native Query option is enabled, then modifying (or moving down in the sequence) commands that are breaking the query folding.
Unfortunately, none of the steps that I have in my short test query have the Native Query option enabled.
My test query looks like this...
Code:
let
Source = AnalysisServices.Databases("https://mydomain.com/olap/msmdpump.dll", [TypedMeasureColumns=true]),
#"My Database" = Source{[Name="Database_Name"]}[Data],
#"OLAP Cube1" = #"My Database"{[Id="OLAP Cube"]}[Data],
#"OLAP Cube2" = #"OLAP Cube1"{[Id="OLAP Cube"]}[Data],
#"Added Items" = Cube.Transform(#"OLAP Cube2",
{
{Cube.AddAndExpandDimensionColumn, "[Fiscal Periods]", {"[Fiscal Periods].[Fiscal Year].[Fiscal Year]"}, {"Fiscal Periods.Fiscal Year"}}
})
in
#"Added Items"
The Applied Steps pane displays this code in 3 steps: Source, Navigation and Added Items. None of these steps has View Native Code enabled.
The same occurs on longer queries where speed becomes an issue.
Can anyone explain why View Native Code is disabled for all steps and how I might remedy that?
Last edited: