Forum Discussion
IF statement without adding new column
- 1 year ago
Hi DROG1025 , anothe solution you could try: I have taken certain assumptions here:
1. YN Number being your first column. If that's not the case, let me know and I'll send the edited version.Here's the code:
let
Source = Excel.CurrentWorkbook(){[Name="Table3"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{{"YN NUMBER", type text}, {"BIN NUMBER", type text}}),
RecAsList = Table.TransformRows(#"Changed Type", each _ & [BIN NUMBER = if Text.End(Record.FieldValues(_){0},1) = "A" then "NA" else "Active Not Sourced"]),
Table = Table.FromRecords(RecAsList)
in
Table
Hi DROG1025 , anothe solution you could try: I have taken certain assumptions here:
1. YN Number being your first column. If that's not the case, let me know and I'll send the edited version.
Here's the code:
let
Source = Excel.CurrentWorkbook(){[Name="Table3"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{{"YN NUMBER", type text}, {"BIN NUMBER", type text}}),
RecAsList = Table.TransformRows(#"Changed Type", each _ & [BIN NUMBER = if Text.End(Record.FieldValues(_){0},1) = "A" then "NA" else "Active Not Sourced"]),
Table = Table.FromRecords(RecAsList)
in
Table