Forum Discussion
Issue merging queries
Hi GLApplis
The error message you're encountering in Power Query ("Query 'Deal' (step 'Expanded Booking') references other queries or steps, so it may not directly access a data source. Please rebuild this data combination.") suggests there's an issue with how your queries are structured, specifically regarding data access and query dependencies.
Here are some steps and considerations to resolve this issue:
-
Review Query Dependencies: Go to the 'Home' tab in Power Query Editor and click on 'Query Dependencies'. This will show you a diagram of how your queries are related. Ensure there's a logical flow and no circular dependencies.
-
Adjust Load Settings: Make sure that intermediary queries (queries that are used as a basis for further transformations but are not needed as final outputs) are not set to load to the workbook. You can adjust this by right-clicking on the query in the queries pane and selecting 'Enable load to worksheet' or 'Disable load' appropriately.
-
Reference vs. Duplicate: If you're using the 'Reference' option to create a new query based on an existing one, try using 'Duplicate' instead. 'Reference' creates a dependency on the original query, which might contribute to this issue. 'Duplicate' creates a separate copy that does not have a direct dependency on the original query.
-
Simplify Steps: Sometimes, the error can be resolved by simplifying the query steps. For instance, if you have many transformations, try to minimize them or combine them into fewer steps if possible.
-
Directly Access Data Sources: Review the step causing the error ('Expanded Booking'). Make sure that the step accesses data in a straightforward manner, without unnecessary dependencies on other queries or steps.
-
Reorder Steps: Ensure the 'Booking' table (or the data it relies on) is loaded or processed in a way that it is fully available before being referenced by the 'Deal' query. This might involve reordering your steps or ensuring that any data transformations occur before the 'Deal' query attempts to reference this data.
-
Rebuild the Data Combination: As suggested by the error, rebuilding the data combination might be necessary. This could mean redesigning how your queries merge or reference each other. It might involve creating a more linear or hierarchical structure of query dependencies.
Best Regards,
Jayleny
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.