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 Mangnuel
Thanks for reaching out to Microsoft Fabric Community Forum.
We found the answers provided by Akash_Varuna works perfectly. Please consider trying them out to check if they work for you.
I have recreated your scenario using sample data it works fine .
If they work, please consider marking them 'Accept as Solution' and give a KUDOS.
Thank You.