Skip to content

UBS Data Analytics Interview Questions & Answers

Curated interview practice questions with answers. These are practice scenarios, not a verified list of past interview questions.

About UBS hiring for Data Analytics roles

UBS is a Swiss global financial services firm known for wealth management, investment banking, asset management and Swiss retail banking. It acquired Credit Suisse in 2023. In India it runs large business solutions and technology centres that hire software engineers, data analysts, risk and finance professionals, and operations roles supporting its global businesses.

For Data Analytics roles, this UBS practice set focuses most on Excel (7), Power BI (6), SQL (5), Data Modelling & Warehousing (4). It has 3 easy, 34 medium, 3 hard questions, so you can start easy and work up to the harder ones.

Company type
Banking & finance
Headquarters
Zurich, Switzerland
Main India offices
Pune, Mumbai, Hyderabad

UBS Data Analytics interview process

  1. Online assessment (aptitude + coding)
  2. Technical interview
  3. Managerial or business round
  4. HR round

Typical pattern based on public candidate experiences. Rounds vary by role, team and year.

Solved for UBSStart 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

What are variables (VAR) in DAX and why are they useful?

Save to ▾
Show answer
VAR stores the result of an expression inside a measure, and RETURN gives the final output. Variables make measures readable, avoid evaluating the same expression twice, and are evaluated in the filter context where they are defined, which helps avoid subtle bugs inside CALCULATE. They also make debugging easy, because you can temporarily RETURN a variable to check its value before returning the final result.
02

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

UBSSQLMedium
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.
03

What is the difference between a calculated table in DAX and a table created in Power Query?

Save to ▾
Show answer
A Power Query table is built during data refresh using M, before data enters the model, and is compressed like any imported table. A DAX calculated table is computed after load from other model tables, using functions such as CALENDAR, SUMMARIZE or DISTINCT. Prefer Power Query for shaping and cleaning source data. Use calculated tables for model-dependent needs, such as a date table from existing data or a small what-if table.
04

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

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.
05

How do you calculate working days between two dates in Excel, excluding holidays?

Save to ▾
Show answer
-- A2 = start date, B2 = end date, Holidays = named range of holiday dates =NETWORKDAYS(A2, B2, Holidays) -- if the weekend is only Sunday (weekend code 11) =NETWORKDAYS.INTL(A2, B2, 11, Holidays) -- date that is 10 working days after A2 =WORKDAY(A2, 10, Holidays)
06

Your analysis shows that a flagship initiative championed by leadership is not working. How do you present it?

Save to ▾
Show answer
Prepare carefully and stay factual. Share the finding early with the initiative owner privately so they are not surprised in a big meeting. Lead with the question asked, the method and the evidence, acknowledge limitations and what is working, and avoid blaming anyone. Offer options, such as fixing a specific step, narrowing the scope or stopping, with estimated impact. Bad news delivered with solutions is received far better.
07

Write SQL to generate a simple date dimension for 2026.

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;
08

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

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])
09

What is a PivotTable and when do you use it?

UBSExcelMedium
Save to ▾
Show answer
A tool that summarises large tables by dragging fields into rows, columns, values and filters, so you can slice sales by region or month without writing formulas.
10

What is sampling bias? Name common types.

Save to ▾
Show answer
Sampling bias occurs when the sample does not represent the population, so conclusions do not generalise. Common types: selection bias, such as surveying only app users about website issues; survivorship bias, studying only customers who stayed; non-response bias, when unhappy customers skip surveys; and convenience sampling, using whoever is easiest to reach. Random sampling, stratification and weighting help reduce it.
11

The CMO asks which marketing channel should lose 20% of its budget. How do you approach it?

Save to ▾
Show answer
I would compare channels on incremental return, not last-click ROAS. Gather spend, attributed conversions under two models, customer quality such as repeat rate and margin, and any lift test or mix model results. Look at diminishing returns: the last rupee in a saturated channel is worth less than the average. Then recommend cutting where marginal return is lowest, ideally phased with a holdout to confirm the impact.
12

Write a Tableau calculated field for profit ratio and a profit category.

Save to ▾
Show answer
// Profit Ratio (aggregate first, then divide) SUM([Profit]) / SUM([Sales]) // Profit Category IF SUM([Profit]) < 0 THEN 'Loss' ELSEIF [Profit Ratio] < 0.1 THEN 'Low margin' ELSE 'Healthy' END // avoid AVG([Profit]/[Sales]): it averages row ratios and gives a wrong total
13

Tell me about a time you worked with a marketing team to improve a campaign using data.

Save to ▾
Show answer
Situation: a lead generation campaign had a high cost per lead and sales said leads were poor. Task: find what to change. Action: I joined ad data with CRM outcomes and found two audience segments produced most leads but almost no closed deals, while one smaller segment converted well. Result: we moved budget to that segment and changed the form questions; cost per qualified lead fell about 30% in six weeks.
14

What is columnar storage and why do analytical warehouses use it?

Save to ▾
Show answer
Columnar storage keeps all values of one column together on disk instead of storing full rows together. Analytical queries usually read a few columns across millions of rows, so the engine reads only those columns. Similar values sit side by side and compress very well, which cuts storage and scan cost. The trade-off is slower single-row inserts and updates, which is why OLTP databases stay row-based.
15

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

UBSExcelMedium
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.
16

What is the difference between a t-test and a z-test?

Save to ▾
Show answer
Both compare means. A z-test assumes the population standard deviation is known or the sample is large, so the normal distribution applies. A t-test estimates standard deviation from the sample and uses the t-distribution, which has heavier tails for small samples. In practice analysts mostly use t-tests: one-sample, independent two-sample (Welch's version if variances differ) or paired, for before-after measurements on the same users.
17

How does the FILTER function work in Excel? Write a formula to list all North region orders.

UBSExcelMedium
Save to ▾
Show answer
-- A2:D500 holds Order, Customer, Region, Amount =FILTER(A2:D500, C2:C500="North", "No orders") -- two conditions (AND) multiply the tests =FILTER(A2:D500, (C2:C500="North")*(D2:D500>10000), "No orders") -- OR conditions add the tests =FILTER(A2:D500, (C2:C500="North")+(C2:C500="East"))
18

Your Tableau map shows a large number of unknown locations. How do you fix it?

Save to ▾
Show answer
Click the unknown indicator at the bottom right of the map and choose Edit Locations. Usually Tableau cannot match names because of spelling variants, such as 'Bengaluru' versus 'Bangalore', or an ambiguous city that needs the state and country set. Make sure fields have the correct geographic role, add a country or state field to the view, clean names in the data source, or use latitude and longitude columns.
19

What are additive, semi-additive and non-additive facts?

Save to ▾
Show answer
Additive facts, like sales amount or quantity, can be summed across every dimension. Semi-additive facts, like account balance or stock on hand, can be summed across accounts or stores but not across time; for time you take the closing or average value. Non-additive facts, like percentages, ratios or unit prices, cannot be summed at all, so you store their components (profit and revenue) and calculate the ratio at query time.
20

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

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
21

What is a gateway in Power BI?

Save to ▾
Show answer
A bridge that lets the Service refresh data from on-premises sources securely on a schedule.
22

Email open rates suddenly jumped from 22% to 45% without any campaign change. Should you celebrate?

Save to ▾
Show answer
No. Privacy features in some mail apps pre-load email images, which fires the open tracking pixel even if the person never reads the email, so open rates get inflated. Check opens by email client to confirm. Move reporting towards clicks, click-to-send rate, conversions and unsubscribes, which reflect real behaviour, and avoid using opens alone to pick winning subject lines or to define engaged subscribers.
23

What is the difference between a clustered and a non-clustered index?

UBSSQLMedium
Save to ▾
Show answer
A clustered index defines the physical order of rows (one per table); a non-clustered index is a separate structure with pointers to the rows.
24

You launched a dashboard a month ago and usage logs show almost nobody opens it. What do you do?

Save to ▾
Show answer
Talk to the intended users before redesigning. Find out whether they know it exists, whether it answers their real questions, whether they trust the numbers, and whether it fits their routine. Common fixes are fewer, sharper KPIs, faster loading, a scheduled email snapshot, or embedding it in a meeting that already happens. Then measure usage again. Sometimes the honest answer is that the dashboard is not needed and can be retired.
25

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

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)
26

Write pandas code for a pivot table of sales by region and category with sum and count.

Save to ▾
Show answer
import pandas as pd summary = pd.pivot_table( df, index='region', columns='category', values='sales', aggfunc=['sum', 'count'], fill_value=0, margins=True # adds an All row and column ) print(summary)
27

You inherit a monthly Excel report and suspect some numbers are hard-typed over formulas. How do you audit it?

UBSExcelMedium
Save to ▾
Show answer
Use Go To Special and select Constants with Numbers to highlight hard-typed values inside formula areas. Show Formulas (Ctrl+`) to scan columns for inconsistencies, and use Trace Precedents and Dependents on key totals. Inquire or Spreadsheet Compare, if available, can flag inconsistent formulas. Then fix the overwritten cells, protect formula ranges and add check totals that compare with the source data each month.
28

What do the match_mode and search_mode arguments of XLOOKUP control?

UBSExcelMedium
Save to ▾
Show answer
match_mode decides how a value is matched: 0 exact (default), -1 exact or next smaller, 1 exact or next larger, and 2 wildcard. search_mode decides direction: 1 searches first to last, -1 searches last to first, and 2 or -2 use binary search on sorted data. Searching last to first is a quick way to fetch the latest entry for a customer without sorting, and next-smaller matching handles tax slabs or commission bands.
29

What is vectorisation and why does it matter?

Save to ▾
Show answer
Applying operations to whole arrays at once instead of Python loops, which is far faster because it runs in optimised compiled code.
30

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

UBSSQLMedium
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
31

What is a correlated subquery?

UBSSQLMedium
Save to ▾
Show answer
A correlated subquery refers to a column from the outer query, so it is logically evaluated once per outer row. Example: find employees earning above their department average with WHERE salary > (SELECT AVG(salary) FROM emp e2 WHERE e2.dept_id = e1.dept_id). It is readable but can be slow on large tables. The same result is often faster with a window function such as AVG(salary) OVER (PARTITION BY dept_id).
32

Write Python code to bootstrap a 95% confidence interval for the difference in revenue per user between two groups.

Save to ▾
Show answer
import numpy as np rng = np.random.default_rng(42) control = df.loc[df.variant == 'A', 'revenue'].to_numpy() treat = df.loc[df.variant == 'B', 'revenue'].to_numpy() diffs = [] for _ in range(5000): c = rng.choice(control, size=len(control), replace=True) t = rng.choice(treat, size=len(treat), replace=True) diffs.append(t.mean() - c.mean()) low, high = np.percentile(diffs, [2.5, 97.5]) print(f'95% CI for difference: {low:.2f} to {high:.2f}')
33

What is the difference between extract filters and data source filters in Tableau?

Save to ▾
Show answer
Extract filters decide which rows go into the extract file at all, which reduces its size and speeds every view; filtered rows are simply not available. Data source filters apply to all worksheets using that data source, for live or extract, and are useful for security or scope, such as only the India business. Both act before context filters. Normal worksheet filters only affect one sheet.
34

What is a conformed dimension?

Save to ▾
Show answer
A conformed dimension is one dimension table with the same keys, attributes and meanings shared by several fact tables. For example, one date and one product dimension used by sales, returns and inventory facts. Because they conform, you can compare sales and returns by the same product category in one report without mismatched definitions. Conformed dimensions are the main way an enterprise warehouse stays consistent across departments.
35

How do you calculate a running total?

UBSSQLMedium
Save to ▾
Show answer
SUM(amount) OVER (ORDER BY order_date ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) adds up values cumulatively.
36

How do you improve Power BI report performance?

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.
37

Explain INDEX and MATCH together.

UBSExcelMedium
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.
38

What is Row-Level Security?

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.
39

Tell me about a time a dashboard you built changed a business decision.

Save to ▾
Show answer
Situation: our operations team assumed late deliveries were evenly spread. Task: I built a delivery performance dashboard. Action: I added a breakdown by courier partner and pin code cluster with a weekly trend, and reviewed it with the operations manager. Result: it showed one partner caused 60 percent of delays in two zones. The company shifted those zones to another partner, and on-time delivery rose from 84 to 92 percent in two months.
40

Write Python code to test whether conversion differs between control and treatment.

Save to ▾
Show answer
from statsmodels.stats.proportion import proportions_ztest, proportion_confint conversions = [1180, 1295] # control, treatment visitors = [30000, 30100] z, p = proportions_ztest(conversions, visitors) print(f'z = {z:.2f}, p = {p:.4f}') for c, n in zip(conversions, visitors): low, high = proportion_confint(c, n, method='wilson') print(f'rate {c/n:.3%} 95% CI {low:.3%} to {high:.3%}')

Tips to crack the UBS Data Analytics interview

  • Revise DSA, Java or Python, SQL and OOP concepts, and be ready to explain your code clearly in interviews.
  • Learn basics of wealth management, investment banking and financial markets to show interest in the business side.
  • Prepare examples of attention to detail and handling pressure, since banking technology roles demand reliability and accuracy.
  • Keep a one-minute story ready for every project on your CV: problem, your part, tools, result.
  • Practise the hard questions on this page aloud; UBS interviewers usually ask follow-ups on your first answer.

Frequently asked questions

How many rounds are there in the UBS Data Analytics interview?

Candidates usually go through 4 stages: Online assessment (aptitude + coding); Technical interview; Managerial or business round; HR round. The exact rounds change with the role, team, location and your experience, so confirm the process with the recruiter.

Which topics should I prepare for the UBS Data Analytics interview?

This practice set leans on Excel (7), Power BI (6), SQL (5), Data Modelling & Warehousing (4). Revise those first, then practise explaining one or two of your own projects end to end, because most UBS interviewers ask you to walk through real work.

Are these the exact questions asked at UBS?

No. These are curated practice questions that match the skills and difficulty usually tested in banking & finance interviews like UBS's. They are not a leaked or verified list of past questions.

Where does UBS hire Data Analytics professionals in India?

UBS has large teams in Pune, Mumbai, Hyderabad. Openings and locations change often, so check the UBS careers page and filter by city and experience.

Data Analytics questions for similar companies