The problem here is that Table.Transform
applies a transformation to a single column and cannot reference other columns without some sort of workaround.
See this post for more information:
Power Query Transform a Column based on Another Column
The simplest approach is to define a new custom column (which can reference multiple existing columns) and then delete the existing one that it replaces.
To do it without needing an extra column, you can use the approach in the linked post and use a row transformation, which has the other columns as part of the record you're transforming:
= Table.FromRecords(Table.TransformRows(table,
(r) => Record.TransformFields(r, {"A Only",
each Table.SelectRows(_, (X) => Text.Contains(X[Search Term], r[Word A]))
})))
Note the r
in front of [Word A]
. This is the context that was missing with Table.Transform
.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…