Power Query Editorを使用して、CustomersとLocationsという名前の2つのMicrosoft SharePoint OnlineリストからPower BI Desktopにデータを取り込みます。 各リストには25,000行以上が含まれています。「顧客」リストでは「場所」が参照され、ドロップダウンリストに表示される条件付き値が生成されます。 Power Queryエディターで、次のクエリを作成します。 読み込み時間が長くなり、Power Query Editor が最終データセットの各行の URL にアクセスしていることがわかっています。 クエリを最適化する必要があります。解決策は開発作業を最小限に抑えるものでなければなりません。 何をすべきでしょうか?
正解:A
The slow performance you're experiencing is a known bottleneck where Table.ExpandTableColumn triggers a separate API call for every single row in your primary list. For 25,000 rows, this means 25,000+ individual HTTP requests, which is why it feels like it's crawling. The most efficient remedy is often a Merge (Join) operation combined with Buffering to force the expansion to happen in-memory rather than via repeated calls. Recommended Solutions *-> Classic Table Join (Merge): Instead of expanding the nested record directly, load both SharePoint lists as separate queries. Perform a Merge Queries operation in Power BI using a common key. This reduces the workload to just two API calls-one for each list-and performs the "expansion" locally in your computer's memory. Table.Buffer: If you use a custom function or a merge, wrap your secondary table in Table.Buffer(SecondaryTable). This "freezes" the data in memory, preventing Power Query from re-evaluating the entire source for every row it processes. SharePoint REST API with OData: For maximum speed, use the SharePoint REST API to fetch data in batches (e.g., 5,000 items at a time). You can use $select to pull only the columns you need and $expand to handle lookups more efficiently than the standard connector. Filter Early: Ensure you are filtering rows and removing unnecessary columns as the very first steps in both queries to minimize the data payload before the join occurs. Reference: https://learn.microsoft.com/en-us/power-query/optimize-expanding-table-columns