Professional Documents
Culture Documents
Learn Power BI Step by Step Guide To Building Your Own Reports (CDO Advisors Book 1)
Learn Power BI Step by Step Guide To Building Your Own Reports (CDO Advisors Book 1)
Derek Wilson
CDO Advisors
Learn Power BI
Step by Step Guide to Building Your Own Reports
Learn Power BI
Step by Step Guide to Building Your Own Reports
When the archer misses the mark, he turns and looks for the
fault within himself. Failure to hit the bull's eye is never the
fault of the target.
To improve your aim -- improve yourself.
Gilbert Arland
Derek Wilson
CEO and Founder – CDO Advisors
www.cdoadvisors.com
Copyright © 2020 Derek Wilson
The characters and events portrayed in this book are fictitious. Any similarity to real persons, living or
dead, is coincidental and not intended by the author.
No part of this book may be reproduced, or stored in a retrieval system, or transmitted in any form or
by any means, electronic, mechanical, photocopying, recording, or otherwise, without express written
permission of the publisher.
ISBN-13: 9781234567890
ISBN-10: 1477123456
The sample data file contains 50,000 rows of sales orders for a fictional
bulk wholesale company. Each row represents a single transaction with an
Order ID, Dates, Pricing, Costs and Revenue. As you use this example think
about the existing Excel files or reports your applications generate that would
be good choices for you to build a Power BI report upon finishing this book.
The example file can be found on Google Drive using this link:
https://drive.google.com/drive/folders/1YciOcaPoJacX0L1SkmJHiFcqZAL2VMBe?
usp=sharing
Roadmap to Success
The book is structured to ensure a roadmap to success. Follow along in
each chapter and complete the Step by Step guide. As you become familiar
with Power BI Desktop, go back and try out different options and formats on
your reports. Each section is designed to build upon the next. When you
complete all of the exercises you will have the core knowledge required to
build and publish your own Power BI reports.
3 - The Power BI Ecosystem
What is Power BI?
I often get asked “is Power BI free”. Yes, Power BI has a free pricing
model that gives you full features with limited sharing. You can test the
product and see how it looks on your data with the free license. To get the
most from Power BI you need to upgrade to Power BI Pro.
Power BI Updates
Also, important to note are the regular updates Microsoft releases to
Power BI products and often releases new features each month. Make sure to
keep your version of Power BI up to date to take advantage of new features.
You can follow these updates on the Microsoft Power BI blog
https://powerbi.microsoft.com/en-us/blog/
4 - How to Add Data in Power BI Desktop
In this section, you will connect to the sample Excel file and learn how to
do formatting on columns. You want to format your columns before you
begin building your visualizations. Data Formatting involves setting the data
type of the column as well as the default aggregation if any.
Figure 4.4
3. The Navigator screen now opens that lets you select the worksheets
from the Excel file that you want to import into the model. You
can import 1 or more from the same file during this process. In this
example, select the Sales Data worksheet as shown in Figure 4.5.
Figure 4.5 – Excel Navigator
There are 2 options on the Navigator screen, Load and Transform Data.
Load immediately takes the data from the selected sheet and loads it into
Power BI Desktop. Transform Data opens Power Query Editor. For this
example, click on Load.
Once you are comfortable with Power BI Desktop, come back and explore
using Transform Data and all the available option in Power Query Editor.
4. The data is loaded from Excel into Power BI Desktop and returns
you to the Power BI Canvas now showing a Table in the Fields
menu on the far right. Figure 4.6 shows the Power BI Canvas with
data.
Figure 4.6 – Power BI Canvas with Sales Data Table
Each column from the Excel file has been imported into Power BI and the
data types have been assigned based on scanning each column. While Power
BI does a good job with setting the datatypes, be sure to double check the
columns are accurately reflecting the data in the way that you intend. Figure
4.7 shows a close up on the imported Excel file now loaded into Power BI
Desktop.
Figure 4.7 – Sales Data Loaded in Power BI Desktop
Note the icons of the Calendar and Sigma. Power BI has assigned a date
hierarchy to the Order Date and Ship Date. It has also assigned aggregations
to Order ID and Total Cost through Units Sold. Order ID has been set to a
Count Summarization.
Now that data has been imported. You will see 2 new menu options,
Table tools and Column tools. Click on Order ID and you will be able to see
the Summarization that Power BI determined from the import. In this case,
Count has been selected as shown in Figure 4.8.
Figure 4.8 - Order ID Default Summarization
Click on the other fields with default summarizations to see the assigned
aggregation. Each field is set to Sum. When you add any of these fields to
the report the Summarization that is set is what will be used in the
visualization.
1. Select the Order Date column while in data view. (Notice the
Yellow Bar on the left next to the data table) as shown in Figure
4.9.
Figure 4.9 – Select Order Date for Formatting
Unit Price
Unit Cost
Total Revenue
Total Cost
Total Profit
Figure 4.13 – Select Common Currency Symbols
These columns should now be formatted as shown below in Figure 4.14.
There are two types of Visualizations you can use in Power BI. First are
the default visualizations that are part of Power BI Desktop shown in Figure
5.1.
3. You will now see the Power BI Visuals window they are grouped
by categories and are searchable as shown in Figure 5.3.
5. If successful, you will see the Import custom visual window as seen
in Figure 5.5, click OK to close the window.
6 - Building Reports
Now that you have loaded your data. Formatted it as necessary and know
where the data fields and visualizations are located. It’s time to start building
a report. Take a few minutes to review the Sales Data that you imported to
get familiar with the data that is in the file. What reports would a business
user want from this type of data? What trends would they want to see? What
relationships between the data will be important?
The Sales Trend report uses the Timeline Slicer visualization to build out a
view that lets you see your data over time using a variety of visualizations.
Sales profit and Order Count are shown over time with more details in the
data tables. You can click on any field and all of the visuals will be filtered
to that element.
Figure 6.2 Sales Trends
The KPI Report shows a few different ways you can present KPIs. Often
these types of reports will be used in presentations or handouts so you want
to focus the design on how your team will use the report. I added a logo to
this page only, as it takes of valuable report space if it is not required on
every page.
Figure 6.3 KPI Report Example
The final report is a drill through report that enables you to pass a
parameter by right clicking on a column to this report. It will then be
automatically filtered for that parameter and is very useful to develop reports
that enable self-service.
Figure 6.4 Sales Detail Drill Through
-
Figure 6.5 Rename Page in Power BI
2. Add the map visual to the report by clicking on the map visual,
outlined in red in Figure 6.6.
Figure 6.6 Add Map Visual to Power BI
3. Add fields to the report, Drag Region from the Fields menu to the
Location area under the visualizations area.
4. Then add Order ID to the Size area under the visualizations area as
shown in Figure 6.7.
Figure 6.7 Add Fields to Map Visual in Power BI
2. Add the Timeline Slicer visual to upper right and resize as shown.
The add the Order Date to the Time Field, like Figure 6.11.
4. Add a Sales Trend Line and Stacked Column Chart to the bottom
left as shown in Figure 6.13.
Figure 6.13 Add Sales Trend Line and Stacked Column Chart to Sales Trend
5. Then add the Order Date to the Shared Axis, Total Profit to the
Column Values and Order ID to the Line Values. You report
should look like Figure 6.14.
Figure 6.14 – Add Fields to Line and Stacked Column Chart in Sales Trend
7. Add Sales Channel, Item Type, Units Sold, Total Revenue to the
Values area to populate the tables as shown in Figure 6.16.
8. To increase the size of the font in the data table. Click on the
design button and scroll down to the Grid section as you see in
Figure 6.17.
Figure 6.17 Change Format of Data Table
10. Add another data table to below on the bottom right as shown
in Figure 6.19.
Figure 6.19 Add Additional Data Table to Canvas
11. Add Region, Units Sold, Total Revenue to the Values Area.
Then increase the Text to size 12pt as you did in Step 9. The
completed Sales Trend report is shown in Figure 6.20.
1. Add a new page and rename it KPI Report as shown in Figure 6.21.
2. To add a logo to the report, click on Insert and then the Image
icon as seen in Figure 6.22.
3. Find an image that you want to add in the pop up window as shown
in Figure 6.23. I am using the CDO Advisors logo.
Figure 6.23 Add logo to Power BI Report Page
4. You can resize the image and move it around the canvas. Place it
on the top left.
5. Add a Text Box, to add a title to the report as shown in Figure
6.24.
Figure 6.24 Add Text box to Power BI Canvas
6. Move the text box to the top and add in the title for your report.
CDO Advisors Sales KPIs is shown in Figure 6.25.
8. Add a Card Visualization and move it to the top right next to the
Text Box created in step 7. The Card Visualization is outlined in
red in Figure 6.27.
9. Add Region from the fields list to the Field area in the
Visualizations. This is shown in Figure 6.28.
Figure 6.28 Add Field to Card Visualization
10. To resize the text, scroll to the Data Label area under
Visualizations and change the Text Size to 18pt as seen in Figure
6.29.
Figure 6.29 Resize Data Label
13. Add a KPI Visualization and position it on the left under the
visualizations that were completed as seen in Figure 6.32.
Figure 6.32 Add KPI Visualization to Power BI
14. Add Total Revenue to the KPI card by adding it to the Fields in
the Visualizations area shown in Figure 6.33.
17. The final KPI should look like the example in Figure 6.36.
6.36 Completed KPI Visualization Example
18. Add another KPI Visualization and position it next to the Total
Revenue KPI. Then add Total Cost to the Fields to create a Total
Cost KPI as Shown in Figure 6.37.
Figure 6.37 Add Total Cost to KPI Visualization
19. Add a Gauge to the report from the Visualization and move it
next to Total Cost and add Total Profit to the Field list as shown in
Figure 6.38.
Figure 6.38 KPI Gauge Added to Power BI
20. Add on more KPI to the report to show Units Sold and move it
to the right of the Total Profit Gauge as seen in Figure 6.39.
2. Add a data table to the report and resize it to the full page as seen in
Figure 6.41.
Figure 6.41 Add Data Table and Resize to Page
3. Add Order ID and Order Date to the data table fields as shown in
Figure 6.42. By default, Power BI added Order ID as a Count and
Order Date with a hierarchy. For this detail report, you want to see
each row not aggregations.
Figure 6.42 Add Order ID and Order Date to Data Table
Figure 6.44 Change Order Date from Date Hierarchy to Order Date
Figure 6.45 Add Remaining Fields to Data Table for Drill Through
You will now have a report that looks like Figure 6.46. and is ready to be
modified to allow drill through from other reports to this report.
Figure 6.46 Completed Drill Through Report
7. To enable drill through add Country, Item Type and Region to the
Drill Through area. Scroll down on the Fields list under
Visualization to see the Drill Through options as shown in Figure
6.47.
Figure 6.47 Drill through area under Visualizations
Any report visualization on the prior 3 pages that have Country, Item Type
or Region will be able to filter this report enabling a user to perform self-
service analytics.
Power BI creates the ability to drill down and drill up in your data to
enable faster analysis and user self-service. Using the Total Profit and Order
ID by Year you will learn to drill into the data to get different views on the
fly.
1. Open the Sales Trends report
2. Move the cursor over the Total Profit and Order by Year and you
will see a menu popup on the top as shown in Figure 7.3.
Figure 7.3 Drill Options Menu on a Visualization
3. These are the available options on this visualization. The ones that
have arrows indicate what you can do on the visualization. Click
on the side by side down arrows to drill down to the next level of
the hierarchy. In this case Quarters as shown in Figure 7.4. All
data from 2010 to 2017 is shown at a quarterly level.
Figure 7.4 Drill down to quarters
6. To change the level of detail on the bar graph click on the Expand
Hierarchy arrow (4th from left on the menu) to see quarters for
these 2 years as seen in Figure 7.6.
Figure 7.6 Drill Down to Next Level in Hierarchy Quarter
7. To drill down to months, click on the same down arrow and you
will see months as shown in Figure 7.7.
Figure 7.7 Drill Down to Next Hierarchy Level Month
8. To get back to the upper level of the hierarchy, click the up arrow.
Users can navigate any data built with a hierarchy in this way.
9. Drill up to the top level at year and then click the single down
arrow it will change to a circle background to enable drill down.
This option lets you drill into a single area. Then click on 2016.
As you see in Figure x7.8, you only drill down into the quarters in
2016.
Figure 7.8 Drill into 2016 By Quarter
11. To turn drill down off, click on the single down arrow again.
2. All the visuals are not filtered to Online sales only. Click on
Online Sales to turn the filter off.
3. Now click on Europe in the bottom right data table. This will filter
the results to only sales in Europe as shown in Figure 8.3.
Figure 8.3 Filter on Europe
4. To add another region to the filter, hold down CTRL and select
Asia. The report is now filtered to Europe and Asia as seen in
Figure 8.4. The same process works on graph visualizations
Figure 8.4 Filter on Europe and Asia
5. To export the results move to the top of the data table and click the
ellipse (…) and you will see a window with options. Select Export
Data as show in Figure 9.3.
Figure 9.3 Export Data using Ellipse
6. A new window opens that lets you save the file as seen in Figure
9.4.
4. Select the Sales Trends report. Then change the time to 2013 to
2016, select online sales in the upper right chart as seen in Figure
10.8.
Figure 10.8 Sales Trend on PowerBI.com
Conclusion
By completing the exercises in this book. You have learned the core
components of Microsoft Power BI Desktop and PowerBI.com. The skills
you have learned will enable you to access data, build interactive reports and
start to deliver self-service reporting solutions to yourself or others in your
organization. Often the hardest part of learning a new solution is how to get
started. While you have touched on the core elements of Power BI. There is
a lot more for you to explore. I encourage you to use what you have learned
and continue to expand your knowledge in data and analytics with Power BI.
I founded CDO Advisors to help any size company get more value from
their data. Too often only large companies that can afford teams of business
intelligence developers and large capital expense traditional consultants
charge for analytics projects.
Our BI as a Service Model lets you get expert Power BI consulting for a
fixed monthly cost so you can control your budget and get value quickly.
Buy the block of hours you need to make progress on your projects at a pace
and price you can afford.
Contact me for details [email protected].
www.cdoadvisors.com