Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
lauriemclolo
Helper II
Helper II

cyclic reference was encountered after switching to direct query

I'm getting a cyclic reference error after switching all my tables to directquery.    It's only happening with one of the tables, and I noticed that the navigation step is missing in the applied steps of query editor.  Could that be throwing the error?  I cannot figure out how to manually add the missing navigation step to see if that fixes it.  

 

lauriemclolo_0-1753741945596.png

 

 

 

7 REPLIES 7
v-karpurapud
Community Support
Community Support

Hi @lauriemclolo 

We haven't received a response to our last message and wanted to follow up to see if you have found a solution. If you still need help, please share more details so we can assist you further.

Thank you.

v-karpurapud
Community Support
Community Support

Hi @lauriemclolo 

I wanted to check if you’ve had a chance to review the information provided. If you have any further questions, please let us know. Has your issue been resolved? If not, please share more details so we can assist you further.

Thank You.

v-karpurapud
Community Support
Community Support

Hi @lauriemclolo 

We have not yet received a response from you regarding your query. If the previous response was helpful, please let us know. If not, feel free to provide more details so we can assist you further.

Thank you.

v-karpurapud
Community Support
Community Support

Hi @lauriemclolo 

Thank you for reaching out to the Microsoft Fabric Community Forum.

 

A cyclic reference error in Power BI (specifically in Power Query) typically occurs when a query refers to itself, either directly or indirectly. In this situation, the error is caused by a mismatch between the variable defined in the let block and the variable referenced in the in statement. Your in clause refers to "v_cmc_pct_mbr_rdm_sweeps_ctgy", but this variable is not defined in the let block; instead, a different variable, v_cmc_pct_mbr_redeem_Table, is defined.

Since Power Query cannot locate v_cmc_pct_mbr_rdm_sweeps_ctgy within the let block, it tries to resolve it as a reference to the query itself, resulting in a cyclic reference error. This issue is particularly important in DirectQuery mode, where naming consistency is critical due to real-time query evaluation. To resolve this, ensure the variable referenced in the in clause matches the variable defined in the let block.

Please refer to the following M code as an example:

let

   Source = DatabricksMultiCloud.Catalogs("xxxx.cloud.databricks.com", "sql/protocolv1/o/893212941337564/0207-082146-l7tka12z", [Catalog=null, Database=null, EnableAutomaticProxyDiscovery=null]),

   xxx_Database = Source{[Name="xxx", Kind="Database"]}[Data],

   write_db_2000102_Schema = xxx_Database{[Name="write_db_2000102", Kind="Schema"]}[Data],

   v_cmc_pct_mbr_rdm_sweeps_ctgy = write_db_2000102_Schema{[Name="v_cmc_pct_mbr_rdm_sweeps_ctgy", Kind="Table"]}[Data]

in

   v_cmc_pct_mbr_rdm_sweeps_ctgy

 
Regards,
Karpurapu D,
Microsoft Fabric Community Support Team.

danextian
Super User
Super User

It seems that you put everything in a single step. Your formula bar begins with let =  and your   advanced editor script could be something like 
StepName = 
let = ....

in Step Name

 

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

That was the transform window.  This is how it looks in advanced editor, which doesn't seem to be different from the advanced editor view of the other tables that work and do not throw the error.

= let
Source = DatabricksMultiCloud.Catalogs("xxxx.cloud.databricks.com", "sql/protocolv1/o/893212941337564/0207-082146-l7tka12z", [Catalog=null, Database=null, EnableAutomaticProxyDiscovery=null]),
xxx_Database = Source{[Name="xxx",Kind="Database"]}[Data],
write_db_2000102_Schema = xxx_Database{[Name="write_db_2000102",Kind="Schema"]}[Data],
v_cmc_pct_mbr_redeem_Table = write_db_2000102_Schema{[Name="v_cmc_pct_mbr_rdm_sweeps_ctgy",Kind="Table"]}[Data]
in
v_cmc_pct_mbr_rdm_sweeps_ctgy

amitchandak
Super User
Super User

@lauriemclolo, please open the advanced editor, check and share the script. I doubt the table is a calling table(or Column) where it is used.

Or there is some problem with the code, which is not complete.  

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors