Forum Discussion
STs2207
8 years agoFrequent Visitor
If then else old value
Hi,
I would like to transform the data in one column as follows but cannot find a way to do it. I want to find the cells that start with abc and replace the content of the cell with abc, otherwise leave it as it is.
if (contains ([column2], "abc"), then "abc", else return existing string
Thanks in advance
Hi STs2207,
You can use this formula in Query Editor for power Query or use the LEFT function in DAX :
if Text.Contains([Column2], "abc") then "abc" else [Column2])
Hope it helps...
Ninter
2 Replies
- InterkoubessSolution Sage
Hi STs2207,
You can use this formula in Query Editor for power Query or use the LEFT function in DAX :
if Text.Contains([Column2], "abc") then "abc" else [Column2])
Hope it helps...
Ninter
- STs2207Frequent Visitor
Thank you very much Interkoubess