Forum Discussion
Direct Query behaviour with column order change
- 4 years ago
Hi IMett
Have you checked whether the M codes of all queries in both models are identical? You can click Advanced Editor to see all M codes of a query and compare it with the query in the other model. At present I couldn't think of other possible causes.
Best Regards,
Community Support Team _ Jing
Thanks a lot for the hints,
Indeed, there was a key difference between the queries which I didn't recognize.
The data source is an SQL Server and on one of the queries the "SQL Server Failover" option was checked. Apprently Power BI treats this as a different data source, although it only appears once in the data source settings.
The query itself doesn't contain any logic (also no native query), so there is nothing to fold.
Query 1:
let
Source = Sql.Database("xxx-xxxx-xxxx-001.public.xxxxxxx.database.windows.net,3342", "xxxxx"),
BL_Vertrag_Dim_LPersonenbezug = Source{[Schema="BL_Vertrag",Item="Dim_LPersonenbezug"]}[Data]
in
BL_Vertrag_Dim_LPersonenbezugQuery 2:
let
Source = Sql.Database("xxx-xxxx-xxxx-001.public.xxxxxxx.database.windows.net,3342", "xxxxx", [MultiSubnetFailover=true]),
BL_Vertrag_Dim_LPersonenbezug = Source{[Schema="BL_Vertrag",Item="Dim_LPersonenbezug"]}[Data]
in
BL_Vertrag_Dim_LPersonenbezug
Pretty tricky to be honest!
It would be great if those data sources could also be displayed separately in the data source settings.
- v-jingzhang4 years agoCommunity Support
Hi IMett
Thank you for your feedback. I didn't know this option will have such an influence on the performance. I found an old thread which has a good explanation about this feature if someone hopes to learn more about it: https://community.powerbi.com/t5/Service/SQL-Query-new-advanced-setting-quot-enable-sql-server-failover/m-p/163018
Best Regards,
Jing