Forum Discussion
Replace any Value/Text/String by number
- 1 year ago
hi try these formulas
1 In Power Query, use the formula
if Text.Trim([Column1]) <> "" then 1 else [Column1] in a Custom Column to replace non- empty cells in Column1 with a static number like 1.2 To overwrite a column directly, use
Table.TransformColumns(Source, {{"Column1", each if Text.Trim(_) <> "" then 1 else _, type number}}).
if this post helps please accept as this solution and give a kudos
hi try these formulas
1 In Power Query, use the formula
if Text.Trim([Column1]) <> "" then 1 else [Column1] in a Custom Column to replace non- empty cells in Column1 with a static number like 1.
2 To overwrite a column directly, use
Table.TransformColumns(Source, {{"Column1", each if Text.Trim(_) <> "" then 1 else _, type number}}).
if this post helps please accept as this solution and give a kudos