Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
While trying to change a source in the query editor im getting extreme performance issues that i can not really explain:
I've always had the maximum amount of cashed ram in PBI to 4GB:
All that i am doing is changingthe source of this working SQL query:
let
Source = Sql.Databases("[SQL Server]"),
Step 1 = Source{[Name = [Database]]}[Data],
#"Filtered Rows" = Table.SelectRows(Step 1, each Text.EndsWith([Name], "$Sales Invoice Line")),
#Step 2 = #"Filtered Rows"{[Schema="dbo",Item="Company$Sales Invoice Line"]}[Data],
#"Sorted Rows1" = Table.Sort(Company$Sales Line",{{"Shipment Date", Order.Descending}}),
#"Removed Other Columns" = Table.SelectColumns(#"Sorted Rows1",{"Document No_", "Amount", "Shortcut Dimension 1 Code", "Posting Date"}),
#"Changed Type" = Table.TransformColumnTypes(#"Removed Other Columns",{{"Posting Date", type date}}),
#"Filtered Rows1" = Table.SelectRows(#"Changed Type", each Date.IsInPreviousNMonths([Posting Date], 3) or Date.IsInCurrentMonth([Posting Date])),
#"Appended Query" = Table.Combine({#"Filtered Rows1", #"Sales Cr_Memo Line"})
in
#"Appended Query"To dataflows:
let
Source = PowerBI.Dataflows(null),
#"ID" = Source{[workspaceId="ID"]}[Data],
#"ID2" = #"ID"{[dataflowId="ID2"]}[Data],
#"Sales Invoice Line1" = #"ID2"{[entity="Sales Invoice Line"]}[Data],
#"Sorted Rows1" = Table.Sort(#"Sales Invoice Line1",{{"Shipment Date", Order.Descending}}),
#"Removed Other Columns" = Table.SelectColumns(#"Sorted Rows1",{"Document No_", "Amount", "Shortcut Dimension 1 Code", "Posting Date"}),
#"Changed Type" = Table.TransformColumnTypes(#"Removed Other Columns",{{"Posting Date", type date}}),
#"Filtered Rows1" = Table.SelectRows(#"Changed Type", each Date.IsInPreviousNMonths([Posting Date], 3) or Date.IsInCurrentMonth([Posting Date])),
#"Appended Query" = Table.Combine({#"Filtered Rows1", #"Sales Cr_Memo Line"})
in
#"Appended Query"Does anyone have any idea as to what is causing this?
Solved! Go to Solution.
Hi @Mariusz!
I managed to figure out what caused all of this.
As you can see in the queries below there is a step where i sort decending on shipment date.
After taking a closer look i noticed that in the SQL query the datatype was DateTime while in dataflows it was string.
Removing the sorting step loaded the query instantly.
This is a little worrying. I don't quite understand how that can be the cause...
/ J
Hi @tex628
My guess is that a lot of processing has been happening on SQL server end ( Query Folding ), where when you change to dataflows, all is done locally.
Hi @Mariusz!
I managed to figure out what caused all of this.
As you can see in the queries below there is a step where i sort decending on shipment date.
After taking a closer look i noticed that in the SQL query the datatype was DateTime while in dataflows it was string.
Removing the sorting step loaded the query instantly.
This is a little worrying. I don't quite understand how that can be the cause...
/ J
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 57 | |
| 38 | |
| 34 | |
| 18 | |
| 16 |
| User | Count |
|---|---|
| 68 | |
| 67 | |
| 42 | |
| 30 | |
| 28 |