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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
butterscotch
Helper II
Helper II

Expression.Error: A cyclic reference was encountered during evaluation

Hello,

This is my formula :

let
    Source = Excel.Workbook(File.Contents("**\****\********\*******\******\**"), null, true),
    Project_Table = Source{[Item="Project", Kind="Table"]}[Data],
    Norm_Table = Source{[Item="Norm", Kind="Table"]}[Data],
    
    // Assuming the common column is "Index" in Project table and "Index" in Norm table
    MergedTables = Table.NestedJoin(Project, {"Index"}, Norm, {"Index"}, "NormData"),
    ExpandedNormData = Table.ExpandTableColumn(MergedTables, "NormData", {"Norm value"}, {"Norm value"}),

    // Create a "Total" column by aggregating the multiplication of "YourWeightColumnHere" by "Norm value"
    #"Grouped Rows" = Table.Group(ExpandedNormData, {"Index"}, {{"Total", each List.Sum([#"Weight(MT)"] * [Norm value]), Int64.Type}}),
    
    // Expand the table back to its original structure
    #"Expanded Total" = Table.ExpandTableColumn(#"Grouped Rows", "Total")
in
    #"Expanded Total"

In summary, this code is creating a new table where the data from the "Project" and "Norm" tables are joined based on the common column "Index." The resulting table includes aggregated information, specifically the sum of the product of "Weight(MT)" and "Norm value" for each group of "Index."

but when i try to run the formula i got this error "Expression.Error: A cyclic reference was encountered during evaluation"

I'm still new in Power BI, Thank you so much in advance! 

1 REPLY 1
Anonymous
Not applicable

Hi @butterscotch ,

Based on the information you provided, I found no syntax errors in the code you provided. Without access to the file and the data it contains, I cannot verify that the code is semantically correct.

Please provide more details with your desired out put and pbix file without privacy information.

How to Get Your Question Answered Quickly - Microsoft Fabric Community

 

Best Regards,

Ada Wang

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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