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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.