Power BI Interview Questions Asked Accenture
Profile for
@DIPAKMANI LinkedIn
Data Analyst
Q 1. What are the Interaction in Power BI
In Power BI, interactions refer to how visuals on a report page interact with each other when a user selects or filters
data. These interactions help make reports more dynamic and user-friendly. There are three types of interactions:
1. Filter:
- When you select a data point in one visual, it filters the data in other visuals on the page.
- Example: If you click on a specific "Product Category" in a bar chart, other visuals (like a table or pie chart) will update
to show data only for that category.
2. Highlight:
- When you select a data point in one visual, it highlights the related data in other visuals without filtering them.
- Example: If you click on a "Region" in a map, other visuals will highlight the data for that region while still showing all
other data.
3. None:
- When you select a data point in one visual, it does not affect other visuals on the page.
- Example: If you click on a "Salesperson" in a table, other visuals remain unchanged.
How to Set Interactions:
- Go to the View tab in Power BI Desktop and enable Edit Interactions.
- Click on a visual, and you’ll see icons (Filter, Highlight, None) above other visuals to set the interaction type.
Q 2. What is difference between Tooltip and DrillThrough in Power BI
▪ Tooltips:
Imagine you’re looking at a sales report with a bar chart showing sales by product category. When
you hover over the Electronics bar, a small box pops up with extra details, like total sales, profit
margin, and top-selling products.
- Use tooltips to give users extra context or details without cluttering the main report.
- Example: Hover over a bar to see detailed metrics like sales, profit, and top products.
▪ Drillthrough
- Now, imagine you’re still looking at the same bar chart, but instead of hovering, you right-click on
the Electronics bar and select Drillthrough. This takes you to a dedicated page with a deep dive
into electronics sales, like monthly trends, top customers, and regional performance.
- Use DrillThrough when you want to explore detailed insights about a specific item (e.g., a
product, customer, or region).
- Example: Click on a product category to open a detailed page showing its sales trends and
performance metrics.
▪ Key Difference:
- Tooltips: Quick, hover-based details that appear on the same page.
- Drillthrough: A dedicated page for deep-dive analysis of a specific data point.
Q 3. What is Query Folding
• Conversion of M language to the native language of the source and the transformation happening
on the source side directly instead of on our local machines. As a result, the performance of our
model increases.
• This improves speed, performance and reduces the amount of data loaded into Power BI.
• Works with Relational databases. like SQL Server, SAP HANA, MYSQL, Snowflake, Oracle.
How do it Work?
• When you apply transformations in Power Query (e.g., filtering, sorting, or joining tables), Power BI
tries to convert these steps into a single query (like a SQL query) and sends it to the source database.
• How to Check if Query Folding is Happening:
1. In Power Query Editor, right-click on a step and check if the "View Native Query" option is available.
If it is, query folding is occurring.
2. If the option is grayed out, query folding is not happening for that step.
• Use Case : Large Datasets, Complex Transformations, Performance Optimization.
Q 4. What are some ways to optimize an SQL query for better performance
• Use Indexes: Add indexes to frequently searched or joined columns.
• Avoid SELECT *: Only retrieve the columns you need.
• Optimize Joins: Use the correct join type and ensure join columns are indexed.
• Write Simple Queries: Avoid complex subqueries; use joins or Common Table
Expressions (CTEs).
• Filter Efficiently: Use indexed columns in WHERE, avoid functions on them, and
replace multiple OR with IN or BETWEEN.
• Limit Data: Use LIMIT or TOP to fetch only necessary rows.
• Check Query Plan: Analyze the execution plan to find and fix slow parts.
Q 5. Explain the Process of Publishing a Report
1. Create the report in Power BI Desktop.
2. Click on File > Publish > Select Workspace.
3. Choose workspace in Power BI Service.
4. Verify the report in Power BI Service under the selected workspace.
Q 6. What is the role of a Data Gateway in Power BI
Definition: Data gateway is a basically act like a bridge, creating a connection between data on our
local machine and power bi service.
Types:
1.Personal mode gateway : Designed for individual use and cannot be shared with other users.
Cannot be used with other services like Power Apps or services, Power Automate only supports
schedule refresh in power bi. Suitable for users who work with personal reports and do not require
Collaboration.
2. Enterprise mode gateway : Can be shared and used by multiple users within an organization. can
be used by power bi, power apps, flows support live query, Azure Analysis Services and dataflows
for power bi.
Q 7. Write a DAX to calculate last 7 days Sales
Last7DaysSales =
CALCULATE (
SUM(Sales [SalesAmount]),
DATESINPERIOD (
Sales [Date],
TODAY (),
-7,
DAY Explanation:
)
• SUM(Sales [SalesAmount]): Calculates the total sales amount.
) • DATESINPERIOD: Filters the data for last 7 days.
• TODAY (): Get’s today’s date.
• -7: Specifies the last 7 days (Negative Range).
Q 8. Write a SQL CODE for employees whose salary is greater than Average Sal?
SELECT EmployeeID, EmployeeName, Salary
FROM Employees
WHERE Salary > (SELECT AVG(Salary) FROM Employees);
Explanation
1. Subquery (SELECT AVG(Salary) FROM Employees)
• This calculates the average salary of all employees in the Employees table.
2. Main Query (SELECT EmployeeID, EmployeeName, Salary FROM Employees WHERE Salary > ...)
• Retrieves EmployeeID, EmployeeName, and Salary for employees where the Salary is greater than
the average salary computed by the subquery.
Q 9. write a complex dax you have used in your project?
MoM Sales Growth % =
VAR CurrentMonthSales = SUM(Sales[Sales Amount])
VAR PreviousMonthSales = CALCULATE( SUM(Sales[Sales Amount]),PREVIOUSMONTH(Sales[Order Date]))
RETURN IF( NOT(ISBLANK(PreviousMonthSales)), DIVIDE(CurrentMonthSales –
PreviousMonthSales,PreviousMonthSales,0))
Explanation:
• CurrentMonthSales → Gets the total sales for the current month.
• PreviousMonthSales → Uses PREVIOUSMONTH() to fetch the total sales for the previous month.
• DIVIDE(CurrentMonthSales - PreviousMonthSales, PreviousMonthSales, 0) → Calculates the percentage growth.
• IF(NOT(ISBLANK(PreviousMonthSales)), … ) → Ensures the calculation only runs if previous month data exists.
Q 10. You are working with a dataset that contains two columns: User and Value. Your task is to create a
new column, Max Value, that displays the maximum value for each user across all rows (as shown in the
yellow column).
Go to the Modeling tab and click on New Column.
Use the following DAX formula:
Max Value = CALCULATE( MAX(Sales[Value]),ALLEXCEPT(Sales, Sales[User]))
Explanation:
•MAX(Sales[Value]): Finds the maximum value in the Value column.
•ALLEXCEPT(Sales, Sales[User]): Ensures the calculation is performed for each User,
Ignoring filters from other columns.