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.
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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
102 | |
53 | |
21 | |
13 | |
11 |