Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Why does below code not work, and raise an error ("Expression.Error: There is an unknown identifier. Did you use the [field] shorthand for a _[field] outside of an 'each' expression?") caused by the Expression.Evaluate part?
let
TableA = Excel.CurrentWorkbook(){[Name="tblRoute"]}[Content],
TableB = Excel.CurrentWorkbook(){[Name="tblBAAM"]}[Content],
TableA_TableB = Table.AddColumn(TableA, "Outcome", each Table.SelectRows(TableB, Expression.Evaluate("(Magic) => [RouteName]=Magic[RouteName]", [Magic=TableB]))),
Result = Table.ExpandTableColumn(TableA_TableB, "Outcome", {"Outcome"})
in
Result
Solved! Go to Solution.
Hi @JVos
Try
TableA_TableB = Table.AddColumn(TableA, "Outcome", each Table.SelectRows(TableB, Expression.Evaluate("(Magic) => [Name]=Magic[Name]", [ _ = _ ] )))
Please mark the question solved when done and consider giving a thumbs up if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
@AlB Thank you very much! This worked - with a minor change, because the column name is not Name, but RouteName.
JVos
Hi @JVos
Try
TableA_TableB = Table.AddColumn(TableA, "Outcome", each Table.SelectRows(TableB, Expression.Evaluate("(Magic) => [Name]=Magic[Name]", [ _ = _ ] )))
Please mark the question solved when done and consider giving a thumbs up if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers