Data preparation and cleaning means finding and fixing incomplete, duplicate, invalid and inconsistent data and turning it into an analysis-ready structure. It usually takes a large share of data project time; the most sustainable approach is to automate cleaning rules in the ETL process and prevent errors at source, not repeat manual fixes.
- Repeated manual cleaning is the enemy of sustainability; automate the rules.
- Normalising Arabic-script character variants, spaces and mixed digits is a frequent need in regional data.
- Every cleaning rule should be documented and traceable.
- Send recurring problems back to the source so they are fixed in the entry form.
Data preparation is the work that turns raw data into analysable data: removing duplicates, fixing formats, standardising codes, filling gaps and combining sources. In most analytics projects it takes more than half of the effort, and its quality directly determines the quality of every dashboard and decision built on top.
The most common data problems
| Problem | Example | Effect on reports |
|---|---|---|
| Duplicate records | One customer under two codes | Wrong counts and totals |
| Inconsistent formats | Dates in several formats and calendars | Errors in period comparison |
| Character variants | Arabic and Persian letter forms, extra spaces | One product split into two rows |
| Missing values | Unit of measure not recorded | Data silently dropped |
| Entry errors | Output ten times higher due to an extra zero | Misleading charts |
| Different definitions | Sales with or without returns | Departments disagree |
Data preparation steps
- Profile: look at value distributions, null counts, distinct values and outliers.
- Standardise: date formats, units, characters and whitespace.
- De-duplicate: define clear rules for what counts as a duplicate.
- Validate: set allowed ranges, for example percentages between 0 and 100.
- Enrich: join codes to master data to add names, groups and attributes.
- Document: record every cleaning rule so it can be reviewed and repeated.
Manual cleaning is the enemy of sustainability
If someone opens a spreadsheet every month and fixes it by hand, your report depends on one person and the same mistakes will come back. Cleaning must be automated in the data pipeline. In Power Query every step is recorded and repeated on each refresh; at enterprise scale the rules live in the ETL process and the database.
The best cleaning is preventing errors at the source
Many errors are made at the moment of entry. A web data-entry system with drop-down lists, allowed ranges, mandatory fields and duplicate checks stops most of them before they reach any system. Prevention is cheaper and more reliable than correction.
Common cleaning rules for Arabic-script and multilingual data
| Problem | Example | Rule |
|---|---|---|
| Character variants | Arabic and Persian forms of yeh and kaf | Map variants to one standard form |
| Mixed digits | Western, Arabic-Indic and Persian digits | Convert to one digit set before casting to number |
| Spaces and joiners | Zero-width joiners vs. spaces | Normalise spacing and trim |
| Text dates | “1405/1/5” and “2026-03-25” | Convert to a standard date and the date-table key |
| Duplicate names | “Company A” and “Company A LLC” | Match on tax or registration number |
A sustainable workflow
- Profile data: count blanks, duplicates and out-of-range values per column.
- Define rules: one written rule per problem, approved by an owner.
- Automate: implement the rule in Power Query, SQL or the ETL tool.
- Exception table: records a rule cannot fix go to a separate list for human review.
- Feed back to source: fix the cause of frequent errors in the entry form or ERP.
For a wider framework see seven common data quality problems and our data quality and governance service.
Common tools
- Power Query: suited to analysts and moderate volumes; repeatable steps without code.
- SQL: for organisation-wide rules and high volumes in the warehouse layer.
- Python: for complex cleaning, free text and fuzzy name matching.
- ETL tools: such as SSIS, for scheduling, logging and error handling.
Give every important KPI a data owner. Cleaning without ownership just hides the problem. See the data governance framework.
Frequently asked questions
How much project time goes into data cleaning?
In most analytics projects 40 to 60 percent of the effort is spent profiling, cleaning and preparing data, which is why automating it matters.
How do we handle Arabic and Persian character variants?
Standardise characters in the transformation step and in the data-entry system so that all records are stored in one consistent form.
Is Power Query enough for enterprise data cleaning?
It works well for moderate volumes and departmental analysis. At enterprise scale the core rules should live in the warehouse and ETL layer.
Should outliers be removed?
Not immediately. First check whether the outlier is a recording error or a real event such as a very large order. Errors are corrected, but real events stay and can be analysed separately if needed.
Is cleaning historical data worth it?
For data used in multi-year trends and comparisons, yes. Cleaning the last two or three years is usually enough for management dashboards; older data is cleaned only when there is a specific need.












