Лабораторная работа
Тема: Power BI
1
TABLE OF CONTENTS
IINTRODUCTION...................................................................................................................................3
GOALS AND OBJECTIVES...................................................................................................................3
TASKS.......................................................................................................................................................3
TOOLS REQUIRED..................................................................................................................................3
1 THEORETICAL INSTRUCTIONS......................................................................................................4
1.1 Use Power BI.................................................................................................................................4
1.2 Explore the flow of Power BI........................................................................................................5
1.3 Building blocks of Power BI.........................................................................................................5
1.4 Create a semantic model................................................................................................................5
1.5 Create visualizations in a report.....................................................................................................5
1.6 Create a dashboard.........................................................................................................................6
1.7 Tour and use the Power BI service.................................................................................................7
1.8 Organize items with workspaces....................................................................................................7
1.9 Explore sample reports...................................................................................................................8
1.10 Distribute content.........................................................................................................................9
1.11 Explore template apps.................................................................................................................10
1.12 Tip..............................................................................................................................................10
1.13 Refresh a semantic model...........................................................................................................11
2 STEP-BY-STEP GUIDES...................................................................................................................12
2.1 Installing Power BI Desktop........................................................................................................12
2.2 Connecting to Data Sources.........................................................................................................12
2.3 Data Transformation and Modeling.............................................................................................14
2.4 Creating Visualizations and Reports............................................................................................16
2.5 Publishing Reports and Creating Dashboards..............................................................................40
SUMMARY.............................................................................................................................................43
2
IINTRODUCTION
Microsoft Power BI is a complete reporting solution that offers data preparation, data
visualization, distribution, and management through development tools and an online
platform.
Power BI can scale from simple reports using a single data source to reports requiring complex
data modeling and consistent themes. Use Power BI to create visually stunning, interactive
reports to serve as the analytics and decision engine behind group projects, divisions, or entire
organizations.
Power BI is an essential tool to data analysts and their organization; however, all data
professionals benefit from understanding how Power BI works to explore and present data
insights within organizations.
GOALS AND OBJECTIVES
Goals
- Enable students to effectively utilize Microsoft Power BI for data analysis and visualization.
- Equip students with practical skills for creating comprehensive and insightful dashboards.
Objectives
- Understand the components and capabilities of Microsoft Power BI.
- Learn the workflow for creating reports and dashboards.
- Gain practical skills in transforming data, creating semantic models, and visualizing data
effectively.
- Master techniques for distributing Power BI content within organizations.
TASKS
- Install and familiarize yourself with Power BI Desktop.
- Connect and prepare data for analysis.
- Build a semantic data model.
- Create interactive visualizations.
- Develop a comprehensive Power BI dashboard.
TOOLS REQUIRED
- Microsoft Power BI Desktop
- Microsoft Power BI Service (accessible through school or work account)
- Sample CSV dataset
- Microsoft Excel (optional, for data pre-processing)
- Computer with internet access
3
1 THEORETICAL INSTRUCTIONS
1.1 Use Power BI
In order to create reports with Power BI, you must first understand the tools necessary. There are
three primary components to Power BI:
- Power BI Desktop (desktop application)
- Power BI service (online platform)
- Power BI Mobile (cross-platform mobile app)
Power BI Desktop is the development tool available to data analysts and other report creators.
While the Power BI service allows you to organize, manage, and distribute your reports and
other Power BI items. Power BI Desktop is available to download for free either through the
Windows store or directly online.
You can access the Power BI service at app.powerbi.com with a school or work account. If your
organization doesn't already use Power BI, you can still explore the service by getting a free
trial or signing up for a free Microsoft 365 Developer account.
Power BI Mobile allows consumers to view reports in a mobile-optimized format. You can create
these optimized report views in Power BI Desktop.
4
1.2 Explore the flow of Power BI
There's a common flow when creating reports with Power BI. First, you start with Power BI
Desktop to connect to data and create the report. Then you publish the report to the Power BI
service and distribute to consumers.
The flow of Power BI is:
1. Connect to data with Power BI Desktop.
2. Transform and model data with Power BI Desktop.
3. Create visualizations and reports with Power BI Desktop.
4. Publish report to Power BI service.
5. Distribute and manage reports in the Power BI service.
The Power BI service also allows you to create high-level dashboards that drill down to reports,
and apps to easily group related reports to users in a simple format.
1.3 Building blocks of Power BI
The building blocks of Power BI are semantic models and visualizations. Create a semantic
model and then use visuals to build a report. Let's explore these items in more detail and how
they relate to the flow of Power BI.
1.4 Create a semantic model
A semantic model consists of all connected data, transformations, relationships, and calculations.
To follow the flow of Power BI, you first connect to data, transform data, and create
relationships and calculations to create a semantic model.
First, connect to as many data sources you need. Then clean and transform the data to your needs.
Add relationships between tables and calculations to extend the semantic model. After all of
that, now you can create a report.
1.5 Create visualizations in a report
5
In Power BI Desktop, when you create a visualization (also called visual), you add it to
the canvas for a report page. Choose your visualizations to build pages in your report. It's ideal
to keep each page simple with related data, so consumers can easily see the insights.
Power BI is a low-code solution, which means that you can "drag and drop" data field directly
onto the canvas. Power BI will choose a visual for your data field. You can easily change
between visuals for the same fields, and add or remove data fields to the visual.
One of the most valuable features of Power BI reports is the interactivity between visuals.
Consumers can select different data points in the visual and see how that affects the other
visuals. Depending on your design, they can also drillthrough from one visual to more detail or
filter based on different fields in the report.
Once you're satisfied with your report, you publish it to the Power BI service.
1.6 Create a dashboard
In the Power BI service, you can also create dashboards after you've published a report.
Dashboards consist of a single page made up of tiles. Add tiles to a dashboard by pinning a
visual in a report to the dashboard. Tiles aren't interactive like visuals, so when a user interacts
with the tile, they go to the underlying report for more information.
6
Dashboards are an excellent way to provide high-level information to consumers. Similar to a
dashboard in a vehicle, include the most important information in a dashboard. Then
consumers can go to the report for more details.
To recap, the building blocks of Power BI are semantic models and visuals. Using Power BI
Desktop, you create the semantic model and use visuals to create reports.
In the Power BI service, you can distribute content to your consumers and use reports to create
dashboards.
1.7 Tour and use the Power BI service
Now that you understand how to create a report, let's explore the Power BI service. The Power BI
service provides a simple and interactive user experience to take your data analytics to the next
level.
1.8 Organize items with workspaces
7
Workspaces are the foundation of the Power BI service. When publishing any report, you must
choose a workspace. By default, every user has access to My workspace, which is ideal only
for testing. When you want to share content with others, always create and use a shared
workspace.
1.9 Explore sample reports
If you haven't created a report yet, Power BI offers several sample reports for you to explore.
These reports load to My workspace so you can explore privately. You can access sample
reports in the Learn section of the navigation pane.
8
1.10 Distribute content
In a workspace, you can create an app, which provides consumers a simplified interface to access
reports and dashboards. In the app configuration, you set up the app, select the content to
include (limited to the current workspace), and choose your audience.
Once you create an app, you must update the app after each change to items in the workspace. The
requirement to update the app allows you to control what version of the content is visible to
your audience.
9
Apps are the ideal sharing solution within any organization. While you can grant access to the
workspace, workspace permissions may grant users access to more content than desired.
Sharing individual items also presents a problem if you make changes you don't want
consumers to see yet.
1.11 Explore template apps
Now that you understand what an app is, let's look at template apps. Template apps allow you to
find an existing app that suits your needs and then you connect your data. These apps can be a
great way to quickly share insights with minimal effort.
10
1.12 Tip
To access template apps, select the Apps icon from the left navigation pane > Get apps > Template
apps.
In the following screenshot, we've installed the GitHub template app and have expanded the
report. We can see different report pages, including Top 100 Contributors and Pull Requests. If
your organization is using GitHub, using this template app can easily support your needs
without starting from the beginning.
11
1.13 Refresh a semantic model
In order to support your ever-changing data, you can configure scheduled refreshes of your
semantic models in the Power BI service. On-demand refreshes are also available.
2 STEP BY STEP GUIDE HOW TO CREATE YOUR OWN DASHBOARD
IN POWER BI
2.1 Installing Power BI Desktop
1. Download Power BI: https://www.microsoft.com/en-us/download/details.aspx?id=58494
2. Open Power BI
3. Choose “Blank report”
12
2.2 Connecting to Data Sources
4. Choose “Get data”
5. File -> Text/CSV -> Connect
6. Downloaded file -> Open
13
2.3 Data Transformation and Modeling
7. Transform Data
14
8. Home -> Split Column
9. By Delimiter
10. Set parameters like in the photo -> OK
15
11. What we have got:
16
12. Home -> Use First Row as Headers
13. What we have got:
14. Home -> Close & Apply
2.4 Creating Visualizations and Reports
Formatting and Layout
15. Format page
17
16. Set parameters in “Canvas background” section
17. Insert -> Shapes -> Rounded Rectangle
18
18. Change the shape and color, according to the photo
19. Turn off the border
19
20. Turn on the shadow
21. Copy previous figure and it these parameters
20
22. Copy figure 3 times
23. Change “Transparency” parameter
24. Home -> Format painter
25. And make same style for each figure
21
26. Make all these shapes, using copy-paste combination
Adding Text and Additional Shapes
27. Insert -> Text Box
22
28. Set text with these properties
29. Repeat it for next Text box
30. Turn off the background property
31. Insert -> Shapes -> Oval
23
32. Change the color
33. Turn off the border
34. Put it in this place
Data Entry and Measures
35. Home -> Enter data
24
36. Set a name for the table and click “Load”
37. New measure
25
38. Write this DAX and press enter
39. New measures
40. Percentage measures:
41. Result Measure table:
42. Click on the “TotalEmp”
26
43. Click om “Card”
44. Set the formatting like these
27
45. Custom title
28
46. Set card in the right place, turn off the background
47. Repeat steps 42-46 for Male, Female or just copy previous end edit it
48. Add percentage metrics
29
Images and Additional Columns
49. Insert -> Image
50. Add images
51. Home -> Transform data
52. Add column -> Conditional Column
53. Set parameters like in the photo -> OK
30
54. Delete column “YearSinceLastPromotion” by pressing delete button
31
55. Home -> Close & Apply
56. Add new measures
Chart Visualizations
57. Copy previous figures and change measure according to the photo
32
58. Add the line
59. Home -> Transform data
60. Add Column -> Column From Example -> From Selection
61. Rename column -> write first value -> OK
62. Repeat same actions for “JobLevel” column, create “Job Levels”
33
63. Home -> Close & Apply
64. Choose measures: Service year, TotalEmp -> choose Stacked bar chart
34
65. Turn off titles for Y-axis and X-axis
35
66. Change the color
67. Turn on data labels
36
68. Add these 4 measures into “Tooltips” section
37
69. Choose measures: Job Levels, TotalEmp -> Stacked column chart
70. By using “Format painter” apply all the formatting for the new chart
38
71. Apply new color
72. Home -> Transform data -> Add Column-> Conditional Column -> Set parameters -> OK
39
73. Home -> Close & Apply
74. Add new measures
75. Apply new measures for next shapes
76. Home -> Transform data -> Add Column -> Conditional Column -> Set parameters -> OK ->
Home -> Close & Apply
77. Choose measures: Distance status, TotalEmp, Donut chart
40
2.5 Publishing Reports and Creating Dashboards
78. Apply formatting
Result:
41
42
This Power BI dashboard, titled "HR Dashboard Full Insight," provides a snapshot of employee data for
an organization with 1,470 total employees. Key metrics include:
- Gender Distribution: 882 males (60%) and 588 females (40%).
- Promotion Status: 72 employees (4.9%) are due for promotion, while 1,398 (95%) are not.
- Service Years: Most employees have 1 year of service (171), followed by 2 years (128), with fewer in
longer tenures (e.g., 90 with 9 years).
- On-Service and Retrenched: 1,353 employees (92%) are on service, and 117 (8%) are retrenched.
- Total Employees by Job Levels: The majority are at Level 1 (543) and Level 2 (524), with fewer at
higher levels (e.g., 72 at Level 5).
43
- Distance Status: A pie chart shows the distribution of employees by distance status (Very Far vs. Close),
though specific percentages aren't labeled.
The dashboard uses red, orange, and gray colors to highlight key figures and trends.
SUMMARY
Microsoft Power BI offers a complete data analytics solution that includes data preparation,
visualization, and distribution. Semantic models and visualizations are the building blocks of
Power BI.
The flow and components of Power BI include:
- Power BI Desktop for creating semantic models and reports with visualizations.
- Power BI service for creating dashboards from published reports and distributing content with apps.
- Power BI Mobile for on-the-go access to the Power BI service content, designed for mobile.
By using Power BI, you can make data-informed decisions across your organization.
44