Вы можете использовать этот код:
let
Source = YourTable,
types = Table.TransformColumnTypes(Source,{"Col2", type text}),
replace = Table.ReplaceValue(types,each Text.Start([Col2],1),
each if [Col1] = "A" and Text.Start([Col2],1) = "2" then "3"
else if [Col1] = "B" and Text.Start([Col2],1)="5" then "6"
else Text.Start([Col2],1),Replacer.ReplaceText,{"Col2"})
in
replace
Или:
let
Source = YourTable,
types = Table.TransformColumnTypes(Source,{"Col2", type text}),
replace = Table.ReplaceValue(types,0,each Text.ReplaceRange([Col2], 0, 1, if [Col1] = "A" and Text.Start([Col2],1) = "2" then "3"
else if [Col1] = "B" and Text.Start([Col2],1)="5" then "6"
else Text.Start([Col2],1)), (a,b,c)=>c,{"Col2"})
in
replace