Forum Discussion
Merge taking too much time and refresh is failing
- 10 months ago
Hi Anonymous,
Merging 7 million rows with another large table will always be slow in Power BI. Here are couple of options you can try:
Best approach - Merge at the source:
- Use SQL/Database views: If both tables are from the same database, create a SQL view that joins them and import that single view into Power BI
- Push the merge to the data source: This is 100x faster than Power Query merging
If you must merge in Power BI:
- Reduce rows before merging: Apply filters to both tables BEFORE the merge step to reduce row count
- Remove unnecessary columns: Keep only the columns you need from each table before merging
- Check data types: Ensure join keys are the same data type (both text or both numbers) - mismatches cause performance issues
- Use Table.Buffer: Before the merge step, add Table.Buffer(YourTable) to load the smaller table into memory first
Alternative architecture:
- Use DirectQuery: Instead of importing, use DirectQuery mode - the database handles the join
7M x 7M rows is beyond Power Query's best practise. You really need database-level joining.
Best regards!
PS: If you find this post helpful consider leaving kudos or mark it as solution
Hello Anonymous
Below are a few things you can try!
Model instead of flatten
If the intent is to bring fields from one table into another for reporting, ask: can this be a relationship instead?
Build a star schema: one Fact table + Dimension tables with relationships. This avoids heavy merges in Power Query.
Filter and slim before you merge
Remove unneeded columns early (folded Remove Columns).
Filter rows down to the needed time window (folded Filter Rows).
Avoid transforming to Text keys, use Integer or Fixed Decimal keys if possible.
Common mistakes that kill performance
Steps before merge that break folding (e.g., custom row-level functions, some Add Column logic, unbuffered web/excel sources).
Merging on non-matching data types (Text vs Whole Number).
Unnecessary sorts.