McKinsey & Company Data Analytics Interview Questions & Answers
Curated interview practice questions with answers. These are practice scenarios, not a verified list of past interview questions.
About McKinsey & Company hiring for Data Analytics roles
McKinsey & Company is a global management consulting firm that advises companies, governments and institutions on strategy, operations, technology and organisation. In India it has client service offices as well as large knowledge and capability centres that support consultants worldwide with research, analytics and digital work. It hires business analysts, research analysts, data scientists and software engineers in India.
For Data Analytics roles, this McKinsey & Company practice set focuses most on Power BI (9), SQL (5), Python for Analysis (4), A/B Testing & Experiments (4). It has 5 easy, 31 medium, 4 hard questions, so you can start easy and work up to the harder ones.
Company type
Consulting
Headquarters
New York, USA
Main India offices
Gurugram, Mumbai, Bengaluru, Chennai
McKinsey & Company Data Analytics interview process
Online problem-solving assessment or game-based test
Case interview round 1
Case interview round 2 with personal experience questions
Final partner round
Typical pattern based on public candidate experiences. Rounds vary by role, team and year.
Solved for McKinsey & CompanyStart practicing
3 QUESTIONS FREESign up to unlock the full question bank and track your progress.Unlock every question and answer, then continue practising company-wise and package-wise.
✓ 3 questions free • Unlock the rest in seconds
01
Write pandas code to compute month-on-month percentage change and cumulative sales for each store.
df = df.sort_values(['store', 'month'])
df['mom_pct'] = (
df.groupby('store')['sales'].pct_change() * 100
).round(1)
df['cum_sales'] = df.groupby('store')['sales'].cumsum()
# first month of each store has NaN for mom_pct, which is expected
02
A stakeholder says the Power BI report shows different revenue than their Excel file. How do you troubleshoot?
I would first agree on definitions: gross or net, including tax or returns, order date or invoice date. Then compare one small slice, such as one month and one region, in both. I check filters on the report and page, relationships that drop unmatched rows, refresh time versus the Excel extract time, and duplicate rows. Once the gap is explained, I document the definition in the report so the question does not repeat.
A correlated subquery refers to a column from the outer query, so it is logically evaluated once per outer row. Example: find employees earning above their department average with WHERE salary > (SELECT AVG(salary) FROM emp e2 WHERE e2.dept_id = e1.dept_id). It is readable but can be slow on large tables. The same result is often faster with a window function such as AVG(salary) OVER (PARTITION BY dept_id).
A Data Table shows how a formula's result changes when one or two inputs vary. For example, place a loan EMI formula in a corner, list interest rates down the column and tenures across the row, then use What-If Analysis, Data Table to fill every combination. It is ideal for sensitivity analysis in pricing or budgeting. Large Data Tables slow recalculation, so set calculation to automatic except tables when needed.
06
What is statistical significance vs practical significance?
A dataflow is Power Query running in the Power BI Service. It extracts and cleans data once and stores the result so many datasets can reuse it. For example, a single cleaned Customer table can feed sales, finance and marketing reports, ensuring consistent logic and reducing load on the source. Dataflows suit shared, reusable preparation; logic that only one report needs can stay in that report's Power Query.
08
Your Top 10 products filter in Tableau ignores the category filter. Why, and how do you fix it?
A context filter is applied before other dimension filters and before FIXED LOD calculations, creating a smaller dataset the rest of the view works on. Use it when a Top N filter should operate within a selected category, for example top 10 products within Electronics, or when a FIXED LOD must respect a filter. Add a filter to context from its right-click menu; it turns grey. Too many context filters can hurt performance.
09
A stakeholder wants 20 more visuals added to an already crowded dashboard page. How do you respond?
I would ask which decisions each new visual supports and how often they will look at it. Usually a few are essential and the rest are nice to have. I would propose keeping the main page focused on core KPIs and moving detail into drill-through pages, tooltips or a separate analysis tab. Showing a quick mock-up of both versions helps them see that the cleaner page answers questions faster.
10
Write Python code for a simple difference-in-differences estimate of a store pilot.
DIVIDE(numerator, denominator, alternate) handles division by zero or blank safely and returns blank or the alternate value you supply, so visuals do not show errors or infinity. The / operator returns an error or infinity in those cases. For example, DIVIDE([Profit], [Sales]) shows blank for a product with no sales. Use / only when you are certain the denominator can never be zero, because it is marginally faster.
A role-playing dimension is one physical dimension used several times by the same fact table in different roles. The classic case is the date dimension: an orders fact has order date, ship date and delivery date keys, all pointing to the same date table. In SQL you join it three times with different aliases; in Power BI you keep one active relationship and use USERELATIONSHIP or create separate date views for each role.
13
What is the difference between users, sessions and events in Google Analytics 4?
GA4 uses an event-based model: every interaction, such as page_view, scroll, add_to_cart or purchase, is an event with parameters. A session is a group of events from one user within a period of activity, ending after 30 minutes of inactivity by default. A user is identified by a device cookie, app instance or a logged-in user ID. One user can have many sessions, and each session many events.
14
What steps would you apply in Power Query to clean a messy system export?
Typical steps: remove top junk rows and promote the real header row, remove blank rows and columns, set correct data types, trim and clean text, split combined columns such as Name - City, replace error values, fill down for grouped labels, remove duplicates on the business key, and unpivot wide month columns. Rename steps meaningfully so others can follow them, and keep the query foldable when the source is a database.
15
Email open rates suddenly jumped from 22% to 45% without any campaign change. Should you celebrate?
No. Privacy features in some mail apps pre-load email images, which fires the open tracking pixel even if the person never reads the email, so open rates get inflated. Check opens by email client to confirm. Move reporting towards clicks, click-to-send rate, conversions and unsubscribes, which reflect real behaviour, and avoid using opens alone to pick winning subject lines or to define engaged subscribers.
A conformed dimension is one dimension table with the same keys, attributes and meanings shared by several fact tables. For example, one date and one product dimension used by sales, returns and inventory facts. Because they conform, you can compare sales and returns by the same product category in one report without mismatched definitions. Conformed dimensions are the main way an enterprise warehouse stays consistent across departments.
Use a star schema, remove unused columns, prefer measures, reduce visuals per page, limit high-cardinality fields and use aggregations or incremental refresh.
18
Tell me about a time you found a mistake in a report after it had already been shared.
Situation: a day after sending a weekly report, I noticed one region's numbers included test orders. Task: correct it before decisions were made. Action: I quantified the impact, a 3 percent overstatement, and emailed the same audience with the corrected figures, a short explanation and the fix I had added to prevent repeats. Result: my manager appreciated the quick ownership, and the test-order filter became part of our shared dataset.
A calculated column is computed row by row and stored in the model. A measure is computed at query time using the filter context, e.g. Total Sales = SUM(Sales[Amount]). Prefer measures for aggregations.
20
Your A/B test ends with no significant difference. How do you report it?
A flat result is still useful. Report the observed difference with its confidence interval, for example -0.3% to +0.8%, which shows the range of effects still possible. State whether the test had enough power for the planned MDE. If it did, conclude that any effect is probably small and the team can choose based on cost or simplicity. Share learnings so the same idea is not retested blindly.
21
Tell me about a time requirements kept changing on a report you were building.
Situation: a sales head kept adding new metrics while I was building a Power BI report. Task: deliver on time without endless rework. Action: I wrote a one-page scope with the agreed KPIs, shared a rough mock-up first, and logged new asks in a backlog with effort estimates. We agreed phase one and phase two. Result: phase one went live on schedule, and later requests were planned instead of disrupting the work.
22
Difference between a CTE, a subquery and a temp table?
A subquery is inline; a CTE is a named, readable block for one statement; a temp table is physically stored for the session and can be indexed and reused.
23
Write a Tableau calculation to find each customer's first purchase date and flag new versus repeat orders.
// First Purchase Date
{ FIXED [Customer ID] : MIN([Order Date]) }
// Order Type
IF [Order Date] = [First Purchase Date]
THEN 'New'
ELSE 'Repeat'
END
// Cohort Month for retention analysis
DATETRUNC('month', [First Purchase Date])
24
Write pandas code to find the top 2 products by revenue in each region.
A holdout group is a small share of users, often 5-10%, kept out of a feature or of all marketing campaigns for a long time. Comparing them with everyone else shows the cumulative long-term impact, which individual short tests miss, and checks whether many small wins really add up. For example, a notification holdout shows whether push messages raise monthly retention or just shift activity earlier.
Open the semantic model's refresh history in the Service to see whether refreshes failed, for example due to expired credentials, an offline gateway or a timeout. Check whether the report is connected to a different copy of the model, whether the source itself was updated, and whether incremental refresh only covers some partitions. Also confirm the schedule time zone. Finally, add a 'data as of' timestamp on the report.
Read the execution plan, add or fix indexes, select only needed columns, filter early, avoid functions on indexed columns, and replace correlated subqueries with joins.
30
You loaded a month of sales into the warehouse. How do you check the load is complete and correct?
Reconcile against the source: compare row counts, total amount, and counts by day and by store between source and target. Check for duplicate keys, nulls in mandatory columns, and dates outside the expected month. Compare with the previous month to spot big unexplained jumps. Spot-check a few individual transactions end to end. Automate these checks so each future load produces a small pass or fail report.
31
Write Python code to test whether conversion differs between control and treatment.
from statsmodels.stats.proportion import proportions_ztest, proportion_confint
conversions = [1180, 1295] # control, treatment
visitors = [30000, 30100]
z, p = proportions_ztest(conversions, visitors)
print(f'z = {z:.2f}, p = {p:.4f}')
for c, n in zip(conversions, visitors):
low, high = proportion_confint(c, n, method='wilson')
print(f'rate {c/n:.3%} 95% CI {low:.3%} to {high:.3%}')
32
Write a DAX measure for cumulative sales from the start of the data to the selected date.
Cumulative Sales =
VAR maxDate = MAX('Date'[Date])
RETURN
CALCULATE(
[Total Sales],
FILTER(ALL('Date'[Date]), 'Date'[Date] <= maxDate)
)
-- for a running total that resets each year use TOTALYTD([Total Sales], 'Date'[Date])
33
Tell me about a time you had to prioritise several dashboard requests at once.
Situation: three managers asked for new dashboards in the same week. Task: I could not finish all of them on time. Action: I asked each about the decision the dashboard would support and its deadline, estimated effort, and shared a proposed order with my manager. I gave one requester a quick interim extract. Result: the most urgent dashboard, for a pricing review, shipped first, and nobody was left without any data.
34
Write SQL to show each category's percentage share of total revenue.
SELECT category,
SUM(amount) AS revenue,
ROUND(100.0 * SUM(amount)
/ SUM(SUM(amount)) OVER (), 2) AS pct_share
FROM sales
GROUP BY category
ORDER BY revenue DESC;
-- SUM(SUM(amount)) OVER () is the grand total across all groups
First normalise: trim and lower-case names, collapse spaces, and strip country codes and symbols from phones and emails. Then match on strong keys such as phone or email. For remaining records use fuzzy matching on names with a similarity score, restricted to the same city or pin code to limit comparisons. Review borderline scores manually, keep a mapping from old IDs to a master ID, and fix entry at the source.
MATCH finds the position of a value in a range and INDEX returns the item at that position, giving a flexible lookup that works left or right and survives column insertions.
38
A query on a 2-billion-row fact table in a cloud warehouse scans the whole table even when you filter one week. How do you fix it?
Partition the table by date so the engine can prune partitions outside the filtered week, and cluster or sort by frequently filtered columns such as store or customer. Make sure the filter is on the partition column directly, not wrapped in a function like CAST or DATE_TRUNC that blocks pruning. Select only needed columns, because storage is columnar. For dashboards, also consider a pre-aggregated daily summary table.
39
Write SQL to calculate open rate and click-through rate for each email campaign.
SELECT
s.campaign_id,
COUNT(DISTINCT s.user_id) AS delivered,
COUNT(DISTINCT o.user_id) AS opened,
COUNT(DISTINCT c.user_id) AS clicked,
ROUND(100.0 * COUNT(DISTINCT o.user_id) / COUNT(DISTINCT s.user_id), 1) AS open_rate,
ROUND(100.0 * COUNT(DISTINCT c.user_id) / COUNT(DISTINCT s.user_id), 1) AS ctr
FROM email_sends s
LEFT JOIN email_opens o ON o.campaign_id = s.campaign_id AND o.user_id = s.user_id
LEFT JOIN email_clicks c ON c.campaign_id = s.campaign_id AND c.user_id = s.user_id
WHERE s.status = 'delivered'
GROUP BY s.campaign_id;
40
Many reporting queries in your team use SELECT DISTINCT to remove duplicate rows. What is the risk?
SELECT DISTINCT often hides a real problem, such as a join on the wrong key or a one-to-many join that multiplies rows. The output looks clean, but sums computed before the DISTINCT, or legitimate repeated rows, can be wrong, and DISTINCT adds a costly sort on large tables. Instead, find why duplicates appear, fix the join or aggregate the child table first, and add a uniqueness test on the key.
Tips to crack the McKinsey & Company Data Analytics interview
Practise structured case interviews out loud, focusing on breaking problems into clear parts and doing quick mental arithmetic accurately.
Prepare detailed personal stories on leadership, impact and handling conflict, since McKinsey asks probing follow-up questions on each story.
For analytics roles, revise SQL, Python and statistics along with case skills, because both are often tested together.
Keep a one-minute story ready for every project on your CV: problem, your part, tools, result.
Practise the hard questions on this page aloud; McKinsey & Company interviewers usually ask follow-ups on your first answer.
Frequently asked questions
How many rounds are there in the McKinsey & Company Data Analytics interview?
Candidates usually go through 4 stages: Online problem-solving assessment or game-based test; Case interview round 1; Case interview round 2 with personal experience questions; Final partner round. The exact rounds change with the role, team, location and your experience, so confirm the process with the recruiter.
Which topics should I prepare for the McKinsey & Company Data Analytics interview?
This practice set leans on Power BI (9), SQL (5), Python for Analysis (4), A/B Testing & Experiments (4). Revise those first, then practise explaining one or two of your own projects end to end, because most McKinsey & Company interviewers ask you to walk through real work.
Are these the exact questions asked at McKinsey & Company?
No. These are curated practice questions that match the skills and difficulty usually tested in consulting interviews like McKinsey & Company's. They are not a leaked or verified list of past questions.
Where does McKinsey & Company hire Data Analytics professionals in India?
McKinsey & Company has large teams in Gurugram, Mumbai, Bengaluru, Chennai. Openings and locations change often, so check the McKinsey & Company careers page and filter by city and experience.