Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hello,
I want to remove last 15 digits from the right. I tried to use Split column with By Positions fuction but I'm not sute how to use it.
Thanks for support
Regards,
Giovanni
Solved! Go to Solution.
please write the column name like this [#"All: Net Profit"]
@elfunambolo83
>> First change data type decimal to text >> create new column >> Using Text.Range function in M Code >> then change new column datatype text to decimal >> get your output.
* If this post helps, please consider accept as solution to help other members find it more quickly and Appreciate your Kudos.
Hi,
We can customize the digit option for fractional values, but I see that the value you have is not fractional. Therefore, the most practical way to get rid of 15 value has 0's is to create an add custom column step where you will divide.
You can insert a new step and create addcolumn like these example down below.
= Table.AddColumn(#"Changed Type", "Custom", each [Obj_Id]/1000000000000000)
Best regards,
Ezgi Naz Aslankara
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
= Table.AddColumn(#"Changed Type", "Custom", each [Obj_Id]/1000000000000000)
I need to do it for several columns. When I create the second one the first one disappear form the table.
How can I proceed?
Thanks
Giovanni
I have created a sample script so you can review the steps I did. You can paste it into the Power Query advanced editor and review the steps I made.
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjRABUo6GEIGFkZYRJVidbDqNiJsoFJsLAA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [num1 = _t, num2 = _t, num3 = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"num1", type number}, {"num2", type number}, {"num3", type number}}),
Custom1 = Table.AddColumn(#"Changed Type", "Custom", each [num1]/1000000000000000),
Custom2 = Table.AddColumn(Custom1, "Custom2", each [num2]/1000000000000000),
Custom3 = Table.AddColumn(Custom2, "Custom3", each [num3]/1000000000000000),
#"Removed Columns" = Table.RemoveColumns(Custom3,{"num1", "num2", "num3"}),
#"Renamed Columns" = Table.RenameColumns(#"Removed Columns",{{"Custom", "num1"}, {"Custom2", "num2"}, {"Custom3", "num3"}})
in
#"Renamed Columns"
Instead of num1,num2 etc.. I need to replace with my columns name?
1) create an empty query.
2) Paste the script I wrote in the advanced editor.
3) Review after Custom 1 step
Then reflect the steps I created in your own query by changing the num1 names.
I replced num1 with my column name but I receive an error syntax
please write the column name like this [#"All: Net Profit"]