Forum Discussion
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
- Anonymous6 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
- AnonymousNot applicable
«Vaste programme...» if you don't give more specific specs!
- AnonymousNot applicable
Thanks for the reply.
There are more than 4 Tables in the current dataset, where we wanted to get all records to be removed based on a column name "user_role" having values as "Test" avaiblle in one of the table named "mobileusers", while all the remaining tables are connected with a column name "User_name"
We wanted a have some auotomated process that should help us to get all those test entries removed and should not appear in the existign calculations.
Thanks once again for your further suggestion on this.
With best,
Sahu