SynfraCore
Synfracore
Start Learning
Navigation

Academies

Platform

RoadmapsLabsCertificationsInterviewPYQsAI AssistantCareer
Start Learning Free Learning Roadmaps

Senior MIS Executive — Intermediate

Real-world patterns, best practices, and deeper topics

📄
Last updated Dec 2026
Expert Content

MIS Intermediate — Cleaning, Aggregating, and Reporting on the Practice Dataset

This page assumes you've read Fundamentals and know the four files' quirks. Everything here is written against that exact dataset — open it alongside this page.

Cleaning the dirty columns

Before any SUMIFS, pivot table, or SQL aggregate touches unit_price or qty, strip and cast them:

•Excel: =VALUE(SUBSTITUTE(TRIM(B2),"$","")) — TRIM removes stray leading/trailing spaces, SUBSTITUTE removes a $ if present, VALUE converts the result to a real number.
•SQL (SQLite syntax used by this track's tests): strip the whitespace, strip the dollar sign, then cast to a real numeric type — see the Cheatsheets page for the exact expression plus the SQL Server/MySQL equivalents.

Build this cleanup once — as a helper column in Excel, or a CTE/view in SQL — and reuse it everywhere, rather than repeating the SUBSTITUTE/REPLACE logic in every single formula or query.

Filling the blank region from `reps.csv`

A region-accurate report needs to join sales to reps on rep_id and prefer the rep's region over a blank sales.region:

•Excel: =IF(TRIM(C2)="",XLOOKUP(D2,Reps[rep_id],Reps[region]),C2) — if the sales row's region is blank, look up the rep's region instead.
•SQL: COALESCE(NULLIF(TRIM(s.region), ''), r.region) after joining reps AS r ON s.rep_id = r.rep_id.

De-duplicating before aggregating

A duplicate full-row in sales.csv double-counts that order's revenue. In SQL, SELECT DISTINCT or a GROUP BY order_id (since order_id should be unique per real order) removes duplicates before any revenue sum runs. In Excel, Power Query's "Remove Duplicates" step on order_id, placed before any aggregation step in the query, does the same thing — removing duplicates after a pivot has already summed them is too late.

Pivot tables on this dataset

A pivot table with region (cleaned) in Rows, order_date grouped by Month in Columns, and qty * unit_price (cleaned) as a calculated field in Values reproduces a monthly regional revenue report — but only once the underlying data is cleaned first, which is why Power Query, not the pivot table itself, is where the cleanup steps above belong in a real workbook.

Where Power Query fits

Power Query is the right place to do the cleaning steps above once, as a repeatable, refreshable query, rather than as one-off helper-column formulas that someone has to remember to redo every time the source file refreshes:

1.Import sales.csv.
2.Trim and clean unit_price and qty (Power Query's own Text.Trim/Text.Replace or the Transform ribbon).
3.Merge with reps.csv on rep_id to pull in a clean region.
4.Remove duplicate rows on order_id.
5.Load the result to a pivot table or Data Model.

See the Interview page's hands-on tasks for fully worked SQL and Excel versions of every pattern on this page, each with its verified output stated in the answer.

Share:
Join our Community
Daily tips, job alerts, interview help — join engineers learning together
→
Up Next
🏗️
Senior MIS Executive — Projects
Portfolio-ready projects to demonstrate your skills
Also Worth Exploring
← Back to all Senior MIS Executive modules
← FundamentalsAdvanced →