Accenture Power BI Developer Interview Questions
Accenture Power BI Developer Interview Questions
INTERVIEW QUESTIONS
0-3 YOE
9-11 LPA
Explain the concept of context transition in DAX and
provide an example.
Optimizing Power BI reports is crucial for usability, especially when datasets are large and
visuals are numerous.
Key Optimization Techniques:
1. Efficient Data Modeling
• Use Star Schema: Avoid snowflake schemas; flatten dimensions where feasible.
• Remove Unnecessary Columns & Tables: Only import what you need.
• Use Appropriate Data Types: Smaller data types reduce memory usage.
2. DAX Optimization
• Avoid iterator functions (SUMX, FILTER) where a simple aggregation (SUM,
COUNT) works.
• Minimize use of CALCULATE and FILTER if not necessary.
• Use variables in measures to avoid recalculating the same logic multiple times.
3. Manage Relationships Smartly
• Avoid bi-directional relationships unless absolutely required.
• Use inactive relationships with USERELATIONSHIP() if you need alternate filtering
without introducing complexity.
4. Control Visual Complexity
• Limit number of visuals on a page.
• Avoid unnecessary slicers and filters.
• Use bookmarks and drill-throughs to split logic across pages.
5. Use Aggregations and Summarized Tables
• Pre-aggregate data at the source or use Power BI aggregations.
• Create summary tables in Power Query for frequently accessed aggregates.
6. Optimize Query Folding
• Ensure transformations in Power Query (M) support query folding to offload heavy
lifting to the data source.
7. Use Performance Analyzer Tool
• Use this built-in tool to track which visuals are taking time.
• Focus your optimization efforts on the slowest DAX queries or visuals.
8. Optimize Data Refresh
• Enable incremental refresh on large datasets.
• Disable auto date/time feature unless needed.
Example Scenario:
You have 10 KPIs like Revenue, Profit, Sales Volume, etc. Instead of writing 10 YTD, 10 QTD,
and 10 PY measures (30 total), you:
• Write only the 10 base measures.
• Apply the Time Intelligence calculation group → drastically reduces the number of DAX
measures and improves maintainability.
Bonus Tips:
• Use Power BI Aggregations with DirectQuery for hybrid performance.
• Keep report pages light (≤6 visuals), use bookmarks for navigating between views.
Key Concepts:
• Import Mode: Data is loaded into Power BI memory → faster but not real-time.
• DirectQuery Mode: Queries the data source live → real-time but slower.
• Dual Mode: Can act as either Import or DirectQuery based on context → helps
optimize performance.
Limitations to Consider:
• Some DAX functions behave differently or are limited in DirectQuery.
• Relationships across different storage modes need careful management.
• May affect performance if not modeled properly.
Syntax:
CALCULATE(<expression>, USERELATIONSHIP(Table1[Col], Table2[Col]))
Example:
Suppose you have:
• Sales[OrderDate] and Sales[ShipDate]
• Date[Date]
You create:
• Active relationship → Date[Date] ↔ Sales[OrderDate]
• Inactive relationship → Date[Date] ↔ Sales[ShipDate]
Now you want to create a measure for Shipped Sales:
Shipped Sales =
CALCULATE(
SUM(Sales[SalesAmount]),
USERELATIONSHIP(Sales[ShipDate], Date[Date])
)
This tells Power BI: "For this calculation only, use the relationship based on ShipDate, not the
active OrderDate one."
Use Cases:
• Compare metrics across multiple dates (e.g., order vs. shipment).
• Toggle between primary and secondary date relationships dynamically.
• Financial reports comparing invoice vs. payment dates.
4. Parameterizing Queries
M allows you to define parameters dynamically:
= Table.SelectRows(Source, each [Region] = ParameterRegion)
This is useful for filtering based on a user-selected region, product, etc.
Both CROSSFILTER() and TREATAS() are used in DAX to control filter propagation, but
they have very different purposes and syntax.
Summary Comparison:
Feature CROSSFILTER TREATAS
Use Case Modify existing relationships Simulate relationships between unrelated tables
Works with Tables with relationships Unrelated tables
Change direction or disable
Purpose Project filters from one table to another
filters
Typical Inside CALCULATE, with VALUES() or
Within CALCULATE or FILTER
Usage SELECTCOLUMNS()
Affects No (temporary in expression
No (applies only to that calculation)
Model? only)
What is the difference between SUMX and SUM in DAX?
Give an example.
Basic Difference:
Function Purpose How it Works
SUM Adds values in a single column Straightforward aggregation
Row-by-row evaluation over a table Evaluates an expression for each row, then
SUMX
expression sums the result
Conceptual Understanding:
• SUM works on one column only.
• SUMX can work on expressions across multiple columns or logic per row.
Example:
Imagine you have a table Sales with:
Product Quantity Price
A 2 100
B 5 200
Using SUM:
TotalQuantity = SUM(Sales[Quantity])
-- Output: 7
You cannot do:
SUM(Sales[Quantity] * Sales[Price])
Using SUMX:
TotalRevenue = SUMX(Sales, Sales[Quantity] * Sales[Price])
-- Row 1: 2 * 100 = 200
-- Row 2: 5 * 200 = 1000
-- Output: 1200
So SUMX is essential for custom row-by-row calculations before aggregation.
When to Use:
•Use SUM for simple aggregations on one column.
•Use SUMX when:
o You need to multiply/add between columns.
o You're working with calculated rows or logic.
Goal:
Calculate a sum of values over the past 12 months, dynamically based on the selected
date in the context.
DAX Formula:
Assume you want a rolling total of Sales[Amount] based on Sales[OrderDate].
Rolling 12M Sales =
CALCULATE(
SUM(Sales[Amount]),
DATESINPERIOD(
'Date'[Date],
MAX('Date'[Date]),
-12,
MONTH
)
)
Explanation:
• CALCULATE changes the context of the calculation.
• SUM(Sales[Amount]) → Base measure.
• DATESINPERIOD() creates a dynamic 12-month window:
o MAX('Date'[Date]) → Anchors the window to current context date.
o -12 and MONTH → Looks back 12 months.
Notes:
• Requires a calendar date table with continuous dates.
• Works well in visuals like line charts showing month trends.
• Ensure a relationship exists between your Date table and fact table.