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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Expression Error: A cyclic reference was encountered during evaluation.-- Seek for help

Hi experts,

 

I am new to PBI and of course need some help with queries.  When I run the two quries below. I get the error message in the subject line.  When I run the first query or the second query ALONE, I don't get the error message.  I will greatly appreciate your help. 

 

#"Added Conditional Column1" = Table.AddColumn(#"Added Column", "Instructor_FN", each if Text.Length(ACADEMIC_HISTORY[INST_FIRST_NAME])=0 then ACADEMIC_HISTORY[FACULTY_FIRST_NAME] else ACADEMIC_HISTORY[INST_FIRST_NAME]),
#"Added Conditional Column2" = Table.AddColumn(#"Added Conditional Column1", "Instructor_LN", each if Text.Length(ACADEMIC_HISTORY[INST_LAST_NAME])=0 then ACADEMIC_HISTORY[FACULTY_LAST_NAME] else ACADEMIC_HISTORY[INST_LAST_NAME])

1 ACCEPTED SOLUTION
AnalyticPulse
Solution Sage
Solution Sage

here is an alternative to your code, just replace these line from your code and let me know if it works:

#"Added Conditional Column1" = Table.AddColumn(#"Added Column", "Instructor_FN", each if Text.Length([INST_FIRST_NAME]) = 0 then [FACULTY_FIRST_NAME] else [INST_FIRST_NAME]),

#"Added Conditional Column2" = Table.AddColumn(#"Added Conditional Column1", "Instructor_LN", each if Text.Length([INST_LAST_NAME]) = 0 then [FACULTY_LAST_NAME] else [INST_LAST_NAME])

 

 

Learn Power BI free:

Blog: AnalyticPulse 
Youtube Channel: AnalyticPulse

Power BI : getting started

Dax functions

powerbi Visualisation

AnalyticPulse_0-1715829624787.png

 

View solution in original post

2 REPLIES 2
AnalyticPulse
Solution Sage
Solution Sage

here is an alternative to your code, just replace these line from your code and let me know if it works:

#"Added Conditional Column1" = Table.AddColumn(#"Added Column", "Instructor_FN", each if Text.Length([INST_FIRST_NAME]) = 0 then [FACULTY_FIRST_NAME] else [INST_FIRST_NAME]),

#"Added Conditional Column2" = Table.AddColumn(#"Added Conditional Column1", "Instructor_LN", each if Text.Length([INST_LAST_NAME]) = 0 then [FACULTY_LAST_NAME] else [INST_LAST_NAME])

 

 

Learn Power BI free:

Blog: AnalyticPulse 
Youtube Channel: AnalyticPulse

Power BI : getting started

Dax functions

powerbi Visualisation

AnalyticPulse_0-1715829624787.png

 

Anonymous
Not applicable

It worked !!  Thank you so much !!  I've struggled with this issue for a while and was going crazy. ha!

Would you mind explaining why this was happening?   Just because specifying the table name in two different queries? 

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

Check out the July 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors