Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now
I have created a column and set the value dependant on the values within a number of other tables. The problem that I have is that in order to refresh the data in the table (or more soecifically the new column) it takes approx. 3 days for less than 5000 rows which seems somewhat excessive. Below is the queries that I am using and I would love to get some suggestions on ways to do things better.
Tasks Table - (The table taking the time to refresh)
let
Source = OData.Feed("https://analytics.dev.azure.com/xxx/xxx/_odata/v3.0-preview/WorkItems?$select=WorkItemId,Title,State,StoryPoints,ParentWorkItemId,CompletedWork, AreaSK &$expand=Iteration($select=IterationPath,IterationName,IterationId) &$filter= WorkItemType eq 'Task'", null, [Implementation="2.0", OmitValues=ODataOmitValues.Nulls, ODataVersion=4]),
Custom1 = Table.ExpandRecordColumn(Source, "Iteration", {"IterationName", "IterationPath", "IterationId"}, {"Iteration.IterationName", "Iteration.IterationPath", "Iteration.IterationId"}),
Custom2 = if List.Count(List.FindText(Table.ColumnNames(Custom1), "WorkItemType" ))= 1 then Custom1 else Table.AddColumn(Custom1, "WorkItemType", each null),
Custom3 = Table.ReplaceValue(Custom2, each [WorkItemType], each if [WorkItemType] is null then LookUpItems([ParentWorkItemId], Bugs, "WorkItemId", "Bug") else [WorkItemType], Replacer.ReplaceValue, {"WorkItemType"}),
Custom4 = Table.ReplaceValue(Custom3, each [WorkItemType], each if [WorkItemType] is null then LookUpItems([ParentWorkItemId], LookUpSupportUserStories, "WorkItemId", "Support") else [WorkItemType], Replacer.ReplaceValue, {"WorkItemType"}),
Custom5 = Table.ReplaceValue(Custom4, each [WorkItemType], each if [WorkItemType] is null then LookUpItems([ParentWorkItemId], LookUpInfraUserStories, "WorkItemId", "Infrastructure") else [WorkItemType], Replacer.ReplaceValue, {"WorkItemType"}),
Custom6 = Table.ReplaceValue(Custom5, each [WorkItemType], each if [WorkItemType] is null then "Feature" else [WorkItemType], Replacer.ReplaceValue, {"WorkItemType"})
in
Custom6
LookUpSupportUserStories (returns instantly)
let
featureList = Table.Column(LookUpSupportFeatures, "WorkItemId"),
userStories = Table.SelectRows(User_Stories, each List.Contains(featureList, [ParentWorkItemId]) )
in
userStories
LookUpSupportFeatures (returns instantly)
let
SupportFeatures = Table.SelectRows(Features, each Text.Contains([Title], "Support Request"))
in
SupportFeatures
The other lookup calls are similar the call for the bugs returns really quickly and isn't a problem the above calls are the problem. Relationships are as follows:
Any help that people can provide would be greatly appreciated. I am not overly skilled at Power Query and teaching myself from a Java background although haven't touched code in a loooong time!
Hi @BBurnett ,
The best practice for power query is mentioned in the official article, you can refer to the official article to optimize against your operation. Wish it is helpful for you!
Best Regards
Lucien
Check out the April 2026 Power BI update to learn about new features.
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.
| User | Count |
|---|---|
| 48 | |
| 46 | |
| 41 | |
| 20 | |
| 17 |
| User | Count |
|---|---|
| 70 | |
| 69 | |
| 32 | |
| 27 | |
| 26 |