7. Data Cleaning A–Z in Power Query
Friends, real data is never clean – extra spaces, wrong spellings, ₹ symbols, dd-mm-yyyy dates, blank cells, duplicate rows... it is all there. In this module every problem has a Before and After table, exact steps, M code and a practice task. The module is a bit long, but do not worry – go one section at a time and it becomes easy.
मित्रांनो, खरा data कधीच साफ नसतो – extra spaces, चुकीची spellings, ₹ symbols, dd-mm-yyyy dates, blank cells, duplicate rows... सगळं असतं. या module मध्ये प्रत्येक problem साठी Before आणि After table, exact steps, M code आणि practice task दिलाय. Module थोडा मोठा आहे, पण घाबरू नका – एक-एक section करत गेलं की सोपं होतं.
दोस्तों, असली data कभी साफ़ नहीं होता – extra spaces, ग़लत spellings, ₹ symbols, dd-mm-yyyy dates, blank cells, duplicate rows... सब होता है. इस module में हर problem के लिए Before और After table, exact steps, M code और practice task दिया है. Module थोड़ा बड़ा है, पर घबराइए मत – एक-एक section करते चलिए, आसान हो जाएगा.
What you will learn in this module
- A repeatable cleaning workflow and the data profiling tools
- Every common cleaning problem – duplicates, blanks, spaces, case, spellings, types, ₹ amounts, phones, e-mails, PIN codes, dates, errors and outliers
- Reshaping: headers, top/bottom rows, unpivot, pivot, transpose, keep/remove rows
- Combining data: folders, append, merge (all six join kinds) and Group By
- A complete case study: cleaning a messy Blinkit export from start to finish
Live story: Cleaning before the monthly review
Suppose it is the last day of March and the Maharashtra monthly review is tomorrow at 10 am. The Mumbai file has duplicate orders. The Nashik file has "nashik " with a space. Dates are in Indian format. Sales look ₹3 lakh too high because one file was appended twice. This chapter is the A–Z cleaning kit: duplicates, blanks, spaces, types, split, unpivot, append, merge and group.
All numbers in this story are fictional practice data.
Live story: Monthly review आधीचं cleaning
समजा March चा शेवटचा दिवस आहे आणि Maharashtra चा monthly review उद्या सकाळी 10 वाजता आहे. Mumbai च्या file मध्ये duplicate orders आहेत. Nashik च्या file मध्ये space सोबत "nashik " आहे. Dates Indian format मध्ये आहेत. एक file दोनदा append झाल्यामुळे sales ₹3 लाखाने जास्त दिसतोय. हा chapter म्हणजे A–Z cleaning kit: duplicates, blanks, spaces, types, split, unpivot, append, merge आणि group.
या story मधले सगळे आकडे काल्पनिक practice data आहेत.
Live story: Monthly review से पहले की cleaning
मान लीजिए March का आख़िरी दिन है और Maharashtra का monthly review कल सुबह 10 बजे है. Mumbai की file में duplicate orders हैं. Nashik की file में space के साथ "nashik " है. Dates Indian format में हैं. एक file दो बार append होने से sales ₹3 लाख ज़्यादा दिख रही है. यह chapter A–Z cleaning kit है: duplicates, blanks, spaces, types, split, unpivot, append, merge और group.
इस story के सारे आँकड़े काल्पनिक practice data हैं.
Real data is never clean. Data comes from the Blinkit store app, the Amazon Now seller panel and Excel sheets typed by store staff. It usually has extra spaces, different spellings of city names, ₹ symbols inside numbers, dates in dd-mm-yyyy format, blank cells and duplicate rows. In this module, each problem is shown as a Before (messy) table and an After (clean) table. You also get the exact Steps in Power BI, the M code Power Query writes for you, a Ravindra Bagale's Tip box on the mistakes students make most often, and a small practice task.
All rows are fictional
Mhanje asa: every table in this module is made-up practice data in the style of Blinkit and Amazon Now orders. The values are not real company data.
Where to find the commands
Every command in this module is inside the Power Query Editor. To open it, click Home › Transform data in Power BI Desktop. When a command is on the Transform tab it changes the column you select. When it is on the Add Column tab it creates a new column and leaves the original as it is (see Module 8).
Concepts in this chapter
- 7.1A Cleaning Workflow You Can Repeat
- 7.2Data Profiling Tools
- 7.3Messy Excel Exports: Title Rows, Headers, Footers and Transpose
- 7.4Removing Duplicates (Full Row and by Key)
- 7.5Blanks and Nulls: Remove, Replace, Fill Down / Fill Up
- 7.6Extra Spaces, Non-printable Characters and Text Case
- 7.7Wrong Data Types and Indian Date Formats (Using Locale)
- 7.8Numbers Stored as Text, ₹ Symbol and Commas
- 7.9Inconsistent Spellings and Standardisation
- 7.10Split Columns (All Six Methods, Plus Split into Rows)
- 7.11Merge Columns
- 7.12Extract: Length, First/Last Characters, Range and Delimiters
- 7.13Phone Numbers, E-mails and PIN Codes
- 7.14Dates and Times: Parts, Split DateTime, UTC to IST, Age and Duration
- 7.15Errors: Remove, Replace, Keep and try … otherwise
- 7.16Outliers and Invalid Values
- 7.17Unpivot and Pivot
- 7.18Keep / Remove Rows, Sort and Filter
- 7.19Rounding
- 7.20Combine Files from a Folder (Quick Version)
- 7.21Append Queries (Stack Rows)
- 7.22Merge Queries and All Join Kinds
- 7.23Group By (Basic and Advanced)
- 7.24Conditional Column, Index Column and Column From Examples in Cleaning
- 7.25Case Study: Cleaning a Messy Blinkit Export End to End
Review and practice
The chapter recap is at the end of the last concept page.
Ravi Sir's Cards: 31 revision, interview and comparison cards for this chapter · मराठी cards