Skip to content

Top 50 Most Asked Data Analytics Interview Questions

The questions that appear most often across company-wise sets — master these first.

Why start here

We count how often each question appears across the 155 company-wise Data Analytics practice sets on this site and show the 50 most common. They are the safest questions to master first.

Solved — top 50Start 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

Organic search traffic fell 40% overnight. How do you investigate?

Web & Marketing AnalyticsIn 38 company setsMedium
Save to ▾
Show answer
First check whether it is a tracking problem: did the analytics tag break on some templates, did consent settings change, does server log or backend order data show the same fall? If the drop is real, check the search console for impressions and rankings, recent site releases such as changed URLs, missing redirects, noindex tags or robots.txt changes, and whether a search algorithm update or seasonal pattern matches. Then break the drop down by page group.
02

A stakeholder wants 20 more visuals added to an already crowded dashboard page. How do you respond?

Dashboards and KPIsIn 36 company setsMedium
Save to ▾
Show answer
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.
03

Write a DAX measure for cumulative sales from the start of the data to the selected date.

Power BIIn 34 company setsMedium
Save to ▾
Show answer
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])
04

Many reporting queries in your team use SELECT DISTINCT to remove duplicate rows. What is the risk?

SQLIn 34 company setsMedium
Save to ▾
Show answer
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.
05

You must present to the sales team that they missed their quarterly target by 18%. How do you handle it?

Data StorytellingIn 33 company setsMedium
Save to ▾
Show answer
Lead with the fact clearly, then show where the gap came from, such as which regions, products or deal stages, so it becomes actionable rather than a blame session. Separate controllable causes like lower conversion from uncontrollable ones like a delayed product launch. Highlight what did work, and end with two or three specific actions and the metrics to track them. Share the numbers with sales leaders privately first, to avoid surprises.
06

How do you calculate month-over-month growth?

Dashboards and KPIsIn 32 company setsMedium
Save to ▾
Show answer
Aggregate revenue by month, use LAG(revenue) OVER (ORDER BY month), then (revenue - prev) / prev x 100.
07

How do you improve Power BI report performance?

Power BIIn 31 company setsMedium
Save to ▾
Show answer
Use a star schema, remove unused columns, prefer measures, reduce visuals per page, limit high-cardinality fields and use aggregations or incremental refresh.
08

Write a Tableau calculation to find each customer's first purchase date and flag new versus repeat orders.

TableauIn 31 company setsMedium
Save to ▾
Show answer
// 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])
09

Write pandas code to standardise inconsistent city names such as 'delhi ', 'New Delhi' and 'DELHI'.

Data CleaningIn 31 company setsMedium
Save to ▾
Show answer
city_map = { 'delhi': 'Delhi', 'new delhi': 'Delhi', 'bombay': 'Mumbai', 'mumbai': 'Mumbai', 'bengaluru': 'Bengaluru', 'bangalore': 'Bengaluru', } clean = df['city'].str.strip().str.lower().str.replace(r'\s+', ' ', regex=True) df['city_clean'] = clean.map(city_map).fillna(clean.str.title()) print(df['city_clean'].value_counts())
10

An inner join between orders and customers returns fewer orders than the orders table has. What could be wrong?

Data CleaningIn 31 company setsMedium
Save to ▾
Show answer
Orphan records are child rows whose foreign key has no matching parent, such as orders with a customer_id that does not exist in the customer table. They break joins silently: an inner join drops them and totals fall short. Find them with a LEFT JOIN from the child to the parent and filter where the parent key IS NULL. Then fix the source, add an Unknown member, or report them separately.
11

Write an Excel formula to look up a price using two criteria, product and city.

ExcelIn 31 company setsMedium
Save to ▾
Show answer
=XLOOKUP(1, (A2:A500=G2) * (B2:B500=H2), C2:C500, "Not found") -- A = product, B = city, C = price -- G2 and H2 hold the product and city to find -- each condition returns TRUE/FALSE; multiplying gives 1 only where both match
12

A stakeholder says the Power BI report shows different revenue than their Excel file. How do you troubleshoot?

Power BIIn 30 company setsMedium
Save to ▾
Show answer
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.
13

Your NOT IN query unexpectedly returns zero rows. Why might that happen, and how do EXISTS and IN differ?

SQLIn 30 company setsMedium
Save to ▾
Show answer
IN checks whether a value is in a list or subquery result; EXISTS checks whether a subquery returns at least one row and stops at the first match. Results are the same in most cases, and modern optimisers often run them similarly. The big difference is NOT IN with NULLs: if the subquery returns any NULL, NOT IN returns no rows. NOT EXISTS behaves correctly, so prefer it for anti-joins.
14

Your scheduled Python report failed silently and nobody noticed for a week. How do you make it reliable?

Python for AnalysisIn 30 company setsMedium
Save to ▾
Show answer
Add logging to a file or central log, wrap the main steps in try and except that send an alert by email or chat on failure, and exit with a non-zero code so the scheduler marks the job failed. Add data checks, such as row counts above a minimum and no missing dates, before sending output. Use a proper scheduler or orchestrator with retries, and include the data date in every report.
15

How do you calculate a running total?

SQLIn 29 company setsMedium
Save to ▾
Show answer
SUM(amount) OVER (ORDER BY order_date ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) adds up values cumulatively.
16

How do you remove duplicates in Excel but keep the latest record?

ExcelIn 29 company setsMedium
Save to ▾
Show answer
Sort by date (newest first), then Data → Remove Duplicates on the key column — Excel keeps the first occurrence. Or use UNIQUE / a COUNTIFS helper column.
17

Explain GROUP BY with an example.

SQLIn 29 company setsMedium
Save to ▾
Show answer
It groups rows sharing values so aggregates run per group, for example SELECT region, SUM(sales) FROM orders GROUP BY region.
18

How do you handle large CSV files that do not fit in memory in Python?

Python for AnalysisIn 29 company setsMedium
Save to ▾
Show answer
Read in chunks with chunksize, load only needed columns, set efficient dtypes or switch to Dask, Polars or a database.
19

What steps would you apply in Power Query to clean a messy system export?

Data CleaningIn 29 company setsMedium
Save to ▾
Show answer
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.
20

Customer names in your file show strange characters like 'é' instead of accented letters. What is wrong and how do you fix it?

Data CleaningIn 29 company setsMedium
Save to ▾
Show answer
This is an encoding mismatch: a UTF-8 file was read as a different encoding such as Latin-1 or Windows-1252. Re-read it with the right encoding, for example pd.read_csv(path, encoding='utf-8') or 'utf-8-sig' for files with a byte order mark, or set the file origin in Excel and Power Query import. Avoid re-saving through tools that change encoding, and agree on UTF-8 for all exchanges, especially for Hindi or other Indian language text.
21

Write pandas code to find the top 2 products by revenue in each region.

Python for AnalysisIn 29 company setsMedium
Save to ▾
Show answer
top2 = ( df.groupby(['region', 'product'], as_index=False)['revenue'] .sum() .sort_values(['region', 'revenue'], ascending=[True, False]) .groupby('region') .head(2) ) print(top2)
22

After joining orders to payments, your revenue total doubles. What went wrong?

SQLIn 28 company setsMedium
Save to ▾
Show answer
This is a join fan-out: an order has more than one matching payment row, for example split payments or retries, so each order line is repeated and sums are inflated. Check by counting rows per key on both sides. Fix it by aggregating payments to one row per order before joining, joining at the correct grain, or using the right key. Always compare row counts and totals before and after a join.
23

Orders arrive in the warehouse with customer IDs that do not exist yet in the customer dimension. What do you do?

Data Modelling & WarehousingIn 28 company setsMedium
Save to ▾
Show answer
These are late-arriving dimensions. Do not drop the orders, or revenue will be understated. Common practice is to insert a placeholder customer row with the natural key and 'Unknown' attributes, link the order to it, and update that row when full details arrive. Alternatively map to a single Unknown member with key -1. Also monitor how many such rows appear daily, because a spike usually means a broken feed.
24

Users say a Power BI report still shows yesterday morning's data, although a refresh is scheduled every few hours. What do you check?

Power BIIn 28 company setsMedium
Save to ▾
Show answer
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.
25

How do you merge two DataFrames on different column names?

Python for AnalysisIn 27 company setsMedium
Save to ▾
Show answer
pd.merge(df1, df2, left_on='cust_id', right_on='id', how='left') joins on differently named keys.
26

How do you handle errors like #N/A and #DIV/0!?

ExcelIn 27 company setsMedium
Save to ▾
Show answer
Fix the root cause when possible, or wrap formulas with IFERROR or IFNA to return a clear fallback value.
27

Explain correlation vs regression.

Statistics and Case StudiesIn 27 company setsMedium
Save to ▾
Show answer
Correlation shows the strength and direction of association; regression builds an equation to predict one variable from others.
28

Your pandas script shows SettingWithCopyWarning and a new column does not update. What is happening and how do you fix it?

Python for AnalysisIn 27 company setsMedium
Save to ▾
Show answer
It warns that you may be modifying a temporary copy of a slice, so the change might not reach the original DataFrame, for example df[df.sales > 0]['flag'] = 1. Avoid it by using a single loc call, df.loc[df.sales > 0, 'flag'] = 1, or by calling .copy() when you intentionally create a new subset. Newer pandas versions with copy-on-write make behaviour more predictable, but clear loc assignments remain best practice.
29

Write a Tableau table calculation for year-over-year sales growth.

TableauIn 27 company setsMedium
Save to ▾
Show answer
// with YEAR(Order Date) in the view, Compute Using: Table (across) (ZN(SUM([Sales])) - LOOKUP(ZN(SUM([Sales])), -1)) / ABS(LOOKUP(ZN(SUM([Sales])), -1)) // the built-in Quick Table Calculation 'Year over Year Growth' generates similar logic // format the field as a percentage
30

Your sales data contains negative quantities. What do you do with them?

Data CleaningIn 27 company setsMedium
Save to ▾
Show answer
Do not delete them blindly. First find out what they mean: often they are returns, cancellations or credit notes, which are valid business events. Check with the source team or a documentation note. If they are returns, keep them but report gross sales, returns and net sales separately. If some are clearly entry errors, such as a negative quantity on a new order, flag and correct them and log the rule.
31

Write pandas code to fill missing values in a column with the median of each group.

Data CleaningIn 27 company setsMedium
Save to ▾
Show answer
# Fill missing delivery_days with the median for that city df['delivery_days'] = ( df['delivery_days'] .fillna(df.groupby('city')['delivery_days'].transform('median')) ) # Rows in a city with no values at all stay NaN; fall back to overall median df['delivery_days'] = df['delivery_days'].fillna(df['delivery_days'].median())
32

Write SQL to find the number of days between each customer's consecutive orders and their average gap.

SQLIn 27 company setsMedium
Save to ▾
Show answer
WITH gaps AS ( SELECT customer_id, order_date, order_date - LAG(order_date) OVER ( PARTITION BY customer_id ORDER BY order_date) AS days_since_prev FROM orders ) SELECT customer_id, COUNT(*) AS orders, AVG(days_since_prev) AS avg_gap_days FROM gaps GROUP BY customer_id HAVING COUNT(*) > 1; -- order_date is DATE (PostgreSQL); use DATEDIFF in other databases
33

How would you find customers who never placed an order?

SQLIn 26 company setsMedium
Save to ▾
Show answer
LEFT JOIN customers to orders and keep rows where order_id IS NULL, or use NOT EXISTS, which also handles NULLs safely.
34

Write a DAX measure for a KPI card showing achievement against target and a colour for conditional formatting.

Dashboards and KPIsIn 26 company setsMedium
Save to ▾
Show answer
Achievement % = DIVIDE([Total Sales], [Sales Target]) KPI Colour = VAR a = [Achievement %] RETURN SWITCH( TRUE(), ISBLANK(a), "#9E9E9E", a >= 1, "#2E7D32", a >= 0.9, "#F9A825", "#C62828" ) -- apply KPI Colour via Format > Callout value > fx > Field value
35

A measure shows correct values per row in a table visual, but the grand total looks wrong. Why, and how do you fix it?

Power BIIn 26 company setsMedium
Save to ▾
Show answer
Totals in DAX are not the sum of visible rows; the measure is recalculated in the total's filter context. A measure like a distinct count, a ratio or an IF condition can give a different result at total level. If the business wants the sum of row values, iterate explicitly, for example SUMX ( VALUES ( Product[Name] ), [My Measure] ). Confirm with stakeholders which total is correct before changing it.
36

Average delivery time improved by 4 minutes, but customer complaints about late deliveries went up. How do you investigate?

Statistics and Case StudiesIn 26 company setsMedium
Save to ▾
Show answer
An average can improve while the tail gets worse. I would look at the distribution: median, 90th and 95th percentiles and the share of orders beyond the promised time. Then break it down by city, time slot and restaurant to see where late orders cluster. Also check whether promised times changed, whether complaint tracking changed and whether a few very fast orders pulled the mean down.
37

Write SQL to calculate open rate and click-through rate for each email campaign.

Web & Marketing AnalyticsIn 26 company setsMedium
Save to ▾
Show answer
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;
38

How do you present insights to non-technical stakeholders?

Data StorytellingIn 25 company setsMedium
Save to ▾
Show answer
Lead with the answer, use one simple chart per point, translate numbers into business impact (₹, %), avoid jargon and end with a clear recommendation and next step.
39

How do you connect Python to a SQL database?

Python for AnalysisIn 25 company setsMedium
Save to ▾
Show answer
Create an engine with SQLAlchemy or a driver such as psycopg2, then run pd.read_sql(query, engine) to load results into a DataFrame.
40

How do you find duplicate rows in a table?

SQLIn 25 company setsMedium
Save to ▾
Show answer
SELECT col, COUNT(*) FROM t GROUP BY col HAVING COUNT(*) > 1; use ROW_NUMBER() partitioned by the key to delete extras.
41

Checkout conversion fell from 3.2% to 2.6% the week after an app release. How do you investigate?

Statistics and Case StudiesIn 25 company setsMedium
Save to ▾
Show answer
First confirm it is real: check tracking events, data delays and whether the denominator changed. Then segment by app version, platform, device, payment method and traffic source. If the drop is concentrated in the new version or one payment option, it points to a bug or UX change. Look at funnel steps to find where users drop. Compare with seasonality and campaigns, then share findings with product and engineering quickly.
42

Your Top 10 products filter in Tableau ignores the category filter. Why, and how do you fix it?

TableauIn 25 company setsMedium
Save to ▾
Show answer
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.
43

Write SQL to generate a simple date dimension for 2026.

Data Modelling & WarehousingIn 25 company setsMedium
Save to ▾
Show answer
-- PostgreSQL syntax CREATE TABLE dim_date AS SELECT TO_CHAR(d, 'YYYYMMDD')::INT AS date_key, d::DATE AS full_date, EXTRACT(YEAR FROM d) AS year, EXTRACT(QUARTER FROM d) AS quarter, EXTRACT(MONTH FROM d) AS month_no, TO_CHAR(d, 'Mon') AS month_name, TO_CHAR(d, 'Dy') AS weekday, EXTRACT(ISODOW FROM d) IN (6, 7) AS is_weekend FROM GENERATE_SERIES(DATE '2026-01-01', DATE '2026-12-31', INTERVAL '1 day') AS d;
44

Site conversion rate rose from 2.0% to 2.4%, but total revenue stayed flat. What would you check?

Web & Marketing AnalyticsIn 25 company setsMedium
Save to ▾
Show answer
Check the components: sessions may have fallen, for example after cutting paid campaigns, which removes low-intent traffic and lifts the rate without new sales. Average order value may have dropped because of discounts or a mix shift towards cheaper products. Also check whether conversion definitions or tracking changed. Revenue equals sessions times conversion rate times AOV, so break down the change across those three factors by channel.
45

What is Row-Level Security?

Power BIIn 24 company setsMedium
Save to ▾
Show answer
Rules that restrict data per user role, for example sales managers seeing only their region, defined with DAX filters and assigned in the Service.
46

How do you handle outliers in Pandas?

Python for AnalysisIn 24 company setsMedium
Save to ▾
Show answer
Detect with IQR or z-score, then cap with clip, remove, transform with log, or keep and flag them depending on whether they are errors or real events.
47

Explain INDEX and MATCH together.

ExcelIn 24 company setsMedium
Save to ▾
Show answer
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.
48

How do you create a dynamic dashboard in Excel?

ExcelIn 24 company setsMedium
Save to ▾
Show answer
Build PivotTables from a clean table, add PivotCharts and slicers, link KPIs with formulas, and refresh from Power Query so everything updates together.
49

What is an action title and why should you use one?

Data StorytellingIn 24 company setsMedium
Save to ▾
Show answer
An action title states the insight of a chart or slide as a sentence instead of a label. Instead of Monthly Sales by Region, write South region drove 70 percent of the decline since July. Busy executives may read only the titles, so each one should carry the message and, ideally, the so-what. The chart below then proves the title. Read only your titles in order: they should tell the whole story.
50

Write Python code to calculate the sample size per group for a conversion test with a 4% baseline and a 10% relative lift.

A/B Testing & ExperimentsIn 24 company setsMedium
Save to ▾
Show answer
from statsmodels.stats.power import NormalIndPower from statsmodels.stats.proportion import proportion_effectsize baseline = 0.04 target = baseline * 1.10 # 4.4% effect = proportion_effectsize(target, baseline) n = NormalIndPower().solve_power( effect_size=effect, alpha=0.05, power=0.8, alternative='two-sided' ) print(round(n)) # roughly 39,000 users per group

Frequently asked questions

How is this list made?

We count how often each question appears across the 155 company-wise Data Analytics practice sets on this site and show the 50 most common. They are the safest questions to master first.

Is this enough to clear an interview?

It is the best starting point, not the finish line. After these, practise the company pages for your target employers and the sheets for your weaker topics.