Power BI Guide
Power BI Guide
•Table of Contents
1. Data Visualization:
o It allows users to create various types of visuals, such as
bar charts, line graphs, pie charts, and geographic maps.
o These visuals help highlight trends and patterns that might
otherwise be hidden in raw data.
2. Interactive Reports:
o Reports created in Power BI are dynamic and interactive.
Users can drill down into data, apply filters, and adjust
visuals in real-time.
o Power BI lets users connect multiple visuals so that
interactions in one visual (e.g., selecting a bar in a chart)
update the data in other visuals.
3. Data Sharing:
o Once reports are created, they can be published and shared
via the Power BI Service. This enables teams to collaborate
and make data- driven decisions seamlessly.
2. Power BI Interface
Power BI Desktop is the primary tool for creating data reports and
visualizations. Its interface is user-friendly and designed to help you
organize, analyze, and visualize data effectively. Let’s break it down.
2. Canvas (Center):
o This is the workspace where you design reports
and build visualizations.
o You can drag and drop fields, visuals, and slicers to
create an interactive layout.
3. Panes (Right Section):
o Data Pane:
Displays all the datasets and fields (columns)
available for creating visuals.
You can drag fields from here to visuals on the
canvas.
o Visualizations Pane:
Contains all the visual types (e.g., bar charts, pie
charts, maps).
You can also customize visuals (e.g., colors, axes,
labels) in this pane.
o Filters Pane:
Allows you to filter data at the report, page, or visual
level.
Filters help focus on specific subsets of data for analysis.
1. Report View:
o This is the default view where you design and build reports.
o You can add visuals, slicers, and other elements to create
interactive dashboards.
o Use this view to focus on how your data is presented and
visualized.
2. Table View:
o This view allows you to inspect the raw data that you’ve
imported into Power BI.
o You can view individual tables, clean up data, and make
adjustments like renaming fields or creating calculated
columns.
o It's great for verifying data accuracy and performing quick
checks.
1. Table view icon. Select this icon to enter the Table view.
2. Data Grid. This area shows the selected table and all columns
and rows in it. Columns hidden from the Report view are greyed
out. You can right-click on a column for options.
3. Formula bar. Enter Data Analysis Expression (DAX)
formulas for Measures and Calculated columns.
4. Search. Search for a table or column in your model.
5. Fields list. Select a table or column to view the data grid.
3. Model View:
o This view focuses on relationships between tables in your
dataset.
o You can create and manage relationships using drag-
and-drop connections.
o It’s particularly useful for building logical data models, like
connecting fact tables and dimension tables.
3. Connecting to Data Sources in Power BI
Power BI’s ability to connect to various data sources makes it a versatile
tool for analyzing and visualizing data. Let’s explore how to connect to
different sources and understand the two main connection modes: Import
and Direct Query.
1. Import Mode:
How it works:
o Power BI copies the data from the source and stores it in its
internal memory.
o Reports and visualizations are generated from this
imported data.
Advantages:
o Faster performance since all the data is loaded into Power
BI.
o Allows you to use advanced transformations, modeling, and
calculated columns.
o Works offline because the data is stored locally.
Disadvantages:
o Large datasets may take time to load and consume
significant memory.
o Data needs to be manually refreshed to stay updated.
How it works:
o Power BI queries the data source directly, fetching
results as you interact with reports.
o No data is stored in Power BI; it relies entirely on the live
connection.
Advantages:
o Always displays the most up-to-date data.
o Suitable for real-time analytics when connected to live
systems.
o Requires less memory since no data is stored locally.
Disadvantages:
o Slower performance as every interaction triggers a query to
the source.
o Limited access to certain Power BI features (e.g.,
some transformations and DAX functions).
1. Removing Duplicates
Ensuring each column has the correct data type is critical for
accurate calculations and visualizations.
Steps:
1. Select the column you want to modify.
2. Click the small icon next to the column name or use
the Data Type
dropdown in the ribbon.
3. Choose the appropriate data type (e.g., Text, Whole
Number, Date/Time).
4. Power Query will update the data type for the
column.
3. Merging Queries
Merging queries allow you to combine data from two or more tables
based on a common column (similar to SQL joins).
Steps:
1. In the Power Query Editor, go to the Home tab and select
Merge Queries.
2. Choose the two tables you want to merge and the column(s)
on which to match them.
3. Select the type of join (e.g., Inner, Outer, Left, Right).
4. Click OK to create the merged query.
4. Appending Queries
For the example in this article, you use the following two tables with
sample data:
To append these tables, first select the Online Sales table. On the
Home tab, select Append queries, which creates a new step in the
Online Sales query.
The Online Sales table is the primary table. The table to append to the
primary table is Store Sales.
Append three or more tables
In this example, you want to append not only the Online Sales
and Store Sales tables, but also a new table named Wholesale
Sales.
The new approach for this example is to select Append queries as new, and
then in the Append dialog box, select the Three or more tables option
button. In
the Available table(s) list, select each table you want to append, and then
select Add. After all the tables you want appear in the Tables to
append list, select OK.
After you select OK, a new query is created with all your tables
appended.
1. One-to-One Relationship:
o Each record in Table A has a corresponding record in Table B.
o Example: A table of employees linked to a table of employee
details.
o Representation: A single line between the tables in Model
View.
2. One-to-Many Relationship:
o A record in Table A is related to multiple records in Table B.
o Example: A Customers table linked to an Orders table (one
customer can place many orders).
o Representation: A line with a “1” on one side and an asterisk
(*) on the
other.
3. Many-to-Many Relationship:
o Records in Table A can relate to multiple records in Table B,
and vice versa.
o Example: A Products table linked to a Sales table in
scenarios where some products are sold in bundles.
o Requires a bridging table or proper handling in the data
Overview ofmodel.
Star Schema vs. Snowflake Schema
1. Star Schema:
Structure:
o Centralized Fact Table surrounded by Dimension Tables.
o Example: A Sales fact table with dimensions like Customers,
Products, and Dates.
Advantages:
o Simple and easy to understand.
o Faster performance due to fewer joins.
o Ideal for Power BI and other BI tools.
Disadvantages:
o May involve duplicate data in dimension tables.
Example:
2. Snowflake Schema:
Structure:
o A more normalized structure where dimension tables are
further split into sub-tables.
o Example: A Product table split into Product Categories and
Product Subcategories.
Advantages:
o Reduces redundancy and storage requirements.
o Maintains data integrity due to normalization.
Disadvantages:
o Slower performance due to multiple joins.
o More complex to design and manage.
Example:
Which Schema to Use?
1. Charts:
4. Matrices:
Selecting the right visualization ensures your data story is clear and
impactful.
Keep It Simple: Avoid cluttering your report with too many visuals.
Focus on Key Metrics: Highlight the most critical data points.
Use Consistent Colors: Assign colors consistently to categories
(e.g., blue for sales, green for profits).
Limit the Number of Colors: Too many colors can confuse the
audience.
1. Tell a Story:
Arrange visuals in a logical flow to guide users through your
analysis.
2. Provide Filters and Slicers:
Allow users to interact with the data by applying filters (e.g., by
region or time period).
3. Optimize for Performance:
Limit the number of visuals per page to maintain quick load times.
4. Use Titles and Labels:
Add clear titles, legends, and axis labels to make visuals self-
explanatory.
5. Test Responsiveness:
Ensure visuals are well-suited for different screen sizes, especially
if reports will be viewed on mobile devices.
What is DAX?
1. Advanced Calculations:
DAX allows you to create complex business logic beyond basic
aggregation.
o Example: Calculating year-over-year growth or cumulative
totals.
2. Dynamic Insights:
It enables you to create measures that update automatically
based on filters and slicers applied by users.
3. Customization:
You can customize calculations to fit specific business needs,
such as segmenting customers by sales.
1. SUM
2. AVERAGE
3. COUNTROWS
5. FILTER
31
2. In the Data pane, right-click the Sales table, or hover over the
table and select More options (...).
3. From the menu that appears, choose New measure.
Steps for sharing reports with users via email or by sharing a link.
Granting view-only permissions for others to access reports.
Sharing options: Direct sharing, embedding in SharePoint, or
sending a link.
Step-by-step process:
1. Open Power BI Desktop and load your dataset.
2. Click on Modeling → Manage Relationships to ensure your data
model supports incremental refresh.
3. Select the table you want to enable incremental refresh for
and go to
Transform Data (Power Query Editor).
4. In Power Query, click on Manage Parameters to create
parameters for time-based filtering (e.g., "Start Date" and
"End Date").
5. Set the incremental refresh policy by enabling it in the Table
Properties
section.
6. Choose the number of historical data to retain (e.g., last 5
years of data).
7. Define the frequency and range of data refresh (e.g., only
refresh data from the last 1 day).
4. Incremental Refresh in Power BI Service
It’s only supported for datasets that have a date/time column for
filtering the data.
Incremental refresh can only be set for tables in Import mode (not
DirectQuery mode).
Limit the number of visuals: Too many visuals on a report can slow
down performance. Stick to the most essential visuals and keep
your reports simple and focused.
Consolidate visuals: Instead of creating multiple similar visuals, try
combining them into a single visualization (e.g., using stacked bar
charts or combo charts).
Use slicers judiciously: While slicers provide interactivity, too many
slicers can create unnecessary load on the dataset. Use them
sparingly and group
them logically.
Keep visual interactions under control: Be mindful of how visuals
interact with each other (e.g., cross-filtering). Limit cross-filtering
and cross-
highlighting to relevant visuals only.
Avoid excessive data queries: Redundant or inefficient queries can
significantly slow down performance. Use DirectQuery mode
cautiously, as it sends queries to the data source every time a user
interacts with a report.
D. Incremental Refresh
Choose the right visual for the data: Select visuals that are best
suited for the type of data you are presenting. For example, use
line charts for trends, bar charts for comparisons, and pie charts
for parts of a whole.
Limit the number of categories: Avoid using visuals with too
many categories (e.g., more than 10 items in a pie chart or bar
chart). Large numbers of categories can make it difficult for
users to interpret the data effectively.
Use tooltips effectively: Tooltips can provide additional information
when users hover over a visual element. Use them to present
supplementary data
without overcrowding the main report.
Add labels and titles: Ensure each visualization has clear labels and
titles to
guide the user. Add data labels where appropriate to improve
clarity and make the report more user-friendly.
Avoid clutter: Limit unnecessary visual elements like excessive
borders, 3D effects, or decorative images. Stick to the essentials
and let the data tell the story.
Reduce the number of visuals per report page: Too many visuals
on a single page can slow down performance. Break large
reports into multiple pages with a logical grouping of data.
Leverage bookmarks and dynamic visuals: Rather than showing
all data
on a single page, use bookmarks and buttons to toggle between
different views. This keeps the report visually clean and
improves performance.
Set filters for large datasets: For datasets with large amounts of
data, use filters to limit the scope of the data that are loaded into
E. Accessibility and Mobile Optimization
3. Key Takeaways