Percentage with 10 decimal places.

masterswordz

New member
Joined
Apr 28, 2020
Messages
22
Reaction score
0
Points
0
Location
Philippines
Excel Version(s)
2016
Can someone help me write a query to ADD COLUMN percentage data type with 10 decimal places?

First 3 columns came from raw data all in text data type.

1. ADD COLUMN = SUM(100-0)/100 (but the result should be in percentage with 10 decimal places
2. Compare Column C and D.

Error from DumpTotal from DumpPercentage from DUMPADD COLUMN %Compare C and D
0
100
100.0000000000%


16
999999
99.9983999984%



Goal is, just to make sure that the computation from the DUMP data sent to me are giving accurate results.

In Excel formula, I could simply use =TEXT(A2,"0.0000000000%") but I don't know to make this work using PowerQuery.
 
Does this do what you want?

Code:
[FONT=Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif]let
    Source = Excel.CurrentWorkbook(){[Name="Table3"]}[Content],
    data.Typed = Table.TransformColumnTypes(Source,{{"Error from Dump", Int64.Type}, {"Total from Dump", type text}, {"Percentage from DUMP", type text}}),
    accuracy.Tested = Table.AddColumn(data.Typed, "Accurate?", each Text.Format("#{0.0000000000}",{Number.FromText([Total from Dump])/10000})=Text.Format("#{0.0000000000}",{Number.FromText([Percentage from DUMP])*100}))
in
    accuracy.Tested[/FONT]
 
Back
Top