0% found this document useful (0 votes)
175 views

Tutorial Lesson 01

This document provides an overview of a week-long Power BI training. It will cover extracting and transforming data, building data models, creating calculations and visualizations, and publishing dashboards. The training is designed to help participants build an interactive sales and financial dashboard from start to finish over the course of the week.

Uploaded by

Gowtham Jampani
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
175 views

Tutorial Lesson 01

This document provides an overview of a week-long Power BI training. It will cover extracting and transforming data, building data models, creating calculations and visualizations, and publishing dashboards. The training is designed to help participants build an interactive sales and financial dashboard from start to finish over the course of the week.

Uploaded by

Gowtham Jampani
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 34

POWER BI WEEK – SALES DASHBOARD

Content
Important notes: / / / / / / / / / / / / / / / / / / / 2

What is Power BI and Business Intelligence? / / / / 3

In what areas can I use Power BI? / / / / / / / / / / 3

How can I download Power BI? / / / / / / / / / / / 4

How much is Power BI? 100% free!! / / / / / / / / / 5

Excel vs Power BI / / / / / / / / / / / / / / / / / / 5

The 7 pillars for Mastering Power BI/ / / / / / / / / / 6

Knowing Power BI Layout/ / / / / / / / / / / / / / / 7

Phase 1: Extract/ / / / / / / / / / / / / / / / / / / / 7

Phase 2: Transform / / / / / / / / / / / / / / / / / / 17

Phase 4: Calculation / / / / / / / / / / / / / / / / / / 20

Phase 5: Visuals / / / / / / / / / / / / / / / / / / / / 22

What is Data Storytelling?/ / / / / / / / / / / / / / 22

Recommendations/ / / / / / / / / / / / / / / / / / 22

1
POWER BI WEEK – SALES DASHBOARD

Hey guys!

The day has finally come!

I’m glad to have you here with me! This is the first edition in English besides
the others 4 in Portuguese. All students that took these lessons are now building
dashboards like a Pro with Power BI. You are next!!

Let me know where you are from!! Write in the chat. Also, tag me in your stories
in Instagram so I can share with my connections.

First of all, I’m Leonardo Karpinski and I like to teach Power BI with flowered
shirts! LOL It’s my trademark!

I have students in other countries that speaks Portuguese like Portugal,


Moçambique, Angola, and others. And now I decided to teach in English too! Extend
the horizons!

I already helped more than 16 thousand of people, and I’m here to help you as
well!

Okay, let me show you what we are going to learn during this week. We are going
to build a dynamic and interactive Sales and Financial Dashboard from scratch! That’s
right!

Important notes:
- We will have five lessons, one for each day until Friday at the same time (Brazil
12pm – UTC 3pm – India 8:30pm);

- From today (Monday) to Thursday, the sessions will be recorded, but I will be
live in the chat during the session;

- On Friday I will be live! It will be a great challenge to me!

- The database and materials for today are available in the link in the description;

- In the materials there is also a complete PDF tutorial for every single step I’m
going to present here;

- Pay attention here first, then later you can practice. You will have the video and

2
POWER BI WEEK – SALES DASHBOARD

the PDF to help you;

- All recordings will be available until Sunday;

- I will provide my solution in Power BI (PBIX file) for those who watch Live on
Thursday;

- And last but not least, pretend you paid a large amount of money to participate
in this event, and be committed during this week! I’m pretty sure it will be life-
changing to you!!

Now, I want to know the experience you guys have with Power BI:

1) Never used Power BI

2) Beginner

3) Intermediate

4) Expert

If you never used, congrats for being here! You are starting a very promising
career that is growing more and more.

I’m going to start with the basic questions:

What is Power BI and Business Intelligence?

Power BI is a Microsoft tool to create analysis (data analysis), and BI is a process


for collecting, analyzing and monitor information you would like to compare/track in
your company. The main goal of Power BI/BI is to help you to make better decisions.

In what areas can I use Power BI?

There are no restrictions. All you need is data. I showed some dashboards
for Sales, HR, Sales vs Target, and Logistics. You can see that we have an overall
information and detailed information in the same dashboard, and also make
simulations!

3
POWER BI WEEK – SALES DASHBOARD

How can I download Power BI?

There are 2 options: By using Microsoft Store or on the website.

Go to https://powerbi.microsoft.com/en-us/downloads/ → “Products” → “Power


BI Desktop”

Figure 1: Downloading Power BI

Figure 2 – Downloading Power BI Destktop

4
POWER BI WEEK – SALES DASHBOARD

Figure 3: Download for free

How much is Power BI? 100% free!!

There are two ways to share your dashboards:

With a Pro license ($9.90 month/user) when you need to share reports on the
cloud in a safe way.

FYI: Power BI Service, Cloud and Online are all the same, okay?

or publishing as public. This way anybody can access the information for free (not
really a safe way).

Excel vs Power BI
A really common doubt, right? Both tools are really good for different purposes.
Excel is a report-based tool. Simple to use but too many “copy and paste” techniques.

Power BI is a model-based tool that you can create reports on top of data model.
Once the model is defined, you can build different reports with the same data. You
automate processes.

Excited?! Now let’s get started!! Yay!

5
POWER BI WEEK – SALES DASHBOARD

The 7 pillars for Mastering


Power BI
1) Extraction (the data from the source)

2) Transformation

3) Modelling (create table relationships)

4) Calculation (create measures and we build KPI’s)

5) Visualization

6) Distribution (publishing)

7) Automation

- From 1 to 5 we use Power BI Desktop and it is 100% FREE. This is our


Development Environment.

- From 6 to 7 we use Power BI Service.

- During Power BI Week we will talk mostly about steps 1 to 5.

- Steps 6 and 7 are related to the Power BI Service and I recommend you read the
following blogpost:

https://powerbiexperience.com/en/definitive-guide-power-bi-licensing-free-x-
pro-x-a1-x-em1-x-p1/

6
POWER BI WEEK – SALES DASHBOARD

Knowing Power BI Layout

Report

Data

Model

Figure 4: Options in Power BI

Figure 5: Tool bar

Getting started with the phases!

Phase 1: Extract
Where does data come from?

The data we use in Power BI, usually comes from a database (OLTP database or
database transaction). A database is an organizational collection of data, usually stored
and accessible electronically from a computer system. When databases are more
overly complex, they are often built using a formal design and modeling method.

How do you get the data you work with today? Answer me in the chat:

1) Connecting directly in the transactional database (OLTP)

7
POWER BI WEEK – SALES DASHBOARD

2) Connecting to a Data Warehouse (DW)

3) Through an Excel file connected to the database

4) Extracting reports from the ERP system

5) Filling out spreadsheets manually

So, the first thing to do is to extract the data, just like we did in the video with
our Revenue data. Once extracted, we must transform data (always, always, always
transform before load).

Figure 6: Transform Data

When you click in “Transform data”, it will open a new window, that is the Power
Query Editor.

All the information you see in the formula bar is called “M”. We do not need to
worry about it now.

The best option, in my opinion, to remove empty rows, is to filter the column.

In the example was used the “Order Number” column. When you are going to do
this, you have to be sure about the column information, like this one that has to have
an order number value.

8
POWER BI WEEK – SALES DASHBOARD

Figure 7: Removing Empty Rows

If you made a mistake, you could undo it in the “Applied Steps”.

Figure 8: Delete Applied Steps

9
POWER BI WEEK – SALES DASHBOARD

After doing this, now we must configurate the header.

Figure 9: Using first row as headers

10
POWER BI WEEK – SALES DASHBOARD

You have to be careful because Power BI sometimes applies changes that were
no required. Like for example, the date configuration in Brazil we use dd/mm/yr in the
US mm/dd/yr, also the decimal separation with “ , ” or “ . ”. You can configurate per
locate:

Figure 10: Using Locale

Then adjust for you convenient locale.

Once you did all the transformation you needed, then click on “Close and Apply”.
Now we can start to build our dashboard!!

Let’s start comparing the Sales Amount. To select the table, you want to work
with, you can drag and drop in “Fields” or just check the box.

TIP:
When you create graph and you want to create another one, pay attention
to click outside the graph, otherwise you are going to change it instead of
creating a new one.

11
POWER BI WEEK – SALES DASHBOARD

When we use a clustered bar chart, when you click on the options it changes
according to your selection, see:

Figure 11: Retail information

Figure 12: Wholesales information

12
POWER BI WEEK – SALES DASHBOARD

Figure 13: Online information

Any changes you want to make, you have to use the “Format”.

When you save the file and find it in a folder, you can compare the size of your
file between Power BI and Excel.

Power BI compresses the file, and it works faster than Excel.

Tell me, if you had an Excel with two files, you would have to use the functions
“VLOOKUP” and “XLOOKUP”, but in Power BI is different, is all about modelling,
creating relationships between them.

Just to contextualize, a look up table known as dimensions, is what defines your


business entities such as costumers, products, accounts. It’s your who, what, where
and when.

And the fact tables that usually have lots of rows and less columns, just like in the
example in the video.

Tomorrow we are going to talk more about this!

The “Extract” function is to keep the data you want. Then click on “Text After
Delimiter”, which in this case is after the space.

Inside the “Delimiter” blank you click on the space bar, and “ok”.

13
POWER BI WEEK – SALES DASHBOARD

Figure 14: Format

Figure 15: Extract function

Figure 16: Text After Delimiter function

14
POWER BI WEEK – SALES DASHBOARD

The in the Product ID change the “ABC” to “123 whole number”.

Figure 17: ABC to Whole Number

All set, “Close and Apply”.

That leaves us with two tables, “Product” and “Revenue”, and I want to compare
Sales Amount with Group.

Choose the “Table Chart”, then select “Group” and “Sales Amount”. Remember
you can configurate in “Format”.

It was only possible to make this work because of the relationship that Power BI
creates between the tables, since they have a column in common.

15
POWER BI WEEK – SALES DASHBOARD

Figure 18: Relationship Environment

You can see that when the relationship is deleted, it reflects directly in the chart.

Understanding 1: many

1 stands to one particularly value in the unique table (Product ID), and the “ * ”
for the value that is repeated.

Figure 19: 1: M

16
POWER BI WEEK – SALES DASHBOARD

Phase 2: Transform
What is the correct structure of a table?

- Always columnar; In Power BI in general we cannot have in a single column,


two different types of information.

- Each column must represent a unique type of information.

- Whenever we connect to a data source and to use data, usually it is very we can
say “raw” because there are a lot of information that may or may not need, structured
or not, so we have always to prep them using Power Query, that we can call a “magic
box” since it’s where we structure and “clean” (transform) our data.

- So, it is extremely important to TRANSFORM it before loading into the model.

Power Query is our best friend for this. It is the tool to prepare, transform and
put the data into the right shape

Even better: you do this only once because it automates all your ETL process.
Since the structure remains the same, you won’t need to do it all over again.

Now let’s create some measures?

In order to create a new column, you can right-click on any column and add a
“New Column”.

In the formula bar you use the formula to calculate:

COST = REVENUE[QTY ITEMS] * = RELATED(‘PRODUCT[UNIT COST])

17
POWER BI WEEK – SALES DASHBOARD

To create a new measure, you have to right-click on “Revenue” in “Fields” and


select “New measure”.

Figure 20: Creating new measure

The formula you are going to use is:

REVENUE = SUM(FREVENUE[SALES AMOUNT])

18
POWER BI WEEK – SALES DASHBOARD

After doing so, you can see that in “Fields” there is a calculator in the “Revenue”.

Figure 21: Measure

TIP:
TRY TO AVOID USING IMPLICIT MEASURE.

19
POWER BI WEEK – SALES DASHBOARD

Per what you could see in the video, there are 2 measures: implicit and explicit. I
will give you 3 reasons why the explicit measure is better.

• You can use it along with other measures;

• You must always use a measure instead of a column when you use Values;

• Any measure store data within them.

Today we are going to skip the Modeling phase and talk about it tomorrow.

Phase 4: Calculation
- DAX: Data Analysis eXpressions;

- Filter Context: is the combination of all filters that are applied on the report,
which propagate through the relationships. Doesn’t iterate, but filters;

- Row Context: is when we create a calculated column or when we use iterative


functions (like SUMX). The values are calculated for each detail row. Doesn’t filter but
iterates;

- CALCULATE function: it is the only function that can modify the evaluation
context;

- Syntax: CALCULATE(<expression>, Filter 1, Filter 2... )

We can create columns, measures or tables with DAX:

1) Columns: consume memory and are static calculations. Use only for
information on the Axis or for Filters.

2) Measures: are dynamic and consume only CPU, because they are calculated
on the fly. Use always for Math (numbers that you place in the Values of the visuals);

3) Tables: not used often. It is better to create them in Power Query.

Where is the Power of DAX? 1, 2 or 3?

20
POWER BI WEEK – SALES DASHBOARD

You got it right if you said number 2, creating measures.

Creating a new measure using SUMX function:

COST =
SUMX (
REVENUE,
REVENUE[QTY ITEMS]
* RELATED ( ‘PRODUCT’[UNIT COST] )
)

To calculate the Gross Margin in this case is easy to calculate since is Revenue –
Cost.

Whenever I must divide two measures, I prefer to use the function “DIVIDE”:

% OF GM = DIVIDE([GROSS MARGIN] , [REVENUE])

21
POWER BI WEEK – SALES DASHBOARD

Phase 5: Visuals
What is Data Storytelling?

The main idea of dashboards is they must give the answer is been looked for just
by looking at the analysis, without explaining or any question. It must always be easy
to understand.

The power of building a narrative around a set of data to help convey the
meaning of that data in a powerful and compelling fashion

TIP:
HTTPS://TDWI.ORG/PORTALS/WHAT-IS-DATA-STORYTELLING-
DEFINITION.ASPX

And what is NOT Data Storytelling? See examples of what not to do here: https://
viz.wtf/

Recommendations
1) Be concerned about design – really important!! This is the first thing
people see in your dashboards.

2) Identify your audience – Once you do that, you will have a better idea to:

- Ask how a dashboard will be used and design for next step actions.

- What information does the reader need to be successful? (Key words:


KPI’s – Indicators)

- How much detail does the reader need? You must pay attention to this
one because you will have to change information depending on whom you are going

22
POWER BI WEEK – SALES DASHBOARD

to send to and what are the most important information one needs.

3) Draw a sketch*

- Good design should tell a story with data that does not become
overwhelming with way too much information, clutter, or noise.

- Limit content to fit entirely on one screen.

- Keep your dashboard simple with only a 3 to 5 key values, charts, or


tables. Avoid putting too much information on a dashboard.

- If detail tables are needed, place them on the bottom of the dashboard

4) Choose the right theme and keep consistency. This way the user automatically
associates the color with the information in any other moment of the dashboards.

5) Change the background (WOW effect)

6) Use icons and images to add context (https://logomakr.com). After


downloading the image you need, to insert in Power BI you go to the tool bar, click on
“Insert” and then on “Image” select from where you want to search, choose and use it!

7) Align all visuals properly

8) Choose the right visuals**

An important tip for you: whenever you need to compare values that change over
time, use it in a horizontal, this means time in x-axis.

When you have a category that you want to compare, we use it in the y-axis.

9) Use visualization features from Power BI (tooltip, drill-through, bookmarks...)

23
POWER BI WEEK – SALES DASHBOARD

Tip: * whenever you are building a dashboard, star from the upper bottom and
make it in a “Z” field of vision

Tip: ** Use columns charts for time and bars for categories.

In the “Assets” folder I have provided as a bonus some backgrounds. Use it wisely!
😊 And sure, make the changes you feel appropriates.

Keep in mind that must maintain the same colors for the same subject.

Let’s see how we can even improve our dashboard.

First, change the background.

Go to “Visualizations” → “Page background” → “+ Add image” → Select


the image you want

Figure 22: Changing background

24
POWER BI WEEK – SALES DASHBOARD

Now let’s change the color and theme:

Tool bar – “View” – Choose the theme you think it’s more appropriate for your
information.

Figure 23: Choosing theme

25
POWER BI WEEK – SALES DASHBOARD

Also, we can customize any theme:

Tool bar → “View” → “Customize current theme”

Figure 24: Customizing theme

While I’m building the dashboard, I’m not liking the layout with too many
measures. So, I’m going to create a table to put all measures in the same table.

“Home” tab → “Enter data” → “Create Table” → “Load” → Name the table

Then you will be able to see the table in “Fields”. Select all the measures, drag
and drop to the measures folder.

There are 3 main ways to work with a Date Dimension Table:

26
POWER BI WEEK – SALES DASHBOARD

1. Bring the date table from your source;

2. By creating the data table in Power Query

3. Using DAX

Today we are going to use a function:

DATE = CALENDARAUTO()

Then go to your relationship environment to see if the Date Table was created
and then create a new relationship. In this case is going to be a little more complicated
since there are two date options “Due Date” and “Order Date”.

For our dashboard, since is a Sales Report and I want finance information, it’s
better that we use “Due Date”.

Drag and drop and check to see if the relationship was made correctly.

When we put “Date” in the “Axis” space in “Visualizations”, Power BI automatically


splits in “Year”, “Quarter”, “Month” and “Day”. Since we only need “Month” and “Day”
information, that’s what we are going to keep.

We can see that we cannot almost read the months, right? Let me give you a tip:

Create a new column:

MONTH NAME = FORMAT(DDATE[DATE],"MMMM")

27
POWER BI WEEK – SALES DASHBOARD

But to use it you must be careful because Power BI automatically creates an


alphabetical order, and we have to tell him to go according to the month number.

MONTHNO = MONTH(‘DATE’[DATE])

Then click on “Sort by Column”

Figure 25: Sorting column

28
POWER BI WEEK – SALES DASHBOARD

Now that the “MonthNo” was created you can drag and drop it directly in “Axis”.

To make this dashboard even more interactive, let’s do the following:

Copy the “Operational Revenue – Card” → Open “Filters” → “Filter type” as “Top
N” Inform how many Top N you want (in the example was 1) .

Figure 25: Sorting column

We create a new measure to the title of the best month:

TITLE BEST MONTH = "BEST MONTH: " &


SELECTEDVALUE('DATE'[MONTHNAME])

29
POWER BI WEEK – SALES DASHBOARD

For now let’s insert some text as headers to our dashboard.

“Insert” tab → “Text box”

Figure 27: Tool bar

Then add "Slicer" in “Visualizations”. After the first one, just copy and paste the
others.

30
POWER BI WEEK – SALES DASHBOARD

That is it for today, guys! We learned a lot of new things today, huh?!

Even though, I will give you guys a challenge!!

It’s crucial that you practice and think how to solve problems.

So, import all the tables, create your own version, and post the result on
LinkedIn mentioning me and using the hashtag #PowerBIWeek.

Thanks for attending Power BI Week! Don't forget you still have more, huh?!

See you!

Cheers,

Leonardo Karpinski.

31
POWER BI WEEK – SALES DASHBOARD

32

You might also like