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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Suddenly "Expression.Error: A cyclic reference was encountered during evaluation."

Since today, I encounter expression errors in a workbook I am working with. It also happens with older versions of the workbook that were fine before.

 

It happens twice in my query:

 

Here: 

 

let
Source = Excel.Workbook(Parameter1, null, true),
Export_Sheet = Source{[Item="Export",Kind="Sheet"]}[Data],
#"Promoted Headers" = Table.PromoteHeaders(Export_Sheet, [PromoteAllScalars=true])
in
#"Promoted Headers"

 

 

and in another step here:

 

let
Source = Excel.Workbook(Parameter2, null, true),
Export_Sheet = Source{[Item="Export",Kind="Sheet"]}[Data],
#"Promoted Headers" = Table.PromoteHeaders(Export_Sheet, [PromoteAllScalars=true])
in
#"Promoted Headers"

 

I have absolutely no clue why this is happening since today, but hopefully someone can point me in the right direction.

 

Many thanks in advance!

 

Phil

1 ACCEPTED SOLUTION
BA_Pete
Super User
Super User

Hi Phil,

 

The only place I can see that could create circular references here is your Parameters that you're using to identify the workbooks in the Source steps.

Try and materialise the parameters somewhere, or check in the parameter settings, to see exactly what they are pointing to, or post the parameter details here if you're not sure what you're looking for.

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hey Pete, 

 

thanks a lot for your quick reply, much appreciated!

 

Turned out that the parameter was indeed the culprit; for reasons unknown to me, there was no current value selected. Once I selected it, the query was fixed.

 

See here:

 

PK242_0-1660227369657.png

 

BR 

 

Phil

 

Cool, glad it's sorted.

As a completely unrelated bonus hack, you can change the second argument in your Excel.Workbook source function to 'true' to avoid having to do the Promote Headers step:

// From this:
Source = Excel.Workbook(Parameter1, null, true),

// To this:
Source = Excel.Workbook(Parameter1, true, true),

 

I like tidy code! 🙂

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




BA_Pete
Super User
Super User

Hi Phil,

 

The only place I can see that could create circular references here is your Parameters that you're using to identify the workbooks in the Source steps.

Try and materialise the parameters somewhere, or check in the parameter settings, to see exactly what they are pointing to, or post the parameter details here if you're not sure what you're looking for.

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors