Forum Discussion
agd50
10 months agoHelper V
Conditional M Code - Removing a whole value from column IF a character is there
I want to remove an entire value if there is a "+" symbol, so it will be blank.
Example: "123+456" - I want this whole value removed (change to null)
How to achieve this in power query?
Hi,
This M code works
let Source = Excel.CurrentWorkbook(){[Name="Data"]}[Content], #"Uppercased Text" = Table.TransformColumns(Source,{{"Data", each if Text.Contains(_,"+") then null else _}}) in #"Uppercased Text"Hope this helps.
1 Reply
- Ashish_MathurSuper User
Hi,
This M code works
let Source = Excel.CurrentWorkbook(){[Name="Data"]}[Content], #"Uppercased Text" = Table.TransformColumns(Source,{{"Data", each if Text.Contains(_,"+") then null else _}}) in #"Uppercased Text"Hope this helps.