Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Auomated process for the Data cleaning

Hi,

 

I am looking for some type of query or scripting that might help during data cleaning or removing a particular records from a data set. I was exploring the option but not able to find it,

 

The scripting might be helpful to be used in other data set as well.

 

Thanks in advance .

Sahu

 

 

  • Anonymous's avatar
    Anonymous
    6 years ago

    here the step to remove duplicare rows and filter out unwanted rows

     

    here the code producted bu GUI in the advanced editor

     

    let
        Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("3ZHNCsIwEAZfJQSPS91v89tnKT30IBjEIrS+v8GqpKlCz+aU2ctkNl2n4REbp0mrg1qOaZg/LFyQETKhGNQMT4huYRxxFIbN11saL0n3lGVGsE8lnmw5qBmGBLxRzadpfpoEIf40wa2jfBW1YjDF9sX+W1SMO035zaZqWLFSlqzdqqb7mOZhybKBd2YFYldmVYz8d27rug5jms7De4ftv+2wfwA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"Units Sold" = _t, #" M_Price " = _t, #" S_ Price " = _t, #" G_Sales " = _t, #"  Sales " = _t, #" Profit " = _t, Date = _t, User_Name = _t]),
        #"Changed Type" = Table.TransformColumnTypes(Source,{{"Units Sold", Int64.Type}, {" M_Price ", type text}, {" S_ Price ", type text}, {" G_Sales ", type text}, {"  Sales ", type text}, {" Profit ", type text}, {"Date", type date}, {"User_Name", type text}}),
        #"Removed Duplicates" = Table.Distinct(#"Changed Type"),
        #"Filtered Rows" = Table.SelectRows(#"Removed Duplicates", each ([User_Name] <> "test"))
    in
        #"Filtered Rows"

     

     

     

     

6 Replies