Skip to the questions

Data Analyst · Fresher to 3 years

Data analyst interview questions

The 40 Excel, Power BI, statistics and business-case questions that come up most in data analyst interviews, worked on one shared sales dataset. Each one has a short answer you can say out loud in about 30 seconds, and the full explanation for when you need it.

Read the quick answers

5 Basics · 6 Excel functions · 3 Excel analysis · 6 Power BI · 6 DAX · 3 Charts · 3 Descriptive stats · 3 Inferential stats · 5 A/B & metricsUpdated 27 Oct 2026

When is your interview?

Before you startThe shared dataset

Every practical question on this page uses the same two tables: Sales, one row per order, and Products, one row per product. The full file has orders from January 2024 to December 2025; the worked examples use the 15 orders and 7 products below, so you can check every result by hand. The sample is awkward in exactly the ways interview questions probe: one order is from March 2024, so "March" means two different months; one is dated 1 April 2025, just past a month boundary; one is worth exactly ₹2,000, a threshold in question 11; and one is for P-030, a product missing from the Products table.

Sales sheet

ColumnFieldDescription
AOrder IDUnique ID, such as SO-1001; each order is for one product
BOrder DateThe date the order was placed
CCustomer IDWho ordered, such as C-0457; repeat customers appear on several orders
DRegionNorth, South, East or West
EProduct IDThe product ordered, such as P-012; links to the Products table
FQuantityUnits ordered
GUnit Price (₹)Price charged per unit on this order, after any discount

Questions 9 to 11 add three columns: H, Sales Amount; I and J, Category and Unit Cost looked up from Products; and K, a High, Medium or Low label.

RowOrder IDOrder DateCustomer IDRegionProduct IDQuantityUnit Price (₹)
2SO-100114-Mar-2024C-0457SouthP-0124399
3SO-100208-Jan-2025C-0102NorthP-00121,799
4SO-100319-Jan-2025C-0457SouthP-00713,999
5SO-100403-Feb-2025C-0311EastP-02110120
6SO-100521-Feb-2025C-0102NorthP-0151899
7SO-100602-Mar-2025C-0520SouthP-00422,499
8SO-100709-Mar-2025C-0457SouthP-0126449
9SO-100815-Mar-2025C-0264WestP-00131,999
10SO-100922-Mar-2025C-0611SouthP-00733,799
11SO-101031-Mar-2025C-0520SouthP-0232580
12SO-101101-Apr-2025C-0733SouthP-00111,899
13SO-101212-Apr-2025C-0311EastP-0302650
14SO-101318-Apr-2025C-0102NorthP-00442,499
15SO-101427-Apr-2025C-0264WestP-01512849
16SO-101530-Apr-2025C-0845SouthP-0215120

Products sheet

ColumnFieldDescription
AProduct IDOne row per product
BProduct NameThe name shown to customers
CCategoryElectronics, Home & Kitchen or Stationery
DUnit Cost (₹)What the company pays per unit; used for profit and margin
RowProduct IDProduct NameCategoryUnit Cost (₹)
2P-001Wireless EarbudsElectronics1,450
3P-004Bluetooth SpeakerElectronics2,050
4P-007Smart WatchElectronics3,300
5P-012Steel Water BottleHome & Kitchen210
6P-015Non-stick Frying PanHome & Kitchen480
7P-021Gel Pen PackStationery55
8P-023A5 NotebookStationery32

In Power BI (questions 15 to 26), the same two sheets load as tables called Sales and Products. Column names in formulas drop the "(₹)", so the price column is Sales[Unit Price], and the added Sales Amount column is Sales[Sales Amount].

01Analysis basics

0/5 got it

Q01Not marked yetFresherAsked very oftenConcept

Walk me through the steps of a data analysis project, from the business question to your recommendation

Say this first~30 sec to say

I follow six steps. Define the question with the stakeholder, including how success will be measured. Collect the data and check where it came from. Clean it: duplicates, blanks, inconsistent labels. Explore and analyse with summaries, breakdowns and comparisons that answer the question. Visualise the findings simply. Then recommend an action, with the evidence and its limits. Cleaning takes the most time, but the first step decides whether the work is useful.

Could you say it?
Full answer2 min read

One project, step by step: the South region's sales head asks, "Why are fewer customers coming back to order again?"

StepWhat I doIn this project
1. Define the questionAgree what's being asked, why, and what decision it feeds"Coming back" means a second order within 90 days; the decision is where to spend next quarter's retention budget
2. CollectFind the sources and check coverageSales and Products exports for Jan 2024 to Dec 2025; row counts match the order system
3. CleanFix duplicates, blanks, formats and labelsRemove duplicate orders, standardise region names, flag products missing from Products
4. Explore and analyseSummarise, segment, compareRepeat rate by month, region and first product bought (question 37)
5. VisualiseChoose charts that make the answer obviousOne line chart: repeat rate by month, South against the other regions
6. RecommendState the finding, the evidence, the action and the caveats"South's repeat rate fell after delivery times rose in June; fix delivery first and recheck in six weeks"

What interviewers listen for: that you start from the business decision, not the data; that you check the data before trusting it; and that you finish with a recommendation, not a pile of charts.

How to structure your answer: walk through the steps using a real project of your own if you have one, even a college project, naming one specific problem you hit at each step.

Follow-ups

  • Which step takes the longest? Usually cleaning and preparing the data, often more than half the time.
  • What if the data can't answer the question? Say so early, explain what's missing, and suggest the closest question it can answer or how to collect what's needed.
Q02Not marked yetFresherAsked oftenConcept

What are descriptive, diagnostic, predictive and prescriptive analytics? Give a business example of each

Say this first~25 sec to say

Descriptive analytics says what happened: last month's sales by region. Diagnostic analytics explains why it happened: sales fell because Electronics orders in the South dropped. Predictive analytics estimates what will happen: next month's sales forecast. Prescriptive analytics recommends what to do: which discount or stock level gives the best result. Each builds on the one before, and most day-to-day analyst work is descriptive and diagnostic.

Could you say it?
Full answer1 min read
TypeQuestion it answersExample on the shared datasetTypical tools
DescriptiveWhat happened?South sales were ₹21,089 in March 2025Pivot tables, dashboards, summary statistics
DiagnosticWhy did it happen?South sales then fell in April because there were no large Electronics ordersDrill-downs, segment comparisons, root-cause analysis
PredictiveWhat will happen?Forecast May's sales from past months and seasonalityForecasting, regression, machine learning
PrescriptiveWhat should we do?Choose the Diwali discount that maximises profit, not just salesOptimisation, simulation, A/B tests

The pattern: moving down the table, the questions get harder to answer and the answers become more valuable, because they lead more directly to decisions.

Follow-ups

  • Which type is a monthly sales dashboard? Descriptive, with some diagnostic power if it lets users drill down by region and category.
  • Is an A/B test diagnostic or prescriptive? It tests whether a change causes an improvement, so it supports a prescriptive decision: ship the change or don't (question 36).
Q03Not marked yetFresherAsked very oftenConcept

A file you receive has blank cells and the same city written as "Bangalore", "bangalore" and "Bengaluru". How do you clean it, and how do you decide whether to drop or fill the missing values?

Say this first~30 sec to say

First I standardise the city: trim stray spaces and fix the capitalisation with PROPER(TRIM()), then map every variant to one name, Bengaluru, with a small lookup table or Power Query's Replace Values. For missing values, I first ask why they're missing and how many there are. A few at random: leave those rows out of that analysis. An obvious default: fill it, such as "Unknown". Otherwise flag them and investigate the source. Never fill in values silently.

Could you say it?
Full answer3 min read

The raw data

RowA: Customer IDB: CityC: Monthly spend (₹)
2C-0102Bangalore4,200
3C-0264␣bengaluru␣ (with spaces)3,100
4C-0311BANGALORE(blank)
5C-0457Bengaluru5,600
6C-0520(blank)2,900
7C-0611Mysuru1,800

Step 1: clean the text, then map the variants. A small mapping table in E2:F3 lists each known variant and its standard name (Bangalore → Bengaluru, Bombay → Mumbai). In D2, filled down:

Excel
=XLOOKUP(PROPER(TRIM(B2)), $E$2:$E$3, $F$2:$F$3, PROPER(TRIM(B2)))

TRIM removes the stray spaces and PROPER fixes the capitals, so all three spellings become either "Bangalore" or "Bengaluru"; the lookup then maps "Bangalore" to "Bengaluru". Cities not in the table, like Mysuru, pass through unchanged. In Power Query, the same steps are Transform → Format → Trim, Capitalize Each Word, then Replace Values.

Step 2: decide what to do with each blank

SituationActionExample
A few rows, missing at random, and this analysis needs the columnLeave those rows out of this analysis only2 of 5,000 orders have no region
A blank genuinely means a known valueFill it, after confirmingA blank "Discount" means no discount, so 0
A category is unknownLabel it explicitlyCity blank → "Unknown"
A number is needed for an averageLeave it blank, or fill with the median and add a flag columnMonthly spend
Many blanks, or blanks with a patternFlag and investigate before analysingAll blank cities come from the app's new sign-up form

Why filling with 0 is dangerous: AVERAGE skips blank cells but counts zeros. The five known spends above average ₹3,520; fill C4's blank with 0, and the average drops to ₹2,933, a customer who never existed at ₹0 pulling it down.

Follow-ups

  • How do you find all the variants of a city? Build a pivot table, or use UNIQUE, on the city column after TRIM and PROPER, and read the list; variants like "Bengaluru", "Bangaluru" and "Blr" stand out.
  • Should you delete rows with blanks? Only from the analysis that can't use them, and only after checking they're few and random. Deleting them from the source data loses information other analyses might need.
Q04Not marked yetFresherAsked oftenConcept

What is an outlier, how would you spot one, and when should you keep it rather than remove it?

Say this first~30 sec to say

An outlier is a value far from the rest, such as one ₹48,000 order in a day of ₹1,000–3,000 orders. I'd spot it with a box plot, a sorted list, or the IQR rule: anything more than 1.5 × IQR beyond the quartiles. Then I investigate before acting. A data-entry error, like ₹4,800 typed as ₹48,000, gets corrected. A real event, such as a corporate bulk order, stays, but I'd report it separately so it doesn't distort averages.

Could you say it?
Full answer2 min read

Ten South-region orders from one day, in A2:A11: 640, 899, 1,199, 1,350, 1,499, 1,799, 2,100, 2,499, 2,999 and 48,000.

CellFormulaResult
D2: first quartile=QUARTILE.INC(A2:A11, 1)1,236.75
D3: third quartile=QUARTILE.INC(A2:A11, 3)2,399.25
D4: IQR=D3-D21,162.50
D5: lower fence=D2-1.5*D4-507
D6: upper fence=D3+1.5*D44,143

Anything above ₹4,143 is an outlier, so the ₹48,000 order is flagged.

Why the IQR rule beats the z-score here: the z-score of the ₹48,000 order is

Excel
=(A11-AVERAGE($A$2:$A$11))/STDEV.S($A$2:$A$11)

which gives 2.84, below the usual cut-off of 3. The outlier inflates the standard deviation it's measured against, so it hides itself. Quartiles barely move when one extreme value is added, which makes the IQR rule more robust on small or skewed data.

What one outlier does to a summary

MeanMedian
All 10 orders₹6,298₹1,649
Without the ₹48,000 order₹1,665₹1,499

Keep or remove?

The outlier is…Do this
A data error (a typo, a test order, a duplicate)Correct it if you can confirm the right value; otherwise remove it and note it
Real, but from a different process (a B2B bulk order)Keep it, but analyse it separately from retail orders
Real and part of the story (a viral product's spike)Keep it, and use the median or a log scale so it doesn't dominate the charts

Follow-ups

  • What does a box plot show? The median, the quartiles as a box, whiskers out to the furthest points within 1.5 × IQR, and outliers as separate dots.
  • Would you ever cap outliers? Sometimes, for modelling, by replacing values beyond a percentile with that percentile (winsorising). For reporting, it's better to show them honestly.
Q05Not marked yet1–3 yrsAsked sometimesCase

Your September revenue report shows ₹42 lakh, but Finance's report shows ₹45 lakh. How would you work out which number is right?

Say this first~30 sec to say

I wouldn't assume either is wrong. First I'd compare definitions: what counts as revenue (GST, cancelled and returned orders), which date each uses (order, invoice or payment date), the cut-off and time zone, filters such as test or B2B orders, and the source system. Then I'd reconcile at order level, matching order IDs across both reports, build a bridge from ₹42 lakh to ₹45 lakh, and agree one definition with Finance.

Could you say it?
Full answer2 min read

Usual causes of a mismatch

DifferenceExample
Definition of revenueFinance includes GST or shipping charges; your report doesn't
Date usedYou count by order date; Finance books by invoice or delivery date
Cut-off and time zoneA system that stores times in UTC puts orders placed between midnight and 5:30 a.m. IST on 1 October into September
Status filtersYou exclude cancelled orders; Finance reverses them only when the credit note is issued
Source systemBulk B2B orders are entered straight into the finance system, never into the website database
Duplicates or missing loadsA failed data load on one day, or the same orders loaded twice

Reconcile at order level. Export order IDs and amounts from both reports into one workbook. In your report's sheet, flag orders Finance doesn't have:

Excel
=IF(COUNTIF(Finance!A:A, A2)=0, "Missing in Finance", "")

and the same in reverse on Finance's sheet. Then group the unmatched orders by cause.

The bridge, which explains the whole difference:

Step₹ lakh
Your report (order date, excluding GST, cancelled orders excluded)42.0
+ B2B orders entered only in the finance system+2.1
+ Orders cancelled in October but invoiced in September+0.5
+ Timing: orders placed in August but invoiced in September, net of September orders invoiced in October+0.4
= Finance's report45.0

Which number is right? Both can be, for different purposes. Finance's figure is right for the accounts; yours may be right for measuring customer demand. The fix is to label each report with its definition, or agree one shared definition.

Follow-ups

  • What if you can't explain the whole gap? Report the part you've explained, the unexplained remainder, and what you're checking next. An honest "₹0.3 lakh still unexplained" beats a forced match.
  • How do you stop it happening again? Write the metric definition down, ideally in a shared data dictionary, and add an automatic check that compares the two totals every month.

02Excel functions

0/6 got it

Q06Not marked yetFresherAsked very oftenConcept

How do VLOOKUP, XLOOKUP and INDEX-MATCH differ, and when would you pick each?

Say this first~30 sec to say

VLOOKUP searches a range's first column and returns a column by number: it can't look left, inserted columns break it, and it does an approximate match unless the last argument is FALSE. INDEX-MATCH searches any column, returns any other, survives inserted columns and works in every Excel version. XLOOKUP does all that more simply, matching exactly by default with a built-in not-found value, but needs Microsoft 365 or Excel 2021 and later.

Could you say it?
Full answer3 min read

The same lookup, three ways: the Category for the Product ID in Sales!E2 (P-012, so "Home & Kitchen").

Excel
=VLOOKUP(E2, Products!$A:$D, 3, FALSE)
=INDEX(Products!$C:$C, MATCH(E2, Products!$A:$A, 0))
=XLOOKUP(E2, Products!$A:$A, Products!$C:$C)
VLOOKUPINDEX-MATCHXLOOKUP
Lookup columnMust be the first column of the rangeAny columnAny column
Can look leftNoYesYes
Return column given byA number (3)A rangeA range
Inserting a column inside the rangeBreaks it: column 3 is now a different columnUnaffectedUnaffected
Default matchApproximate (if the last argument is left out)Set by MATCH's 0 for exactExact
Not-found handlingWrap in IFERROR or IFNAWrap in IFERROR or IFNABuilt in: 4th argument
Available inEvery versionEvery versionMicrosoft 365, Excel 2021 and later, Google Sheets

Looking left: to find a product's ID from its name, the lookup column (B, Product Name) is to the right of the result (A, Product ID). VLOOKUP can't do that; the others can:

Excel
=XLOOKUP("Smart Watch", Products!$B:$B, Products!$A:$A)

That returns P-007.

The approximate-match trap: leave out VLOOKUP's last argument and it does an approximate match, which returns the nearest value below when there's no exact one. On the sorted Products sheet,

Excel
=VLOOKUP("P-030", Products!$A:$D, 3)

returns "Stationery", the category of P-023, instead of an error, so a missing product silently gets the wrong category. Always pass FALSE (or 0) for exact matches.

Which to pick: XLOOKUP where everyone has Microsoft 365; INDEX-MATCH when the file is shared with people on older Excel; VLOOKUP only for quick lookups, with FALSE.

Follow-ups

  • Why is INDEX-MATCH said to be faster? On big sheets, it reads only the two columns it needs, while VLOOKUP's range covers every column in between; with today's Excel the difference is small.
  • What does IFNA do better than IFERROR? It catches only #N/A, the "not found" error, so real mistakes such as a #REF! from a deleted column still show up.
Q07Not marked yetFresherAsked oftenConcept

What is the difference between relative, absolute and mixed cell references, and when do you need each?

Say this first~30 sec to say

A relative reference like A2 shifts when a formula is copied: copied one row down, it becomes A3. An absolute reference like $A$2 never shifts, so it suits a fixed input such as a GST rate in one cell. A mixed reference locks only the column ($A2) or only the row (A$2), which is what grid formulas and conditional-formatting rules need. Pressing F4 while editing a reference cycles through the four forms.

Could you say it?
Full answer2 min read

What happens when a formula in C2 is copied to D3, one column right and one row down:

Reference in C2Becomes in D3Locked
A2B3Nothing
$A$2$A$2Column and row
$A2$A3Column only
A$2B$2Row only

Each one on the shared dataset

  • Relative: Sales Amount in H2 is =F2*G2; filled down, row 16 correctly becomes =F16*G16.
  • Absolute: each order's share of all sales, in L2: =H2/SUM($H$2:$H$16). Without the $ signs, the total's range would slide down as the formula is filled, and every share after the first would be wrong.
  • Absolute, for an input cell: with the GST rate of 18% in P1, the tax on each order is =H2*$P$1.
  • Mixed: a price grid with prices down column A and discount rates across row 1. In B2, filled across and down:
Excel
=$A2*(1-B$1)

Every cell then takes the price from its own row (column A locked) and the rate from its own column (row 1 locked).

B: 5% offC: 10% offD: 15% off
A2: ₹1,000950900850
A3: ₹2,5002,3752,2502,125
A4: ₹4,0003,8003,6003,400

Follow-ups

  • Where else do mixed references matter? In conditional formatting, which applies one formula to every selected cell as if it had been copied there (question 13).
  • What about Excel Tables? Structured references such as Sales[@Quantity] don't shift at all, which avoids most of these mistakes.
Q08Not marked yetFresherAsked oftenConcept

What do COUNT, COUNTA, COUNTBLANK and COUNTIF each count, and when would they give different answers on the same column?

Say this first~30 sec to say

COUNT counts cells holding numbers, dates included, since Excel stores dates as numbers. COUNTA counts non-empty cells: numbers, text, errors, even a formula that returns empty text. COUNTBLANK counts empty cells, and also cells whose formula returns "". COUNTIF counts cells that meet one condition, such as "NA" or ">1000". They disagree whenever a column mixes numbers, text and blanks, such as numbers that arrived from a CSV as text.

Could you say it?
Full answer2 min read

A discount column, A2:A8, imported from a CSV

CellContainsCOUNTCOUNTACOUNTBLANK
A2250 (a number)✓✓
A30 (a number)✓✓
A4Nothing✓
A5The text NA✓
A6A formula returning ""✓✓
A775 (a number)✓✓
A8120 stored as text✓
Total362
Excel
=COUNT(A2:A8)
=COUNTA(A2:A8)
=COUNTBLANK(A2:A8)
=COUNTIF(A2:A8, "NA")

These return 3, 6, 2 and 1.

The two surprises

  • A6 is counted by both COUNTA and COUNTBLANK. A formula returning "" isn't empty to COUNTA, but COUNTBLANK treats empty text as blank. That's Microsoft's documented behaviour, and it's why the three counts don't add up to 7.
  • A8's "120" is invisible to COUNT and to SUM. It's text, so SUM(A2:A8) is 325, not 445. Convert it with VALUE, Text to Columns, or Convert to Number from the green warning triangle.

Follow-ups

  • How do you count cells meeting two conditions? COUNTIFS, such as =COUNTIFS(Sales!D:D, "South", Sales!H:H, ">=10000"), which counts South orders worth ₹10,000 or more (1 in the sample).
  • How do you count unique values? In Microsoft 365, =COUNTA(UNIQUE(Sales!C2:C16)) gives 8 customers; in a pivot table, use Distinct Count (question 37).
Q09Not marked yetFresherAsked very oftenPractical

Add a Sales Amount column (Quantity × Unit Price), then write one formula that returns total sales for the South region in March 2025

Say this first~30 sec to say

In H2, =F2*G2, filled down, gives each order's Sales Amount. Then SUMIFS adds up column H only where every condition holds: Region is "South", and Order Date is on or after 1 March 2025 and before 1 April 2025. On the sample it returns ₹21,089. Using "before 1 April" rather than "up to 31 March" keeps orders that carry a time on 31 March, and the explicit year keeps March 2024 out.

Could you say it?
Full answer2 min read

Step 1: H1 is the header "Sales Amount"; in H2, filled down to H16:

Excel
=F2*G2

Step 2: in any cell outside columns B, D and H:

Excel
=SUMIFS(H:H, D:D, "South", B:B, ">="&DATE(2025,3,1), B:B, "<"&DATE(2025,4,1))

Which orders it adds

OrderDateRegionSales AmountCounted?
SO-100602-Mar-2025South4,998Yes
SO-100709-Mar-2025South2,694Yes
SO-100922-Mar-2025South11,397Yes
SO-101031-Mar-2025South2,000Yes
SO-100114-Mar-2024South1,596No: March of the wrong year
SO-101101-Apr-2025South1,899No: just past the end date
SO-100815-Mar-2025West5,997No: wrong region
21,089

A reusable version: put the region in M1 ("South") and the first day of the month in M2 (01-Mar-2025):

Excel
=SUMIFS(H:H, D:D, $M$1, B:B, ">="&$M$2, B:B, "<"&EDATE($M$2,1))

EDATE($M$2,1) is the same day one month later, 1 April, so changing M2 to any month gives that month's total.

Common mistakes

  • Typing the date as text, ">=01/03/2025": whether that's 1 March or 3 January depends on the computer's regional settings. DATE(2025,3,1) is unambiguous.
  • Mixing up the argument order: SUMIFS takes the sum range first; the older SUMIF takes it last.
  • Filtering on the month alone, such as MONTH(B2)=3, which also catches March 2024.

Follow-ups

  • How would you do this without a formula? A pivot table with Region as a filter and dates grouped by year and month (question 12).
  • How do you count the orders instead? The same conditions in COUNTIFS: =COUNTIFS(D:D, "South", B:B, ">="&DATE(2025,3,1), B:B, "<"&DATE(2025,4,1)) returns 4.
Q10Not marked yetFresherAsked very oftenPractical

Bring each product's Category and Unit Cost from the Products table into the Sales table, showing "Not found" when a Product ID has no match

Say this first~25 sec to say

In Sales, I'd add two columns with XLOOKUP, searching Products' ID column and returning the column I need, with "Not found" as the fourth argument: =XLOOKUP(E2, Products!$A:$A, Products!$C:$C, "Not found") for Category, and the same with column D for Unit Cost. Filled down, the order for P-030 shows "Not found". In older Excel, wrap INDEX-MATCH in IFERROR, or better, IFNA.

Could you say it?
Full answer2 min read

I1 "Category" and J1 "Unit Cost"; in I2 and J2, filled down:

Excel
=XLOOKUP(E2, Products!$A:$A, Products!$C:$C, "Not found")
=XLOOKUP(E2, Products!$A:$A, Products!$D:$D, "Not found")

For Excel 2019 and older:

Excel
=IFNA(INDEX(Products!$C:$C, MATCH(E2, Products!$A:$A, 0)), "Not found")
=IFNA(INDEX(Products!$D:$D, MATCH(E2, Products!$A:$A, 0)), "Not found")

The results

RowProduct IDI: CategoryJ: Unit Cost
2P-012Home & Kitchen210
3P-001Electronics1,450
4P-007Electronics3,300
…………
13P-030Not foundNot found

Three details interviewers like

  • The $ signs keep the lookup ranges fixed as the formula is filled down (question 7).
  • "Not found" in a number column has a cost: any calculation using J13, such as profit, returns #VALUE!. That's arguably useful, since it forces someone to fix the Products table, but for totals you'd filter the row out or return a blank instead.
  • IDs that look identical but don't match usually have a stray space or are numbers stored as text. XLOOKUP(TRIM(E2), …) fixes the first; consistent data types fix the second.

Follow-ups

  • IFERROR or IFNA? IFNA catches only "not found" (#N/A); IFERROR also hides genuine mistakes, such as a typo in the sheet name.
  • How would you list the missing products? Filter column I for "Not found", or in Microsoft 365, =UNIQUE(FILTER(E2:E16, I2:I16="Not found")).
Q11Not marked yetFresherAsked oftenPractical

Add a column that labels each order High if its sales amount is ₹10,000 or more, Medium if it is at least ₹2,000, and Low otherwise

Say this first~25 sec to say

In K2, =IFS(H2>=10000, "High", H2>=2000, "Medium", TRUE, "Low"), filled down, or the nested form =IF(H2>=10000, "High", IF(H2>=2000, "Medium", "Low")) in older Excel. The order of the conditions matters: Excel stops at the first true one, so the highest threshold must come first. Check >= against the requirement: SO-1010, worth exactly ₹2,000, must be Medium. On the sample: 2 High, 7 Medium, 6 Low.

Could you say it?
Full answer2 min read

K1 "Size"; in K2, filled down:

Excel
=IFS(H2>=10000, "High", H2>=2000, "Medium", TRUE, "Low")

The final TRUE, "Low" is the catch-all: IFS has no "otherwise" argument, so a condition that's always true plays that role. In Excel 2016 and older, which don't have IFS:

Excel
=IF(H2>=10000, "High", IF(H2>=2000, "Medium", "Low"))

Why the order matters: with the conditions reversed,

Excel
=IF(H2>=2000, "Medium", IF(H2>=10000, "High", "Low"))

SO-1009, worth ₹11,397, is labelled Medium: it passes the first test and Excel never reaches the second. No order can ever be High.

The results at the edges

OrderSales AmountLabelWhy
SO-100911,397High≥ 10,000
SO-101410,188High≥ 10,000
SO-10139,996MediumJust under 10,000
SO-10102,000MediumExactly 2,000: >= includes it
SO-10111,899LowUnder 2,000

A tidier alternative for many bands: put the thresholds in a small table (0 → Low, 2,000 → Medium, 10,000 → High) and use an approximate-match lookup, such as =XLOOKUP(H2, $N$2:$N$4, $O$2:$O$4, , -1), where -1 means "exact match, or the next smaller value". Changing a threshold then means editing a cell, not every formula.

Follow-ups

  • What if Sales Amount is blank or text? A blank counts as 0 and gets "Low", which may hide missing data; guard against it with =IF(H2="", "", IFS(H2>=10000, "High", H2>=2000, "Medium", TRUE, "Low")).
  • How would you count orders per label? =COUNTIF(K:K, "High"), or a pivot table with Size as rows.

03Excel analysis

0/3 got it

Q12Not marked yetFresherAsked very oftenPractical

Create a pivot table with months as rows and categories as columns, then change it to show each category's share of that month's sales

Say this first~30 sec to say

With the Category column from question 10 in place, I'd insert a pivot table: Order Date in Rows, Category in Columns, Sales Amount in Values. I'd group the dates by Years and Months, not Months alone, or March 2024 and March 2025 merge into one row. Then Show Values As → % of Row Total makes each month's categories add up to 100%. In Google Sheets, the equivalent date grouping is Year-Month.

Could you say it?
Full answer2 min read

Steps

  1. Click inside the Sales data, then Insert → PivotTable (on a new sheet).
  2. Drag Order Date to Rows, Category to Columns, Sales Amount to Values (Sum).
  3. Right-click any date in the pivot → Group → select Months and Years.
  4. Right-click any value → Show Values As → % of Row Total.

The result: each category's share of its month

YearMonthElectronicsHome & KitchenStationeryNot foundTotal
2024Mar0.0%100.0%0.0%0.0%100%
2025Jan100.0%0.0%0.0%0.0%100%
2025Feb0.0%42.8%57.2%0.0%100%
2025Mar82.7%9.9%7.4%0.0%100%
2025Apr49.6%42.5%2.5%5.4%100%

The Not found column is the P-030 order from question 10. A pivot shows data problems honestly; fix the Products table, and the column disappears on refresh.

Why grouping by month alone is wrong here: the data spans two years, so a "Mar" row would add March 2024 to March 2025. Home & Kitchen would show ₹4,290 for March instead of 2025's ₹2,694, and every share in that row would be off.

Show Values AsEach cell becomesAnswers
% of Row TotalIts share of the row (the month)What made up each month's sales?
% of Column TotalIts share of the column (the category)In which months did each category sell?
% of Grand TotalIts share of everythingHow big is this month-and-category cell overall?

Follow-ups

  • The pivot didn't change after you edited the data. Why? Pivot tables don't update automatically: use Refresh. Turning the data into an Excel Table first also makes new rows flow in on refresh.
  • How would you show the amounts and the shares side by side? Add Sales Amount to Values twice, and set only the second copy to % of Row Total.
Q13Not marked yetFresherAsked oftenPractical

Use conditional formatting to highlight the entire row of every South-region order worth more than ₹10,000

Say this first~30 sec to say

I'd select the whole data range, A2:K16, then Conditional Formatting → New Rule → Use a formula to determine which cells to format, enter =AND($D2="South", $H2>10000) and pick a fill colour. The $ locks the columns, so every cell in a row checks that row's Region and Sales Amount; the row number stays relative, so each row checks itself. In the sample, only SO-1009 (South, ₹11,397) is highlighted; SO-1014 is over ₹10,000 but in the West.

Could you say it?
Full answer1 min read
Excel
=AND($D2="South", $H2>10000)

How Excel applies it: the formula is written for the top-left cell of the selection, A2, and Excel adjusts it for every other cell as if it had been copied there. For C7, it checks $D7 and $H7: the locked columns stay put, and the row follows the cell. So all eleven cells in row 10 test the same condition and light up together.

Three versions that look right but aren't

RuleWhat goes wrong
=AND(D2="South", H2>10000)Nothing is locked: for cell B2 the rule checks E2 and I2, so cells in the wrong columns get tested
=AND($D$2="South", $H$2>10000)Everything is locked: every row copies row 2's answer, so the whole table is highlighted or nothing is
Correct rule, but only column A selectedOnly the Order ID cell is highlighted, not the entire row

"More than" means >. An order worth exactly ₹10,000 isn't "more than ₹10,000"; if the requirement says "₹10,000 or more", use >=.

Follow-ups

  • How would you let a manager change the region and threshold? Put them in input cells and lock those completely: =AND($D2=$M$1, $H2>$M$3).
  • How do you see or edit the rule later? Conditional Formatting → Manage Rules, with "Show formatting rules for: This Worksheet".
Q14Not marked yetFresherAsked oftenConcept

How do you find and remove duplicate rows in Excel without losing records you actually need?

Say this first~30 sec to say

First I decide which columns define a duplicate. For orders, it's the Order ID: the same order exported twice is a duplicate, but two orders with different IDs are two records, even if everything else matches. Then I flag before deleting: =COUNTIFS($A$2:$A2, A2)>1 marks the second and later copies. I review the flagged rows, keep a backup, and only then use Data → Remove Duplicates with the right columns ticked; it keeps the first copy.

Could you say it?
Full answer3 min read

An export with problems

RowA: Order IDB: Order DateC: Customer IDD: Product IDE: QuantityF: Flag
2SO-100709-Mar-2025C-0457P-0126FALSE
3SO-100815-Mar-2025C-0264P-0013FALSE
4SO-100709-Mar-2025C-0457P-0126TRUE
5SO-101602-May-2025C-0102P-0215FALSE
6SO-101702-May-2025C-0102P-0215FALSE

The flag, in F2, filled down:

Excel
=COUNTIFS($A$2:$A2, A2)>1

The range $A$2:$A2 grows as the formula goes down: it counts how many times this Order ID has appeared so far, so only the second copy of SO-1007, in row 4, is TRUE.

Rows 5 and 6 are the trap. Same customer, product, date and quantity, but different Order IDs: as far as the data says, customer C-0102 ordered pens twice that day. Running Remove Duplicates with every column ticked except Order ID would delete SO-1017, a real order. If you suspect a double-click on the website, check with the order system; don't decide by deleting.

MethodGood forWatch out for
Conditional Formatting → Highlight Cells Rules → Duplicate ValuesSeeing duplicates in one columnHighlights every copy, including the first
A COUNTIFS flag columnReviewing before deleting; multi-column rulesRemember to fill it down
Data → Remove DuplicatesDeleting, once you're sureDeletes permanently and keeps the first copy; tick only the defining columns
Power Query → Remove DuplicatesRepeatable cleaning on every refreshSame choice of key columns

Follow-ups

  • How would you flag rows duplicated across several columns? Add each column pair to COUNTIFS: =COUNTIFS($C$2:$C$6, C2, $D$2:$D$6, D2, $B$2:$B$6, B2, $E$2:$E$6, E2)>1 flags rows 2, 4, 5 and 6, which is exactly why the key matters.
  • Why keep a backup? Remove Duplicates can only be undone straight away with Ctrl+Z; once the file is saved and closed, the deleted rows are gone.

04Power BI basics

0/6 got it

Q15Not marked yetFresherAsked oftenConcept

What is Power Query used for, and how is Merge different from Append?

Say this first~30 sec to say

Power Query is Excel's and Power BI's tool for getting and cleaning data before it loads: fixing types, trimming text, filling blanks, combining files. Every step is recorded and replayed on refresh, so the cleaning is done once. Merge is a join: it adds columns from another table by matching a key, such as Category from Products by Product ID. Append stacks rows from tables with the same columns, such as 2024 sales under 2025 sales.

Could you say it?
Full answer2 min read
MergeAppend
What it doesJoins two tables side by side on a keyStacks one table under another
ResultMore columnsMore rows
NeedsA matching key columnThe same column names
SQL equivalentJOINUNION ALL
Shared-dataset exampleSales merged with Products on Product ID adds Category and Unit CostSales_2024 appended to Sales_2025 gives one Sales table

The steps Power Query writes for you, in its M language:

Merged   = Table.NestedJoin(Sales, {"Product ID"}, Products, {"Product ID"}, "Products", JoinKind.LeftOuter),
Expanded = Table.ExpandTableColumn(Merged, "Products", {"Category", "Unit Cost"}),
Combined = Table.Combine({Sales_2024, Sales_2025})

Join kinds in Merge

Join kindKeepsUseful for
Left outer (the default)Every Sales row, plus matchesAdding product details; P-030 gets null Category
InnerOnly rows that matchAnalysis restricted to known products
Full outerEverything from bothComparing two lists
Left antiSales rows with no matchFinding the P-030 order: a data-quality check
Right antiProducts with no salesFinding products that never sold

Follow-ups

  • Merge in Power Query or a relationship in the model? Usually a relationship (question 17): it keeps tables separate and the model smaller. Merge when you truly need the columns in one table, such as for cleaning.
  • How do you combine 12 monthly files from a folder? Get Data → Folder, then Combine: Power Query appends every file automatically, including new ones dropped into the folder later.
Q16Not marked yetFresherAsked very oftenConcept

What is a star schema? In the shared dataset, which table is the fact table and which is the dimension?

Say this first~30 sec to say

A star schema has one central fact table of events or transactions, holding the numbers to add up plus keys, surrounded by dimension tables that describe those keys: what, who, where and when. In the shared dataset, Sales is the fact table: one row per order, with Quantity and Unit Price and keys such as Product ID. Products is a dimension: one row per product, describing its name, category and cost. A Date table (question 19) would be another dimension.

Could you say it?
Full answer2 min read
              Products (dimension)
              one row per product
                      │ 1
                      │
                      │ *
Date (dimension) 1 ── * Sales (fact) * ── 1 Customers (dimension)
one row per day         one row per order    one row per customer
Fact tableDimension table
HoldsEvents: orders, payments, visitsDescriptions: products, customers, dates
Typical columnsNumbers (Quantity, Unit Price) and keysNames, categories, attributes
RowsMany, growing every dayFewer, changing slowly
In visualsGets summed or countedUsed to slice, filter and group
In the datasetSalesProducts (and a Date table you add)

Region sits in the Sales table here; in a fuller model it would move to a Regions or Customers dimension, which keeps the fact table to keys and numbers.

Star vs snowflake: in a snowflake schema, dimensions are split further: Products would link to a separate Categories table instead of holding the category name itself. That saves a little repetition but adds joins. Power BI works best with a star: fewer relationships, simpler filtering, faster DAX.

Follow-ups

  • Why not one big flat table? Repeating every product's details on every order wastes memory, and it makes some calculations harder, such as counting products that had no sales.
  • What is the grain of the fact table? What one row means: here, one order of one product. Agreeing the grain first prevents double counting.
Q18Not marked yetFresherAsked very oftenConcept

How do Import and DirectQuery modes differ, and when would you choose each?

Say this first~30 sec to say

Import copies the data into Power BI's in-memory engine: visuals are fast and every DAX feature works, but the data is only as fresh as the last refresh, scheduled up to 8 times a day on a Pro licence. DirectQuery leaves the data in the source and sends live queries whenever a visual loads: always current, but slower, it puts load on the source, and some features are limited. Import is the default choice; DirectQuery suits very large or near-real-time data.

Could you say it?
Full answer2 min read
ImportDirectQuery
Where the data livesA compressed copy inside the Power BI modelStays in the source database
SpeedFast: in memoryDepends on the source; every visual sends queries
FreshnessAs of the last refresh (8 a day on Pro, 48 on Premium capacity)Current at the moment of the query
Data sizeLimited by the model size (1 GB per model on Pro)Very large tables are fine
Power Query and DAXEverything availableSome transformations and DAX functions are limited
Load on the sourceOnly during refreshOn every interaction
Choose whenMost reports: daily or hourly data is fineData must be current to the minute, or it's too big to import

Two related modes:

  • Live connection connects a report to an already published Power BI semantic model (or Analysis Services), so many reports share one model; you can't change that model's data or Power Query steps from the report.
  • Composite models mix both: big, fast-changing fact tables in DirectQuery, small dimension tables imported.

If you learned Tableau first: Tableau's Extract is the counterpart of Import, and Tableau's Live connection is the counterpart of DirectQuery, not of Power BI's separate Live connection mode. That's an easy mix-up in interviews.

Follow-ups

  • The DirectQuery report is slow. What would you check? The source's query speed and indexes, the number of visuals on the page (each sends queries), and whether some tables could be imported in a composite model.
  • How does scheduled refresh reach an on-premises database? Through an on-premises data gateway, installed on a machine that can reach the database.
Q19Not marked yet1–3 yrsAsked oftenConcept

Why do you need a separate date table in Power BI, and what does marking it as a date table do?

Say this first~30 sec to say

Time intelligence functions such as TOTALYTD and SAMEPERIODLASTYEAR need a calendar table with one row for every day, with no gaps, covering whole years. The Sales table can't do that job: its dates have gaps and repeats. A date table also gives one place for Year, Month and Financial Year columns. Marking it as a date table tells Power BI to use it for time calculations, checks the dates are valid, and stops Power BI's hidden auto-generated date tables.

Could you say it?
Full answer2 min read

Build one with DAX: Modeling → New table:

DAX
Date =
ADDCOLUMNS (
    CALENDAR ( DATE ( 2024, 1, 1 ), DATE ( 2025, 12, 31 ) ),
    "Year", YEAR ( [Date] ),
    "Month Number", MONTH ( [Date] ),
    "Month", FORMAT ( [Date], "mmm yyyy" ),
    "Year Month", YEAR ( [Date] ) * 100 + MONTH ( [Date] ),
    "Financial Year",
        VAR StartYear = IF ( MONTH ( [Date] ) >= 4, YEAR ( [Date] ), YEAR ( [Date] ) - 1 )
        RETURN "FY " & StartYear & "-" & RIGHT ( StartYear + 1, 2 )
)

That gives one row per day for 2024 and 2025, 731 rows in all, with 15 March 2025 in "FY 2024-25" and 1 April 2025 in "FY 2025-26", matching India's April–March financial year.

Then

  1. Table tools → Mark as date table, choosing the Date column. Power BI checks that it has unique, non-blank, continuous dates.
  2. Relate 'Date'[Date] (one) to Sales[Order Date] (many), with single-direction filtering.
  3. Sort the Month column by Year Month (Column tools → Sort by column), or "Apr 2025" sorts before "Jan 2025".
  4. Use the Date table's columns, not Sales[Order Date], in visuals and slicers.

Auto date/time: by default, Power BI quietly builds a hidden date table for every date column. It's fine for quick prototypes, but it bloats the model and can't be shared across tables; turn it off in Options → Data Load once you have your own.

Follow-ups

  • CALENDAR or CALENDARAUTO? CALENDAR takes explicit start and end dates; CALENDARAUTO scans the model's date columns and covers whole years automatically, which can include stray dates such as birth dates.
  • Why must it cover whole years? Year-to-date and same-period-last-year calculations assume complete years; a calendar starting mid-year gives wrong comparisons.
Q20Not marked yet1–3 yrsAsked sometimesConcept

What is row-level security, and how would you set it up so each regional manager sees only their own region?

Say this first~30 sec to say

Row-level security filters the rows each user can see within the same report. In Power BI Desktop, Modeling → Manage roles: create a role per region with a DAX filter on Sales such as [Region] = "South", and test it with View as. After publishing, add each manager to their role in the semantic model's Security settings. With many managers, one dynamic role using USERPRINCIPALNAME() and a mapping table replaces separate roles.

Could you say it?
Full answer2 min read

Static roles: one per region

RoleTableDAX filter
SouthSales[Region] = "South"
NorthSales[Region] = "North"
EastSales[Region] = "East"
WestSales[Region] = "West"

Because the filter is on Sales, it also limits what the Products and Date tables show through the relationships.

Dynamic: one role for everyone. Add a small RegionManagers table with each manager's email and region ([email protected] → South, and so on), then give a single role this filter on Sales:

DAX
[Region]
    = LOOKUPVALUE (
        RegionManagers[Region],
        RegionManagers[Email], USERPRINCIPALNAME ()
    )

Each user sees only the rows whose region matches their email's entry. A new manager is a new row in the mapping table, not a new role.

Test and publish

  1. In Desktop, Modeling → View as, pick a role (or "Other user" with an email), and check the numbers.
  2. Publish, then in the Power BI service open the semantic model's Security page and add users or groups to the role.

A catch worth mentioning: RLS applies to people who view the report. Workspace members with the Admin, Member or Contributor role can see all the data, so give managers Viewer access or share through an app.

Follow-ups

  • What if a manager covers two regions? Give them two rows in the mapping table and filter with [Region] IN CALCULATETABLE ( VALUES ( RegionManagers[Region] ), RegionManagers[Email] = USERPRINCIPALNAME () ), since LOOKUPVALUE fails when it finds more than one match.
  • RLS vs hiding a page? Hiding pages or visuals isn't security: the data is still in the model. RLS removes the rows from what that user can query.

05DAX

0/6 got it

Q21Not marked yetFresherAsked very oftenConcept

What is the difference between a measure and a calculated column, and when would you use each?

Say this first~30 sec to say

A calculated column is worked out row by row when the data refreshes and stored in the table, like an extra Excel column: use it for values you slice, filter or group by, such as an order-size band. A measure is calculated at query time, in whatever filter context each visual cell gives it, and isn't stored: use it for totals, averages, ratios and anything aggregated. When in doubt, write a measure.

Could you say it?
Full answer2 min read
DAX
-- Calculated column on Sales: one value per row, stored at refresh
Sales Amount = Sales[Quantity] * Sales[Unit Price]

-- Calculated column on Sales: a band to slice by
Size =
SWITCH (
    TRUE (),
    Sales[Sales Amount] >= 10000, "High",
    Sales[Sales Amount] >= 2000, "Medium",
    "Low"
)

-- Measures: recalculated for every cell of every visual
Total Sales = SUM ( Sales[Sales Amount] )
Average Order Value = DIVIDE ( [Total Sales], COUNTROWS ( Sales ) )

On the sample, Total Sales is ₹62,361 and Average Order Value is ₹4,157.40 overall; in a table by region, each row recalculates both for that region alone.

Calculated columnMeasure
CalculatedOnce per row, at refreshPer visual cell, at query time
Stored in the modelYes: uses memoryNo
Evaluated inRow contextFilter context
Can go on slicers, rows and axesYesNo: only in values
Use forBands, labels, keys, per-row valuesTotals, averages, ratios, year-to-date, % of total

The classic mistake: a ratio as a column. A Margin % column computed per row and then summed or averaged in a visual gives a meaningless number. A measure, DIVIDE ( [Total Profit], [Total Sales] ), divides the totals for whatever is filtered, which is what "margin" means.

Follow-ups

  • Why do measures keep the model small? They store only the formula; a column over 50 million rows stores 50 million values.
  • Can a measure be used in a calculated column? Yes, and it's evaluated for the current row through context transition (question 23).
Q22Not marked yetFresherAsked oftenConcept

What does CALCULATE do? Explain it with an example from the shared dataset

Say this first~25 sec to say

CALCULATE evaluates an expression with the filter context changed: it can add filters, replace them or remove them. South Sales = CALCULATE([Total Sales], Sales[Region] = "South") returns the South's total, ₹29,183 on the sample, even in a table row for another region, because the new filter on Region replaces the row's filter. Most useful DAX patterns, from year-to-date to percentage of total, are CALCULATE with different filters.

Could you say it?
Full answer2 min read
DAX
South Sales = CALCULATE ( [Total Sales], Sales[Region] = "South" )

South Sales Kept = CALCULATE ( [Total Sales], KEEPFILTERS ( Sales[Region] = "South" ) )

All Regions Sales = CALCULATE ( [Total Sales], REMOVEFILTERS ( Sales[Region] ) )

South Electronics = CALCULATE ( [Total Sales], Sales[Region] = "South", Products[Category] = "Electronics" )

In a table visual with Region on the rows

RegionTotal SalesSouth SalesSouth Sales KeptAll Regions Sales
East2,50029,183(blank)62,361
North14,49329,183(blank)62,361
South29,18329,18329,18362,361
West16,18529,183(blank)62,361
Total62,36129,18329,18362,361
  • South Sales replaces each row's region filter with "South", so every row shows the South's total.
  • South Sales Kept uses KEEPFILTERS to intersect instead: "South" and "East" have no rows in common, so non-South rows are blank.
  • All Regions Sales removes the region filter entirely: the grand total on every row, which is the denominator for a share of total (question 26).
  • South Electronics applies two filters together: ₹22,293.

Follow-ups

  • What else does CALCULATE do? It performs context transition: inside a row context, it turns the current row into filters (question 23).
  • What's the difference between FILTER and a simple CALCULATE filter? Sales[Region] = "South" is shorthand for a filter on one column; FILTER iterates a table and allows any condition, such as one comparing two columns, but it's slower on large tables.
Q23Not marked yet1–3 yrsAsked oftenConcept

What is the difference between row context and filter context? Give an example of each

Say this first~30 sec to say

Row context means "the current row": it exists in calculated columns and inside iterators such as SUMX, where Sales[Quantity] means this row's quantity. Filter context is the set of filters on the data, coming from slicers, a visual's rows and columns, and CALCULATE; it decides which rows an aggregation like SUM sees. Row context doesn't filter anything by itself. Context transition, done by CALCULATE, turns the current row into a filter context.

Could you say it?
Full answer2 min read

Row context: a calculated column

DAX
Sales Amount = Sales[Quantity] * Sales[Unit Price]

For each row, DAX reads that row's Quantity and Unit Price. No filtering happens; it's simply "this row".

Filter context: a measure in a visual

DAX
Total Sales = SUM ( Sales[Sales Amount] )

In a table by Region, the South cell has the filter Region = "South", so SUM sees only South's eight orders and returns ₹29,183. The same measure in a card with no filters returns ₹62,361.

Context transition: where the two meet. Add two calculated columns to the Products table:

DAX
All Sales = SUM ( Sales[Sales Amount] )

Product Sales = CALCULATE ( SUM ( Sales[Sales Amount] ) )
Product IDAll SalesProduct Sales
P-00162,36111,494
P-00462,36114,994
P-00762,36115,396
P-01262,3614,290
P-01562,36111,087
P-02162,3611,800
P-02362,3612,000

All Sales has a row context (the current product) but no filter context, so SUM sees every sale: ₹62,361 on every row. In Product Sales, CALCULATE converts the current row into a filter, Product ID = this product, which flows through the relationship to Sales. Referencing a measure, Product Sales = [Total Sales], does the same, because every measure is wrapped in an implicit CALCULATE. The seven products add up to ₹61,061; the missing ₹1,300 is the P-030 order, which belongs to no product row.

Follow-ups

  • Which functions create a row context? Calculated columns and iterators: SUMX, AVERAGEX, COUNTX, FILTER, ADDCOLUMNS and other functions ending in X.
  • Why does context transition matter for performance? Inside an iterator over a large table, a measure triggers context transition on every row, which can be slow; iterate over a smaller table, such as VALUES of a column, where possible.
Q24Not marked yetFresherAsked oftenPractical

Write a DAX measure for total sales from Quantity and Unit Price. Why won't SUM do the job on its own?

Say this first~25 sec to say

Total Sales = SUMX(Sales, Sales[Quantity] * Sales[Unit Price]). SUMX is an iterator: it goes through Sales row by row, multiplies that row's quantity by its price, then adds up the results. SUM takes a single column, so it can't multiply first; and multiplying two SUMs, total quantity times total price, is meaningless. On the sample, that gives ₹17,86,779 instead of the correct ₹62,361.

Could you say it?
Full answer2 min read
DAX
Total Sales = SUMX ( Sales, Sales[Quantity] * Sales[Unit Price] )

What goes wrong without an iterator

DAX
Wrong Sales = SUM ( Sales[Quantity] ) * SUM ( Sales[Unit Price] )
CalculationResult on the sample
SUMX: multiply each row, then add4 × 399 + 2 × 1,799 + … + 5 × 120₹62,361
SUM × SUM: add each column, then multiply81 units × ₹22,059₹17,86,779

Adding up the unit prices of different products means nothing, so the second number is nonsense, not just "a bit off".

SUMX or a calculated column? Both work: a Sales Amount column plus SUM ( Sales[Sales Amount] ) gives the same ₹62,361. SUMX avoids storing an extra column; the column is handy if you also want to filter or band by order value (question 21).

Other iterators follow the same pattern: AVERAGEX, MINX, MAXX and COUNTX evaluate an expression per row, then aggregate. For example, the profit including cost from Products:

DAX
Total Profit = SUMX ( Sales, Sales[Quantity] * ( Sales[Unit Price] - RELATED ( Products[Unit Cost] ) ) )

RELATED fetches the matching Products row's cost through the relationship. On the sample this gives ₹18,196, but ₹1,300 of that is the P-030 order: with no matching product, RELATED returns blank, so its whole price counts as profit. Excluding it gives ₹16,896, the figure used in question 29; a careful measure would exclude or flag such rows.

Follow-ups

  • Is SUMX slow? Not for simple row expressions: the engine optimises them well. It becomes costly when the expression calls measures, which triggers context transition on every row.
  • AVERAGE vs AVERAGEX? AVERAGE averages one column; AVERAGEX averages an expression, such as AVERAGEX ( Sales, Sales[Quantity] * Sales[Unit Price] ), the average order value.
Q25Not marked yet1–3 yrsAsked oftenPractical

Write a DAX measure for year-to-date sales, so each month in a chart shows the running total for its year

Say this first~25 sec to say

With the date table from question 19 marked and related to Sales: Sales YTD = TOTALYTD([Total Sales], 'Date'[Date]). In a chart by month, each month shows the running total since 1 January of its year: ₹7,597, ₹9,696, ₹36,782 and ₹60,765 for January to April 2025. For India's April–March financial year, pass the year-end date as well, TOTALYTD([Total Sales], 'Date'[Date], "3/31"), and the total restarts every April.

Could you say it?
Full answer2 min read
DAX
Sales YTD = TOTALYTD ( [Total Sales], 'Date'[Date] )

Sales FYTD = TOTALYTD ( [Total Sales], 'Date'[Date], "3/31" )

In a table by month

MonthTotal SalesSales YTD (calendar year)Sales FYTD (April–March)
Jan 20257,5977,5977,597
Feb 20252,0999,6969,696
Mar 202527,08636,78236,782
Apr 202523,98360,76523,983

The financial year 2024-25 started in April 2024, but the sample has no orders from April to December 2024, so the two running totals agree until March. In April 2025 the financial year restarts, and FYTD drops back to April's own sales.

The year-end date is a text date in the model's locale. "3/31" is read as month/day on US settings; on Indian or British settings it may need to be "31/3". Check the result for April, which must restart.

The same thing written with CALCULATE, which is easier to extend:

DAX
Sales FYTD = CALCULATE ( [Total Sales], DATESYTD ( 'Date'[Date], "3/31" ) )

Why the date table matters: TOTALYTD needs a continuous calendar to work out "from the start of the year to the last date in this cell". With Sales[Order Date] instead, months without orders break the logic.

Follow-ups

  • How would you compare with the same period last year? Sales PY = CALCULATE ( [Total Sales], SAMEPERIODLASTYEAR ( 'Date'[Date] ) ), then a growth measure, DIVIDE ( [Total Sales] - [Sales PY], [Sales PY] ).
  • Quarter-to-date and month-to-date? TOTALQTD and TOTALMTD work the same way.
Q26Not marked yet1–3 yrsAsked oftenPractical

Write a measure that shows each category's percentage of total sales in a table visual

Say this first~30 sec to say

Divide each category's sales by the total with the category filter removed: Category Share = DIVIDE([Total Sales], CALCULATE([Total Sales], REMOVEFILTERS(Products[Category]))), formatted as a percentage. In each row, the numerator sees only that category; the denominator ignores it and sees all sales. On the sample: Electronics 67.2%, Home & Kitchen 24.7%, Stationery 6.1%, and the unmatched P-030 order 2.1% under (Blank). DIVIDE returns blank, not an error, if the total is zero.

Could you say it?
Full answer2 min read
DAX
Category Share =
DIVIDE (
    [Total Sales],
    CALCULATE ( [Total Sales], REMOVEFILTERS ( Products[Category] ) )
)
CategoryTotal SalesCategory Share
Electronics41,88467.2%
Home & Kitchen15,37724.7%
Stationery3,8006.1%
(Blank)1,3002.1%
Total62,361100.0%

Which "remove filters" to use

DenominatorRespects slicers?Use when
REMOVEFILTERS ( Products[Category] )Yes, except on CategoryShare within whatever else is filtered, such as one region
ALL ( Products )Ignores every Products filterShare of all products, even if a Product slicer is set
ALLSELECTED ( Products[Category] )Keeps the slicer's selectionShares that add up to 100% of only the categories the user selected

With a Region slicer set to South, the first version shows each category's share of the South's sales, which is usually what a regional manager expects.

In Tableau, this is a quick table calculation, Percent of Total, and the classic slip is its Compute Using setting: computed across instead of down the table, each cell becomes a share of the wrong total.

Follow-ups

  • Why DIVIDE instead of /? DIVIDE handles division by zero by returning blank (or a value you choose), so visuals don't show errors.
  • How would you show the share of the parent category in a product-level matrix? Remove the filter on Product Name only: CALCULATE ( [Total Sales], REMOVEFILTERS ( Products[Product Name] ) ) as the denominator.

06Data visualisation

0/3 got it

Q27Not marked yetFresherAsked very oftenConcept

How do you choose the right chart for a question? When is a pie chart a poor choice?

Say this first~30 sec to say

I start from the question: comparing categories, a sorted bar chart; change over time, a line chart; part of a whole, a stacked bar, or a pie with two or three slices; distribution, a histogram or box plot; relationship between two numbers, a scatter plot. Pies fail with many or similar-sized slices, for comparisons across groups or over time, or when the parts don't form a whole: people compare lengths far better than angles.

Could you say it?
Full answer2 min read
The questionChartExample on the dataset
Which is biggest? (comparison)Bar chart, sorted, horizontal for long labelsSales by product
How did it change? (trend)Line chart; columns for a few periodsMonthly sales, 2024 vs 2025
What is it made of? (part to whole)Stacked bar or 100% bar; a pie only for 2–3 partsCategory share per month (question 12)
How is it spread? (distribution)Histogram, box plotOrder values (question 32)
Do two things move together? (relationship)Scatter plotDiscount vs quantity per order
What's the exact number?Table, or a KPI card with a comparisonThis month's sales vs target
Where?Map, only if location itself mattersSales by state

When a pie chart fails

  • Many slices: past four or five, the small ones are unreadable and need a legend lookup.
  • Similar sizes: 24% and 27% look identical as angles but are easy to compare as bars.
  • Comparisons across pies: "did Electronics' share grow from 2024 to 2025?" is nearly impossible to read from two pies; use a 100% stacked bar or a line.
  • Parts that aren't a whole: survey questions where people could pick several answers add up to more than 100%.

General rules that score points: start bar axes at zero; sort bars by value unless the order means something (months); one message per chart, stated in its title ("Electronics drove March's growth"); use colour to highlight, not to decorate.

Follow-ups

  • Is a donut chart better than a pie? It's the same idea with a hole; it has the same weaknesses, though the centre can hold a total.
  • When would you use a dual-axis chart? Rarely, and carefully: two scales can suggest relationships that aren't there. Two aligned charts are usually clearer.
Q28Not marked yetFresherAsked oftenCase

The South region's sales head wants a one-page dashboard built on the shared dataset. What would you put on it, and how would you lay it out?

Say this first~30 sec to say

I'd first ask what decisions it should support and how often it's checked. Then a layout read top to bottom: headline KPIs across the top: sales, change versus last year and target, orders, average order value and margin. Below that, the trend: monthly sales against last year. Then breakdowns by category and top products, so problems can be traced. A few filters: month and category. Everything is South only, through a filter or row-level security.

Could you say it?
Full answer2 min read

Questions to ask the sales head first

  • What decisions will this support: stock, promotions, staffing?
  • Which numbers do you report upwards, and against what target?
  • How often will you look at it, and on what device?

A layout, read like a page

┌──────────────────────────────────────────────────────────────────┐
│ South region sales                          [Month ▾] [Category ▾] │
├────────────────┬────────────────┬───────────────┬────────────────┤
│ Sales          │ vs last year   │ Orders        │ Avg order value│
│ ₹38.2 lakh     │ ▲ 6%           │ 1,040         │ ₹3,673         │
│ 92% of target  │                │               │ Margin 31%     │
├────────────────┴────────────────┴───────────────┴────────────────┤
│ Monthly sales: this year vs last year (line chart)               │
├────────────────────────────────┬─────────────────────────────────┤
│ Sales and margin by category   │ Top 10 products (bar chart)     │
│ (bar chart)                    │                                 │
├────────────────────────────────┴─────────────────────────────────┤
│ Repeat-customer rate by month (line chart)                       │
└──────────────────────────────────────────────────────────────────┘

The figures are placeholders for the full file. Each KPI card shows a comparison, because "₹38.2 lakh" alone doesn't say whether that's good.

Design choiceWhy
KPIs top leftPeople read from the top left; the most important numbers go there
Comparisons on every KPIAgainst last year and target, so the number has meaning
Trend before breakdownsFirst "how are we doing?", then "why?"
Margin next to salesStops the page rewarding unprofitable sales (question 29)
Two or three filters onlyToo many filters make a dashboard a tool for analysts, not managers
Consistent coloursSouth always one colour, last year always grey

Follow-ups

  • How would you check it works for the sales head? Sit with them for ten minutes and watch them use it: which questions they still ask you shows what's missing.
  • What would you leave off? Anything they can't act on, and any chart that repeats another.
Q29Not marked yet1–3 yrsAsked sometimesCase

Your analysis shows the best-selling category has the lowest profit margin. How would you present this to a sales head who has been pushing that category?

Say this first~30 sec to say

I'd lead with the finding in business terms, not blame: "Electronics brings two-thirds of our sales but under half our profit." I'd show one clear chart, share of sales next to share of profit by category, then the implication and a recommendation that keeps what's good about Electronics, such as cutting discount depth or bundling high-margin accessories. I'd prepare for pushback with numbers, and treat the sales head as a partner in fixing it.

Could you say it?
Full answer2 min read

The numbers behind it, from the sample's known products

CategorySales (₹)Profit (₹)MarginShare of salesShare of profit
Electronics41,8847,68418.3%68.6%45.5%
Home & Kitchen15,3777,03745.8%25.2%41.6%
Stationery3,8002,17557.2%6.2%12.9%

A structure for the conversation

  1. Headline: "Electronics is our biggest seller: 69% of sales. But at an 18% margin, it brings 45% of profit."
  2. Evidence: one chart, two bars per category: share of sales and share of profit. The gap is the story.
  3. What it means: each ₹100 of Electronics earns ₹18; each ₹100 of Home & Kitchen earns ₹46.
  4. Recommendation: keep Electronics as the traffic driver, but reduce discount depth, bundle accessories with better margins, and pay incentives on profit, not revenue.
  5. Next step: a one-month test of the new discount level in one region.

Prepare for pushback

They might sayBe ready with
"Electronics brings in new customers"Check first orders: if new customers start with Electronics and come back for other categories, count their later profit too
"Margins are low everywhere in Electronics"Compare with industry margins or competitors' prices, if available
"Your data is wrong"Show the reconciliation to Finance's numbers (question 5)

The general form, "How do you explain findings to non-technical people?", has the same answer: start with the conclusion, use their words (₹, margin, customers), one message per chart, and end with what to do.

Follow-ups

  • What if they still disagree? Propose a small test with an agreed success measure, and let the results decide.
  • Would you present this in a group meeting first? No: show it to the sales head privately first, so they aren't surprised in front of others and can help shape the recommendation.

07Descriptive statistics

0/3 got it

Q30Not marked yetFresherAsked very oftenConcept

Mean, median and mode: when does the median describe your data better than the mean?

Say this first~30 sec to say

The mean is the average, the median is the middle value once sorted, and the mode is the most common value. The median describes data better when it's skewed or has outliers: one extreme value drags the mean but barely moves the median. In the sample, the 15 orders average ₹4,157, but the median order is ₹2,694, because a few large orders pull the mean up. The mode suits categories: the most common region is South.

Could you say it?
Full answer1 min read
Excel
=AVERAGE(H2:H16)
=MEDIAN(H2:H16)
=COUNTIF(D2:D16, "South")

These return 4,157.4, 2,694 and 8: South has 8 of the 15 orders, more than any other region. MODE.SNGL(H2:H16) returns #N/A, since no two orders have the same value; for continuous numbers, a mode is rarely useful.

The classic salary example: nine employees earn between ₹6 lakh and ₹9 lakh a year, and the founder earns ₹1.2 crore. The mean salary is ₹18.75 lakh, more than anyone except the founder earns; the median, ₹7.75 lakh, describes a typical employee.

MeasureBest forWeakness
MeanSymmetric data without extremes; when totals matter (mean × count = total)Pulled towards outliers
MedianSkewed data: salaries, house prices, order values, delivery timesIgnores how extreme the extremes are
ModeCategories: most common region, size or payment methodMay not exist, or there may be several

Follow-ups

  • Which should a "typical order value" KPI use? The median, or report both: the mean for revenue planning, the median for what a typical customer spends.
  • When are the mean and median equal? In symmetric distributions, such as the normal distribution (question 32).
Q31Not marked yetFresherAsked oftenConcept

What do variance and standard deviation tell you, and why is standard deviation the one usually reported?

Say this first~30 sec to say

Both measure spread: how far values typically sit from the mean. Variance is the average squared distance from the mean; standard deviation is its square root. Standard deviation is the one reported because it's in the same units as the data: "±24 orders a day" means something, "562.5 orders squared" doesn't. Two stores can both average 50 orders a day, one steady (SD 1.6) and one swinging wildly (SD 23.7).

Could you say it?
Full answer2 min read

Two stores, five days each

Daily ordersMeanVariance (VAR.S)Standard deviation (STDEV.S)
Store A48, 50, 52, 49, 51502.51.58
Store B20, 80, 35, 65, 5050562.523.72

Same average, very different businesses: Store A needs the same staff every day; Store B needs flexible staffing and more safety stock.

Store A by hand: distances from 50 are -2, 0, 2, -1 and 1; squared, 4, 0, 4, 1 and 1, which add up to 10. Divided by n − 1 = 4, the variance is 2.5; its square root, the standard deviation, is 1.58.

Excel
=VAR.S(B2:B6)
=STDEV.S(B2:B6)
=STDEV.P(B2:B6)

For Store B, these return 562.5, 23.72 and 21.21.

Sample or population? STDEV.S divides by n − 1 and is right when your data is a sample of a bigger population, as it almost always is: five days stand in for all days. STDEV.P divides by n and assumes you have every value. A sample's values sit closer to their own mean than to the true mean, so dividing by n would understate the spread.

Follow-ups

  • How do you compare spread between things on different scales? The coefficient of variation, standard deviation ÷ mean: Store B's is 23.72 ÷ 50 ≈ 47%, Store A's about 3%.
  • What does a standard deviation of zero mean? Every value is identical.
Q32Not marked yetFresherAsked oftenConcept

What is a normal distribution, and what does it mean when order values are right-skewed?

Say this first~30 sec to say

A normal distribution is the symmetric bell curve: the mean, median and mode coincide, and about 68% of values lie within one standard deviation of the mean, 95% within two and 99.7% within three. Order values are usually right-skewed: most orders are small, with a long tail of large ones, so the mean sits above the median. That means reporting the median and percentiles, and not applying normal-distribution rules blindly.

Could you say it?
Full answer2 min read

The 68–95–99.7 rule, on delivery times with a mean of 30 minutes and a standard deviation of 5:

RangeShare of deliveries
25 to 35 minutes (±1 SD)About 68%
20 to 40 minutes (±2 SD)About 95%
15 to 45 minutes (±3 SD)About 99.7%
Excel
=NORM.DIST(35, 30, 5, TRUE) - NORM.DIST(25, 30, 5, TRUE)

returns 0.683, the share between 25 and 35 minutes, if delivery times really are normal.

The sample's order values are right-skewed:

₹0–2k     ██████  6
₹2–4k     ████    4
₹4–6k     ██      2
₹6–8k             0
₹8–10k    █       1
₹10–12k   ██      2

Most orders sit on the left, with a tail stretching right. The signs: the mean (₹4,157) is above the median (₹2,694), and =SKEW(H2:H16) returns 1.08; positive values mean a right skew, negative a left skew.

What right skew changes in practice

  • Report the median and percentiles, not just the mean: =PERCENTILE.INC(H2:H16, 0.9) gives ₹10,111, so 90% of orders are below about ₹10,100.
  • "Mean ± 2 SD" ranges mislead: for these orders, the lower end would be negative.
  • Charts often read better on a log scale, and some statistical tests assume normality, so check before using them.

Follow-ups

  • What would left skew look like? A long tail on the left: exam scores on an easy test, where most students score high and a few score very low. The mean then sits below the median.
  • Why does the normal distribution matter so much? Many measurements are roughly normal, and averages of large samples are approximately normal even when the data isn't, which is what makes p-values for A/B tests work.

08Inferential statistics

0/3 got it

Q33Not marked yetFresherAsked very oftenConcept

What is a p-value, and how do you use it to decide whether to reject the null hypothesis?

Say this first~30 sec to say

A p-value is the probability of seeing a result at least as extreme as yours, if the null hypothesis were true; the null usually says "no effect". Before testing, I set a significance level, usually 0.05. If p is below it, I reject the null: the result is unlikely to be chance alone. Example: a new checkout converts 4.6% against 4.0%, with 10,000 users each; p is about 0.036, below 0.05, so the difference is statistically significant.

Could you say it?
Full answer2 min read

The hypotheses

  • Null (H₀): the new checkout converts at the same rate as the old one.
  • Alternative (H₁): the conversion rates differ.

The numbers: old checkout, 400 orders from 10,000 users; new checkout, 460 from 10,000. With those in B1, B2, C1 and C2:

CellFormulaResult
E1: pooled rate=(B1+C1)/(B2+C2)0.043
E2: standard error=SQRT(E1*(1-E1)*(1/B2+1/C2))0.00287
E3: z-score=(C1/C2-B1/B2)/E22.09
E4: two-sided p-value=2*(1-NORM.S.DIST(ABS(E3),TRUE))0.0365

In words: if the new checkout truly made no difference, a gap of 0.6 percentage points or more would turn up by chance only about 3.6% of the time. That's below 5%, so we reject the null.

What a p-value is not

Common misreadingWhy it's wrong
"There's a 3.6% chance the null is true"The p-value assumes the null is true; it can't give its probability
"A small p means a big effect"With huge samples, tiny, useless differences become significant; check the size of the effect too
"p > 0.05 proves there's no effect"It means the test didn't find evidence; the effect may be real but the sample too small
"Stop the test as soon as p dips below 0.05"Checking repeatedly and stopping early inflates false positives (question 36)

Follow-ups

  • What does a 95% confidence interval add? A range of plausible sizes for the effect, here roughly 0.04 to 1.16 percentage points: significant, but possibly small.
  • Why 0.05? It's a convention balancing false positives and false negatives (question 34); high-stakes decisions often use 0.01.
Q34Not marked yetFresherAsked oftenConcept

What are Type I and Type II errors? Give a business example of each and say which would cost more

Say this first~30 sec to say

A Type I error is a false positive: rejecting a null hypothesis that's actually true, like concluding a new checkout works when it doesn't. A Type II error is a false negative: missing a real effect, like scrapping a checkout that did work. Their probabilities are alpha, the significance level, usually 5%, and beta; power, 1 − beta, is usually set at 80%. Which costs more depends on the decision, so I'd name the costs of each.

Could you say it?
Full answer2 min read
The truth: no effectThe truth: a real effect
Test says: effectType I error (false positive), probability αCorrect
Test says: no effectCorrectType II error (false negative), probability β

Business examples, and which costs more

SituationType I errorType II errorUsually costlier
A/B test of a new checkoutLaunch a change that doesn't help, and pay to build and maintain itDrop a change that would have raised salesDepends: Type I if the change is expensive to roll out, Type II if the gain was large
Fraud detection (null: "this payment is genuine")Block a genuine customer's payment: an annoyed customer, a lost saleLet a fraudulent payment through: direct financial lossType II for a bank, which is why fraud systems accept some false alarms
Quality check on a batch (null: "the batch is fine")Reject a good batch: wasted stockShip a faulty batch: returns, refunds, reputationUsually Type II

The trade-off: for a fixed sample size, lowering α to cut false positives raises β, so more real effects are missed. The way to reduce both is a bigger sample, which is why A/B tests calculate sample size first (question 36).

Follow-ups

  • What is statistical power? The probability of detecting an effect that really exists, 1 − β. Low power means real improvements often go unnoticed.
  • Which error does a 0.01 significance level guard against? Type I: fewer false positives, at the cost of needing more data to keep the same power.
Q35Not marked yetFresherAsked very oftenConcept

How is correlation different from causation? Give an example where a strong correlation would mislead a business

Say this first~30 sec to say

Correlation means two things move together; causation means one actually changes the other. A strong correlation can come from a third factor driving both (a confounder), from reverse causality, or from chance. For example, monthly ad spend and sales correlate at 0.998 below, largely because both rise in the festive season, not because ads caused all those sales. To show cause, run a controlled experiment, such as an A/B test or a holdout region.

Could you say it?
Full answer2 min read
MonthAd spend (₹ lakh)Sales (₹ lakh)
Jul438
Aug540
Sep644
Oct1271
Nov1480
Dec647
Excel
=CORREL(B2:B7, C2:C7)

returns 0.998, an almost perfect correlation. But October and November are Dussehra and Diwali months: the company spends more on ads because it expects higher demand, and demand would have risen anyway. Reading the correlation as "every ₹1 lakh of ads brings ₹4 lakh of sales" would badly overestimate what ads achieve.

Three ways a correlation misleads

TrapExampleWhat's really going on
ConfounderAd spend and sales both peak in OctoberThe festive season drives both
Reverse causalityCustomers who get coupons spend moreBig spenders are the ones sent coupons
ChanceOut of 200 metrics compared, a few correlate stronglyWith enough comparisons, some patterns appear by accident

How to test for cause

  • A/B test: randomly show the ad to half the users; random assignment removes confounders.
  • Holdout region: pause ads in a comparable city for a few weeks and compare the change with cities that kept them.
  • Before and after, against a control: compare the change in the test group with the change in a similar group over the same period (difference-in-differences).

Follow-ups

  • Does a correlation near zero mean no relationship? No: correlation measures only straight-line relationships. A U-shaped pattern can have a correlation of zero.
  • What correlation counts as strong? Roughly, above 0.7 or below -0.7, but strength says nothing about cause.

09A/B testing and business metrics

0/5 got it

Q36Not marked yet1–3 yrsAsked oftenCase

The product team wants to test a new one-page checkout. How would you design the A/B test, and what would you check before declaring a winner?

Say this first~30 sec to say

I'd write a hypothesis and pick one primary metric, checkout conversion, plus guardrails such as payment errors, refunds and average order value. Users are randomly split 50/50, by user rather than by visit. I'd fix the sample size in advance, about 25,500 users per group to detect 4.0% rising to 4.5%, and run whole weeks. Before declaring a winner, I'd check the split really was 50/50, the guardrails held, p is below 0.05, and the lift is big enough to matter.

Could you say it?
Full answer2 min read

The design

ElementChoice
HypothesisThe one-page checkout raises the share of checkout visitors who complete an order
Primary metricCheckout conversion rate, 4.0% today
Guardrail metricsPayment failure rate, average order value, refund rate, page load time
Unit of randomisationThe user, so one person always sees the same version
Split50% old checkout (control), 50% new (variant)
Smallest effect worth detecting4.0% → 4.5%
Significance and power5% and 80%

Sample size. For 4.0% versus 4.5%, at 5% significance and 80% power:

Excel
=(NORM.S.INV(0.975)+NORM.S.INV(0.8))^2*(0.04*0.96+0.045*0.955)/(0.045-0.04)^2

That gives 25,548.1, which rounds up to 25,549 users per group, 51,098 in total; sample sizes always round up. With 6,000 checkout visitors a day, that's 8.5 days, so I'd run two full weeks: whole weeks average out weekday and weekend behaviour, and the duration is fixed before starting.

Before declaring a winner

  1. Sample ratio check: a 50/50 split of 52,000 users should give about 26,000 each. A result of 26,800 against 25,200 is very unlikely by chance (p ≈ 0.000000000002), which means the assignment or tracking is broken and the results can't be trusted.
  2. Full duration, no peeking: decide only at the planned end, not the first day p dips below 0.05.
  3. Significance and size: p below 0.05, and a lift large enough to be worth building and maintaining.
  4. Guardrails: conversion up but payment failures also up isn't a win.
  5. Sense-check segments, such as new vs returning users or Android vs iOS, without slicing until something looks significant.
  6. After launch, keep watching: novelty can fade.

Follow-ups

  • Why randomise by user, not by session? A user who sees both checkouts on different visits contaminates both groups, and their behaviour is counted twice.
  • What if the test is inconclusive? Report that the test couldn't detect a lift of 0.5 points or more; the change may still help a little. Decide on cost and design grounds, or run a bigger test.
Q37Not marked yet1–3 yrsAsked sometimesCase

The founder believes most customers never order a second time. Using the shared dataset, how would you check this and track it month by month?

Say this first~30 sec to say

First I'd test the claim directly: the share of customers with two or more orders. In the sample, 5 of 8 customers ordered again, so it doesn't hold there. To track it monthly, I'd build a cohort table: group customers by the month of their first order, then show what share ordered again in each later month. Reading down a column shows whether newer customers come back more or less often. In Excel, MINIFS finds each customer's first order date.

Could you say it?
Full answer3 min read

Step 1: the headline number. On a Customers sheet, with the eight customer IDs in A2:A9 (from =UNIQUE(Sales!C2:C16)):

Excel
=COUNTIF(Sales!$C$2:$C$16, A2)
=COUNTIF(B2:B9, ">=2")/COUNTA(A2:A9)

The first, in B2 and filled down, counts each customer's orders; the second gives the repeat rate: 62.5%, or 5 of 8. In this sample, the founder's belief is wrong, though eight customers prove little; the full file decides.

Step 2: label every order with its cohort. Three helper columns on the Sales sheet, filled down:

Excel
=MINIFS($B$2:$B$16, $C$2:$C$16, C2)
=TEXT(Q2, "yyyy-mm")
=(YEAR(B2)-YEAR(Q2))*12 + MONTH(B2)-MONTH(Q2)

Column Q is the customer's first order date, R their cohort month, and S the months since their first order. For SO-1003, customer C-0457's second order, these give 14-Mar-2024, "2024-03" and 10.

Step 3: pivot it. Cohort (R) in Rows, Months since (S) in Columns, and Customer ID in Values as a Distinct Count, which needs "Add this data to the Data Model" ticked when creating the pivot. Divide each row by its month-0 count to get percentages.

What the table looks like on the full file (illustrative numbers):

First-order monthNew customersOrdered again in month 1Month 2Month 3
Jan 20251,20022%15%12%
Feb 20251,05020%14%11%
Mar 20251,40018%12%
Apr 20251,30015%

Reading down the "month 1" column, newer cohorts return less often, falling from 22% to 15%. The founder is right to worry, about the trend if not the claim, and the next step is to ask what changed for newer customers: their acquisition channel, first product or delivery experience.

Define "ordered again" before counting: a second order in a later calendar month, or within 30 days of the first? Customer C-0520 ordered twice in March 2025; under the first definition, that isn't a repeat in a later month.

Follow-ups

  • What's the difference between retention and churn? Retention is the share who come back; churn is the share who don't. For one-off purchases, "repeat rate" is the clearer term.
  • How would you do this in Power BI or SQL? The same three steps: first order date per customer, months since it for every order, then a distinct count of customers by cohort and month.
Q38Not marked yetFresherAsked very oftenCase

Last month's sales came in 20% below the month before. How would you find the cause?

Say this first~30 sec to say

First, check the data: is the month complete, or did a feed or definition change? Then context: was the previous month boosted by a sale or festival, and how did the same months compare last year? Then decompose: sales = orders × average order value, and orders = visitors × conversion, to see which part fell. Finally segment by region, category, channel and customer type until the drop is located, and only then ask why.

Could you say it?
Full answer2 min read

Step 1: rule out a data problem. Compare daily totals with the source system, look for a day with zero sales (a failed load), and confirm no filter or definition changed.

Step 2: context. August had an Independence Day sale; last year, September was also about 8% below August. So part of the drop is normal, but not 20%.

Step 3: decompose the metric

AugustSeptemberChange
Website and app visitors25,00024,000-4%
Conversion rate5.0%4.17%-17%
Orders1,2501,000-20%
Average order value₹4,000₹4,0000%
Sales₹50 lakh₹40 lakh-20%

Traffic barely moved and order values held steady: conversion fell. People came, but fewer bought.

Step 4: segment until the drop is located

RegionAugust ordersSeptember ordersChangeShare of the drop
North300295-52%
South400220-18072%
East250245-52%
West300240-6024%
Total1,2501,000-250100%

The South explains nearly three-quarters of the drop. Splitting the South by platform shows Android app orders falling sharply from 9 September, the day an app update shipped; payment error logs then confirm UPI payments were failing on that version. Now there's a cause to fix.

A checklist of usual suspects: data and tracking problems, seasonality and festival dates, price changes, stock-outs of best-sellers, marketing campaigns ending, website or app errors, delivery problems, competitor sales.

Follow-ups

  • What would you present? The cause, the evidence (conversion fell in South Android after the 9 September update), the estimated revenue lost, and the fix, in that order.
  • What if no single segment explains it? Then the cause is broad, such as seasonality, a price change or a market-wide slowdown, and the comparison with last year and with competitors matters most.
Q39Not marked yet1–3 yrsAsked oftenCase

The company ran a 10-day Diwali sale. How would you tell whether it actually worked?

Say this first~30 sec to say

I'd compare against what would have happened without the sale: a baseline from similar normal days and the same period last year, lined up by Diwali's date. Then I'd measure incremental revenue, sale minus baseline, and profit after discounts, not just revenue. I'd check the dip after the sale, since some customers simply bought earlier, and whether the sale brought new customers who come back. "Worked" means more profit or valuable new customers, not just a revenue spike.

Could you say it?
Full answer2 min read

The numbers (₹ lakh)

PeriodRevenueBaseline revenueGross marginProfitBaseline profit
10 sale days1408018% (after discounts)25.224.0
10 days after608030%18.024.0
20 days in all20016043.248.0
  • Revenue view: the sale added ₹60 lakh, but the following days fell ₹20 lakh short of normal as customers who had bought early didn't return yet. Net incremental revenue: +₹40 lakh.
  • Profit view: discounts cut the margin to 18%, so the sale days earned only ₹1.2 lakh more profit than normal, and the dip afterwards cost ₹6 lakh. Net incremental profit: -₹4.8 lakh.

So did it work? Revenue grew, profit fell. The sale pays off only if its new customers bring more than ₹4.8 lakh of future profit: with 9,000 new customers, about ₹53 each. That's the question to answer next, using their repeat rate (question 37).

How to set the baseline fairly

  • Use comparable normal days, adjusted for the usual festive lift, not the quietest weeks of the year.
  • Compare with last year's sale lined up by days from Diwali, since Diwali moves between October and November.
  • If possible, hold out a region or a customer group from the sale as a control.

Other checks: stock-outs during the sale (lost sales), returns and cancellations after it, payment and delivery failures, and whether discounts went to customers who would have paid full price anyway.

Follow-ups

  • What's cannibalisation? Sale sales that would have happened anyway, at full price, now earning less; the post-sale dip is one sign of it.
  • How would you design next year's sale better? Test discount levels in different regions, target discounts at new or lapsed customers, and track profit, not revenue, as the success metric.
Q40Not marked yetFresherAsked oftenCase

Guesstimate: how many food-delivery orders are placed in Bengaluru on a typical day?

Say this first~30 sec to say

I'd state my assumptions and build up. Bengaluru has about 1.4 crore people; say 30%, 42 lakh, order food online. I'd split them: heavy users, 20%, order four times a week; regular users, 30%, once a week; occasional users, 50%, twice a month. That's about 57 lakh orders a week, roughly 8 lakh a day. Then I'd cross-check from another direction: 50,000 active delivery riders doing 16 deliveries each also gives about 8 lakh.

Could you say it?
Full answer2 min read

Clarify first: all platforms or one? Food only, or groceries too? A typical weekday or weekend? Here: all food-delivery apps, an average day.

Top-down, from people

StepAssumptionResult
PopulationAbout 1.4 crore people1.4 crore
Order food online30%: mostly working-age smartphone users42 lakh users
Heavy users20% of users, 4 orders a week33.6 lakh orders a week
Regular users30% of users, 1 order a week12.6 lakh orders a week
Occasional users50% of users, 2 a month (about 0.5 a week)10.5 lakh orders a week
Total56.7 lakh a week ≈ 8.1 lakh a day

Bottom-up, from supply: about 50,000 delivery riders active on a typical day, each completing about 16 deliveries, gives 8 lakh orders a day. Two independent routes landing close together makes the estimate more believable.

What interviewers score

  • Structure: a clear chain from population to orders, written down as you go.
  • Stated assumptions, with a reason for each, even if the numbers are rough.
  • A sanity check: about 0.19 orders per user per day, or 1.35 a week, sounds plausible for a city like Bengaluru.
  • Sensitivity: say which assumption matters most. Here, the share and frequency of heavy users: if heavy users order only twice a week, the total falls to about 5.7 lakh a day.

Follow-ups

  • How would you get a better number? Published order volumes from food-delivery companies' results, scaled by Bengaluru's share of their orders, or app-download and usage data.
  • Would weekends differ? Yes: weekend dinner orders run higher, so a "typical day" is an average of a busier weekend and quieter weekdays.

Last step

Write these from memory

Before a data analyst interview, make sure you can do each of these on a blank sheet without help:

  • Q1
  • Q3
  • Q4
  • Q6
  • Q9
  • Q10
  • Q11
  • Q12
  • Q13
  • Q14
  • Q19
  • Q24
  • Q25
  • Q26
  • Q33
  • Q36
  • Q40

0 of 17 done

Written and checked by CareersAt.Tech. Every Excel formula on this page was evaluated on the sample data with a spreadsheet formula engine (HyperFormula), and every number was cross-checked in Python with pandas and SciPy. Where that engine differs from Excel (COUNTBLANK and empty text, in question 8), the answer follows Microsoft's documentation. The DAX measures were checked by computing the same results in pandas; they weren't run in Power BI. Updated 27 Oct 2026.