Forum Discussion
Cyclic reference in Power Query - How to avoid?
- Jun 08, 2021
Maybe if these are steps within same query. I meant you have separate queries. In general it's always good practice to make operations with separate tables as join, combine, etc as separate queries. With that it shall if on final steps you use references, not initial queries.
Do I understood correctly you have queries
- database (DB)
- previously proceeds (PP)
- DB excluding PP (DB-PP)
based on the latest set of queries which forms sheets
- Sh1
- Sh 2
Finally you create query which appends Sh1, Sh2, ... to PP ?
- KirtcJun 08, 2021Copper Contributor
SergeiBaklan thank you for your reply. I think you follow what I am trying to do.
I have multiple DB queries pulling from SQL Server per vice president. One of the steps in each of those queries is to do an anti-join against the previously processed (PP) sheet to give me only those people that have not been processed. I want to then add those people to the PP sheet so next month they will not be processed again.
I think Excel gives me a "circular reference" error because it feels it cannot guarantee that the query to add people to the PP sheet will happen after the other queries so it believes there is a conflict.
Someone out there in Excel-land who does much more Excel coding than I surely has a way to handle this situation that is clever and I have not thought of. Thank you.
- SergeiBaklanJun 08, 2021Diamond Contributor
Maybe if these are steps within same query. I meant you have separate queries. In general it's always good practice to make operations with separate tables as join, combine, etc as separate queries. With that it shall if on final steps you use references, not initial queries.
- KirtcJun 08, 2021Copper ContributorThank you Sergei. I was able to get it to work by simply making the anti-joins to the PP table use a connection only to the PP table whereas when I append to the PP table it is actually linked to and updating the table in Excel.