Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi Again,
I'm trying to replace a value - a DASH particularly. It works, however it also does remove the dash symbol for negative numbers. How do I prevent M from doing that?
Solved! Go to Solution.
Hi @ovetteabejuela,
Is the negative number part of a longer peice of text?
Could you create a custom column to preserve the negative number before cleaning your original column?
Transform the number to text and replace the dash "-" with "-0". After this convert the column to a number. The "-0" will be converted to 0 and all other numbers will remain the same, since adding a "0" in front of a number will not affect the value of it.
Hi @ovetteabejuela,
Is the negative number part of a longer peice of text?
Could you create a custom column to preserve the negative number before cleaning your original column?
Hi @Phil_Seamark, thanks I actually did resort to that solution store (1,-1) in a separate column prior to removing dashes. I hope there was an option to tick to exclude dashes that precedes a number though - an out-of-the-box solution.
Thanks.