001

Download as pdf or txt
Download as pdf or txt
You are on page 1of 12

POWER BI

INTERVIEW
PREPARATION

Andrey Hakobyan
@AndreyHakobyan
Andrey Hakobyan
@AndreyHakobyan

Basic Level
1. What is Power BI?
Answer: Power BI is a business analytics tool by Microsoft that provides interactive visualizations and business
intelligence capabilities with an interface simple enough for end users to create their own reports and dashboards.
It allows users to connect to a wide range of data sources, clean and transform data, and create interactive reports
for decision-making.

2. What are the different components of Power BI?


Answer: The main components of Power BI are:
• Power BI Desktop:A Windows desktop application for creating reports.
• Power BI Service (app.powerbi.com): A cloud-based service to share and collaborate on reports and
dashboards.
• Power BI Mobile: Mobile apps for viewing and interacting with reports on smartphones and tablets.
• Power BI Report Server: An on-premises server for publishing Power BI reports.
• Power BI Gateway: A bridge between on-premises data sources and Power BI service.

3. What are the different types of filters in Power BI?


Answer: Power BI provides the following filter types:
• Visual-level filters:Apply to individual visualizations on a report page.
• Page-level filters:Apply to all the visuals on a single report page.
• Report-level filters:Apply to all the pages in the report.

Drillthrough filters: Allow you to drill into the details of a particular data point.

4. What is DAX in Power BI?


Answer: DAX (Data Analysis Expressions) is a collection of functions, operators, and constants that can be used in
formulas to calculate and return one or more values in Power BI. DAX is used to create calculated columns, measures,
and custom tables.

5. What are slicers in Power BI?


Answer: Slicers are a visual filtering mechanism that allow users to filter data interactively on the report. They provide
a way to segment data and highlight related data within other visuals on the same page.

6. How can you import data in Power BI?


Answer: In Power BI, you can import data using various connectors available for data sources such as Excel, CSV, SQL
Server, Azure, SharePoint, and many other online services like Google Analytics, Salesforce, and more. You can import
data by clicking the “Get Data” option in Power BI Desktop.

7. What is the difference between a Power BI dashboard and a report?


Answer:
• Report: A Power BI report can have multiple pages and can include several visualizations and data from
multiple datasets.
• Dashboard: A dashboard is a single-page (canvas) containing a snapshot of important data from one or more
reports. It provides a high-level view of key metrics.

1
Andrey Hakobyan
@AndreyHakobyan

8. How do you create relationships between tables in Power BI?


Answer: In Power BI, you can create relationships between tables by going to the “Model” view. You can drag fields
from one table to another to create a relationship. The relationship can be many-to-one (the most common), many-to-
many, or one-to-one, depending on the data.

9. What are the different types of visualizations available in Power BI?


Answer: Common visualizations in Power BI include:
• Bar charts
• Column charts
• Line charts
• Pie charts
• Area charts
• Scatter plots
• Matrix and table visuals
• Cards
• Tree maps
• Gauges
• Maps (including ArcGIS Maps)
• Slicers
• Waterfall charts

10. What is Power Query in Power BI?


Answer: Power Query is the data connection and transformation engine in Power BI. It allows users to connect to a
wide variety of data sources, perform data transformations (e.g., cleaning, merging, filtering), and load the transformed
data into Power BI for reporting.

11. What is the Power BI Gateway, and why is it used?


Answer: The Power BI Gateway acts as a bridge between Power BI Service and on-premises data sources like SQL
Server, allowing you to refresh reports with data from on-premises databases without moving the data to the cloud.

12. What are custom visuals in Power BI?


Answer: Custom visuals in Power BI are user-created visuals that are not available by default in Power BI. You can
import these visuals from the Power BI marketplace (AppSource), or create them using libraries like D3.js and add them
to your reports.

13. How do you handle missing data in Power BI?


Answer: In Power BI, missing data can be handled in Power Query by replacing null values, removing rows or columns
with missing data, or filling in missing values with placeholders like averages or default values.

14. What is the use of a calculated column in Power BI?


Answer: A calculated column is a new column that is added to a table in Power BI. It is created using DAX formulas
and is used to create new data values based on existing data in the table.

15. How do you publish a report to Power BI Service?


Answer: To publish a report from Power BI Desktop to Power BI Service, click on the Publish button located in the
top-right corner of Power BI Desktop, sign in with your Power BI account, and choose a workspace where you want the
report to be saved.

2
Andrey Hakobyan
@AndreyHakobyan

16. What is a Power BI dashboard?


Answer:
A Power BI dashboard is a single page that consolidates data from multiple reports into one view. It provides a high-level
overview of key metrics and KPIs, and it allows users to drill down into specific reports for more detailed data.

17. What is the role of Power BI Service?


Answer: Power BI Service (app.powerbi.com) is a cloud-based service that allows users to share, collaborate, and access
Power BI reports and dashboards. It provides features such as data refresh, app workspaces, sharing, and dashboard
alerts.

18. How do you schedule data refresh in Power BI?


Answer: In Power BI Service, you can schedule data refresh by configuring the settings for the dataset. You can set up
automatic refreshes on a daily or weekly schedule, and connect to on-premises data sources via the Power BI Gateway
if needed.

19. What is the difference between calculated columns and measures in Power BI?
Answer:
• Calculated Columns: These are static values computed row by row for a specific table and are stored in the
data model.
• Measures: These are dynamic calculations used to perform aggregate operations like sums, averages, etc., and
are calculated at query time, not stored in the data model.

20. What is row-level security (RLS) in Power BI?


Answer: Row-level security (RLS) is a feature in Power BI that restricts data access for specific users. You can define
roles and security rules to control what data a user can see, ensuring users only view data relevant to them.

3
Andrey Hakobyan
@AndreyHakobyan

Intermediate Level

1. Explain the difference between Import Mode and Direct Query Mode in Power BI.
Answer:
• Import Mode: Data is imported into Power BI and stored in the Power BI file. The report works faster because the
data is loaded in-memory, but it requires manual or scheduled refreshes to update. Direct Query Mode: Data is
• queried directly from the source in real time without being imported. This allows for real-time reporting but may
have performance issues with large datasets, as queries are run every time you interact with the visuals.

2. What is Power BI Pro, and how does it differ from Power BI Premium?
Answer:
• Power BI Pro: A paid license allowing users to share reports and collaborate with others, publish to Power BI
Service, and integrate with other Microsoft services.
• Power BI Premium: Offers dedicated cloud resources and higher capacity for large datasets, allowing sharing
across the organization without the need for individual Pro licenses. It includes additional features like paginated
reports and AI capabilities.

3. How do you schedule data refresh in Power BI Service?


Answer: To schedule a data refresh in Power BI Service:
1. Navigate to Datasets in Power BI Service.
2. Select the dataset you want to refresh.
3. Go to Settings → Scheduled Refresh.
4. Configure the frequency (daily/weekly) and time for the refresh. You must ensure that the data source supports
refresh and configure the Power BI Gateway for on-premises data.

4. How do you implement row-level security (RLS) in Power BI?


Answer: To implement RLS in Power BI:
1. In Power BI Desktop, go to the Modeling tab and select Manage Roles.
2. Create roles based on specific conditions (e.g., filtering data by region or department).
3. Assign users to these roles in Power BI Service.
4. Once published to Power BI Service, users will only see data relevant to their roles.

5. What are measures in Power BI, and how are they different from calculated columns?
Answer:
• Measures: Used to perform calculations on aggregated data, dynamically recalculating values as you interact
with visuals. They are calculated at query time and are not stored in the data model.
• Calculated Columns: These are added to a table in Power BI using DAX expressions. They are calculated row
by row and stored in the data model, increasing its size.

6. What are some best practices for creating a data model in Power BI?
Answer:
• Use a Star Schema for better performance and easy maintenance.
• Create relationships between tables rather than duplicating data.
• Avoid creating complex calculated columns that can slow down performance.
• Use proper naming conventions for tables and fields to ensure readability.

Regularly check and clean up unused fields or tables.

4
Andrey Hakobyan
@AndreyHakobyan

7. How do you optimize the performance of a Power BI report?


Answer:
• Use Import Mode instead of Direct Query for faster performance.
• Optimize your data model by using relationships efficiently and avoiding unnecessary columns.
• Reduce the size of datasets by removing unused columns and filtering data at the source.
• Use aggregations to pre-summarize data for fast querying.

Optimize DAX formulas by reducing the complexity of calculations.

Minimize the use of high-cardinality columns.

8. What is Power Query M Language, and when do you use it?


Answer: Power Query M Language is a functional language used in Power Query to perform data extraction,
transformation, and loading (ETL) tasks. It allows for more complex data transformations than the standard UI. M is
used when advanced data manipulation is required, such as creating custom filters or performing complex joins.

9. How do you use bookmarks in Power BI?


Answer: Bookmarks in Power BI allow you to capture the current state of a report page (filters, visuals, etc.) and save
it for later use. They are used for:
• Creating navigation within reports.
• Highlighting certain data points or scenarios.
• Presenting a storytelling experience by moving through different views of the data.

10. How do you perform data transformation in Power BI?


Answer: Data transformation in Power BI is primarily done using Power Query. The most common transformation steps
include:
• Filtering data (e.g., removing duplicates, nulls).
• Splitting columns (e.g., split by delimiter).
• Merging and appending queries.
• Pivoting and unpivoting data.

Grouping data to create summaries.

Changing data types (e.g., converting text to numbers).

11. How do you handle relationships in a star schema versus a snowflake schema in Power BI?
Answer:
• Star Schema: One central fact table connected to multiple dimension tables. It is simpler and performs better in
Power BI.
• Snowflake Schema: Dimension tables are normalized into additional tables. While it reduces data redundancy,
it can make querying and reporting more complex and slower than the star schema.

12. Explain the concept of a measure in DAX.


Answer: A measure in DAX is a formula that performs calculations on your data, typically aggregating information.
Measures are used to calculate totals, averages, and other metrics dynamically, depending on filters and slicers applied
in the report. They are optimized for performance and are calculated at the time of query execution.

13. What is the purpose of the Power BI service (app.powerbi.com)?


Answer: The Power BI Service (app.powerbi.com) is a cloud-based platform where users can:
• Publish reports created in Power BI Desktop.
• Share reports and dashboards with other users.
• Set up data refresh schedules.
• Collaborate in workspaces.

Access shared reports from anywhere via web or mobile apps.
5
Andrey Hakobyan
@AndreyHakobyan

14. How do you configure data alerts in Power BI dashboards?


Answer: Data alerts can be set up on specific visuals in Power BI dashboards (such as cards, gauges, and KPIs). To
configure:
1. Open the dashboard on Power BI Service.
2. Select a visual that supports alerts.
3. Click on the ellipsis (three dots) and select Manage Alerts.
4. Set conditions for when an alert should be triggered (e.g., if a KPI goes above or below a certain threshold).
5. Power BI will send an email or push notification when the condition is met.

15. Explain how to use themes and custom visualizations in Power BI.
Answer:
• Themes: Power BI allows you to customize the appearance of reports by applying a theme. You can use
predefined themes or create custom JSON theme files to control colors, fonts, and visual styles across the entire
report.
• Custom Visualizations: You can import custom visuals from Microsoft’s AppSource or develop your own using
libraries like D3.js. These visuals can be used to enhance reports with unique data presentation formats.

16. What is the difference between Power BI Desktop and Power BI Report Server?
Answer:
• Power BI Desktop: A free tool used to design and create reports locally. Reports can be published to the Power
BI Service or Power BI Report Server.
• Power BI Report Server: An on-premises solution for hosting and managing Power BI reports within your
organization’s infrastructure. It is used by organizations that require the ability to keep data and reports on their
own servers rather than the cloud.

17. How do you integrate Power BI with Excel or SharePoint?


Answer:
• Excel Integration: Power BI can import data directly from Excel files (.xlsx, .xls) or connect to Excel workbooks
hosted in SharePoint or OneDrive. You can also use Excel as a data source or visualize Excel data within Power
BI using the “Analyze in Excel” feature.
• SharePoint Integration: You can connect to SharePoint lists or document libraries from Power BI. This allows
data stored in SharePoint to be imported and transformed in Power BI reports and dashboards.

18. What are Power BI templates, and how do you use them?
Answer: Power BI templates (.PBIT files) are reusable report files that contain the report’s structure (data model,
visualizations, DAX measures) but without the actual data. You can share templates with others so they can use them
with their own data sources. Templates save time in developing reports with similar structures or layouts.

19. What are parameters in Power BI, and how do you implement them?
Answer: Parameters in Power BI allow users to make input choices that dynamically adjust data or queries in a report.
For example, you can create a parameter to filter data by date range or region. To implement:
1. Go to Power Query Editor.
2. Create a new parameter under Manage Parameters.
3. Use the parameter in queries or visuals to filter or dynamically change the data.

6
Andrey Hakobyan
@AndreyHakobyan

Advanced Level
1. Explain how you would implement incremental refresh in Power BI.
Answer: Incremental refresh is used to refresh only the new or updated data rather than the entire dataset. To implement
it:
1. Define range parameters in Power Query (StartDate, EndDate).
2. Filter the data using these parameters.
3. In Power BI Service, configure Incremental Refresh in the dataset settings by specifying the refresh policy (e.g.,
refresh data for the past 1 month and archive data older than 12 months).

2. What are advanced DAX functions you have used, and how do they improve performance?
Answer: Some advanced DAX functions include:
• CALCULATE(): Modifies the context in which data is aggregated.
• SUMX(): Calculates the sum of an expression over a table.
• FILTER(): Returns a table filtered by an expression, used to manipulate data context.
• ALL(): Removes filters from columns or tables, often used in ranking calculations. These functions help
improve performance by optimizing how data is aggregated and allowing efficient context management.

3. Explain the use of the Power BI REST API.


Answer: The Power BI REST API allows developers to programmatically interact with Power BI Service for tasks like:
• Embedding reports and dashboards in custom applications.
• Automating tasks such as dataset refresh, report creation, or updating Power BI workspaces.
• Retrieving user activity data (e.g., who has accessed or modified a report).
• Managing and pushing datasets into Power BI from external applications. It provides endpoints for reports,
datasets, groups, and other Power BI resources.

4. How would you handle performance issues when using Direct Query mode in Power BI?
Answer: To optimize Direct Query performance:
• Limit the amount of data queried by filtering the dataset.
• Use aggregated tables for summary-level data and switch to detail tables only when needed.
• Optimize queries on the source database by creating indexes or partitioning large tables.
• Reduce the complexity of DAX queries, avoiding row-by-row calculations.

Enable query folding to push transformations back to the data source.

Minimize the use of complex relationships and calculated columns.

5. What are the different data connectivity modes in Power BI, and when should you use each?
Answer:
• Import Mode: Best for static or periodically updated data. Data is imported into Power BI and stored in-memory,
providing the fastest performance.
• Direct Query: Suitable for real-time reporting where data size is too large to be imported or the data needs to be
always up-to-date. Performance can be slower compared to Import Mode.
• Live Connection: Used to connect to SSAS (SQL Server Analysis Services) models without importing data.
This is ideal for enterprise-level reports where the data model is centrally managed.

6. How do you configure data gateways for on-premises data sources in Power BI?
Answer: To configure a gateway:
1. Download and install the On-premises Data Gateway on a local server.
2. In Power BI Service, under Manage Gateways, configure the gateway and add data sources (e.g., SQL Server,
SharePoint).

7
Andrey Hakobyan
@AndreyHakobyan

3. Set users' permissions to access the gateway.


4. Once set up, use the gateway for scheduled data refresh or real-time reporting for on-premises data.

7. What is the importance of the Common Data Model (CDM) in Power BI?
Answer: The Common Data Model (CDM) is a standardized, extensible data schema published by Microsoft that defines
entities, attributes, and relationships. It simplifies data integration across various applications and services (Power BI,
Azure, Dynamics, etc.). By using CDM:
• Data becomes more interoperable across platforms.
• It ensures consistent data definitions, which are critical for analytics and machine learning models.
• It facilitates collaboration between departments by using the same data definitions.

8. Explain the process for deploying and sharing Power BI content with Power BI apps.
Answer: To deploy and share content using Power BI apps:
1. Publish the report or dashboard to a Power BI Workspace.
2. In the workspace, configure access permissions for users or groups.
3. Create an app for the workspace, which packages all reports, dashboards, and datasets into a single view.
4. Share the app with users by sending a link or assigning it to specific users in your organization.

9. How do you handle many-to-many relationships in Power BI?


Answer: Power BI now supports Many-to-Many relationships through the use of a bridge table (intermediate table) or
by configuring cross-filtering on relationships. To handle such relationships:
1. Use a bridge table to map the values between the two tables.
2. Configure the relationship as bi-directional, which allows filters to propagate both ways between the tables.
3. Ensure data integrity by using calculated columns or measures to prevent ambiguity in reporting.

10. Explain the use of calculated tables in Power BI.


Answer: A calculated table is a new table created by using DAX formulas based on existing tables. It is useful when you
need:
• Tables generated from existing data, such as summaries or filtered datasets.
• To create intermediate data models for specific reporting needs. Calculated tables are static unless the data
model is refreshed, and they can be used like regular tables in relationships, measures, and visualizations.

11. What are composite models in Power BI, and how do they work?
Answer: Composite models allow you to combine data from different data sources (Import Mode and Direct Query) in
the same report. This gives flexibility by:
• Using Import Mode for historical data (better performance).
• Using Direct Query for real-time or frequently updated data. You can model relationships between tables from
both imported and Direct Query datasets, enabling more complex data reporting scenarios.

12. How do you use the DAX function CALCULATE() and why is it powerful?
Answer: The CALCULATE() function in DAX changes the context in which data is evaluated, allowing you to apply
filters or modify the existing ones. It is powerful because:
• It lets you apply complex filters dynamically in measures.
• You can use it to calculate things like filtered sums or conditional averages.
• It can change filter context on columns and measures, making it versatile for creating advanced calculations.

13. How do you set up dynamic row-level security (RLS) based on user roles in Power BI?
Answer: Dynamic RLS is set up to ensure users only see the data relevant to them based on their login. To implement:

8
Andrey Hakobyan
@AndreyHakobyan

1. Create a Users table with usernames and their corresponding roles/permissions.


2. Create a relationship between the Users table and your data table.
3. Use DAX expressions like USERPRINCIPALNAME() to filter data dynamically based on the logged-in user.
4. In Power BI Service, assign roles to the corresponding users or groups.

14. How do you connect Power BI with Azure SQL Database or Azure Data Lake?
Answer: To connect Power BI to Azure SQL Database:
1. Select Azure SQL Database in the Get Data window.
2. Enter the server name and database name.
3. Authenticate using SQL authentication or Azure Active Directory credentials.
4. Once connected, you can import the data or use Direct Query.
To connect to Azure Data Lake:
1. Select Azure Data Lake Storage in Get Data.
2. Enter the account URL and authenticate with Azure credentials.
3. Power Query will let you navigate the folders and files in the lake.

15. Explain how Power BI integrates with other Microsoft tools like Power Automate and Power Apps.
Answer:
• Power Automate: Allows Power BI users to trigger workflows (like sending emails or refreshing datasets) based
on report data. You can add a Power Automate button to Power BI and link it to a flow that automates tasks.
• Power Apps: Can be embedded in Power BI reports. This allows users to take actions based on the report data
directly, such as updating records or inputting new data into a database through a Power App form.

16. What are the advantages and disadvantages of using Direct Query versus Import Mode?
Answer:
• Advantages of Direct Query:
o Real-time data access.
o Does not require large amounts of memory for storing data.
o Ideal for large datasets or scenarios requiring real-time reporting.
• Disadvantages of Direct Query:
o Performance can be slower as every interaction sends a query to the source.
o Limited DAX function support.
o Relies on the performance of the source system.
• Advantages of Import Mode:
o Fast performance since data is stored in-memory.
o Full DAX function support.
o Can work offline as data is stored locally.
• Disadvantages of Import Mode:
o Requires periodic data refreshes.
o Can be memory-intensive for large datasets.

17. How do you use Power BI Report Builder for paginated reports?
Answer: Power BI Report Builder is a tool used to create paginated reports, which are pixel-perfect and designed to
print or export data. To create a paginated report:
1. Install Power BI Report Builder.
2. Connect to a data source (e.g., SQL Server, Power BI dataset).
3. Design the report by dragging and dropping fields into the table or matrix.
4. Apply filters, sorting, and formatting as needed.
5. Publish the report to Power BI Service for sharing.

9
Andrey Hakobyan
@AndreyHakobyan

18. Explain the use of aggregation tables to optimize query performance in Power BI. Answer: Aggregation tables store
pre-summarized data at a lower granularity, reducing the volume of data that needs to be queried. Power BI
automatically switches to an aggregation table when possible, which improves query performance. To use aggregation
tables:
1. Create a summarized version of your fact table (e.g., sales by month).
2. Set up relationships and mark the table as an aggregation.
3. Power BI will use the aggregation table when querying summary-level data, significantly speeding up
performance.

19. How do you implement custom R or Python visuals in Power BI?


Answer: To implement custom R or Python visuals:
1. Enable the R or Python scripting support in Power BI Desktop.
2. Create a visual by selecting R Script Visual or Python Visual from the Visualizations pane.
3. Write the R or Python code to generate the visual.
4. You can import data from your Power BI model into the script by referencing the data fields, and the output will
be visualized in the report.

20. How do you troubleshoot slow-running queries in Power BI, and what steps would you take to resolve performance
bottlenecks?
Answer: To troubleshoot slow queries:
1. Use the Performance Analyzer in Power BI Desktop to identify slow visuals or DAX queries.
2. Analyze the Query Plan and Query Statistics in SQL Server or the data source to identify bottlenecks.
3. Optimize DAX calculations by reducing complex operations and using efficient DAX functions like SUMX()
and CALCULATE().
4. Reduce data size by limiting unnecessary columns or filtering data at the source.
5. Consider using aggregation tables for large datasets and apply query folding to push transformations to the
source system.

10
Helping DATA SPECIALISTS
prepare for interview
in just 4 DAYS

Andrey Hakobyan
@AndreyHakobyan

DO YOU WANT MY BEST INTERVIEW


PREPARATION “GUIDE” ?

FOLLOW ME

REPOST

COMMENT “GUIDE”

AND I’LL SEND YOU

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy