I need to add a column to a nested table with values based on a condition. Each field in the new column "Hybrid Value" should get the value of field "AlutMufchetetColumn", if the value of ID equals "Meyuadot"
This is the code, I think I still can't get my head around the passed on variables and scopes.
You can see the numbers under Hybrid Value, which are taken from Column Alutmufchetet, only when the values of ID include the string "AlutMuf"
ShoviHibrid=
let
X= Table.FromRecords(Table.TransformRows(IDandKvutsa, (r)=>
Record.TransformFields(r, {"CSV Table With ID and Kvutsa",
(TableField)=>
Table.AddColumn([CSV Table With ID and Kvutsa],{"Hybrid Value",
if Text.Contains(TableField[ID],"Meyuadot" ) then
"Success" else "not success" })
})))
in
X
