Power BI Notes by Nagaraju
Power BI Notes by Nagaraju
EXCELGENIUSES-NAGARAJU
POWER BI
Summary 67
Power BI - basic concepts for Power BI service consumers 71
Power BI consumers and designers 71
Terminology and concepts 71
Open Power BI service for the first time 71
Power BI content 72
Introduction to building blocks 72
Datasets 74
Visualizations 76
Reports 76
Dashboards 77
Apps 79
An overview of Power BI Desktop 80
Introduction to modeling your data 83
Introduction to modeling your data 84
How to manage your data relationships 84
Create calculated columns 88
Optimizing data models 91
Hiding fields 92
Sorting visualization data by another field 93
Create calculated measures 95
Create calculated tables 97
Explore your time-based data 99
Next steps 102
Visualizations 103
Introduction to visuals in Power BI 104
Create and customize simple visualizations 105
Combination charts 108
Combination charts 108
Slicers 110
Map visualizations 113
Create bubble maps 114
Create shape maps 115
EXCELGENIUSES-NAGARAJU
POWER BI
EXCELGENIUSES-NAGARAJU
POWER BI
Introduction
Microsoft Power BI is a collection of software services, apps, and connectors that work
together to turn your unrelated sources of data into coherent, visually immersive, and
interactive insights. Whether your data is a simple Microsoft Excel workbook, or a
collection of cloud-based and on-premises hybrid data warehouses, Power BI lets you
easily connect to your data sources, visualize (or discover) what's important, and share
that with anyone or everyone you want.
Power BI can be simple and fast, capable of creating quick insights from an Excel
workbook or a local database. But Power BI is also robust and enterprise-grade, ready
not only for extensive modeling and real-time analytics, but also for custom
development. Therefore, it can be your personal report and visualization tool, but can
also serve as the analytics and decision engine behind group projects, divisions, or
entire corporations.
If you're a beginner with Power BI, this module will get you going. If you're a Power
BI veteran, this module will tie concepts together and fill in the gaps.
EXCELGENIUSES-NAGARAJU
POWER BI
These three elements—Desktop, the service, and Mobile apps—are designed to let
people create, share, and consume business insights in the way that serves them, or
their role, most effectively.
For example, you might view reports and dashboards in the Power BI service, and that
might be all you do with Power BI. But your number-crunching, business-report-
creating coworker might make extensive use of Power BI Desktop (and publish Power
BI Desktop reports to the Power BI service, which you then use to view them). And
another coworker, in sales, might mainly use her Power BI phone app to monitor
progress on her sales quotas and drill into new sales lead details.
You also might use each element of Power BI at different times, depending on what
you're trying to achieve, or what your role is for a given project or effort.
We discuss these three elements—Desktop, the service, and Mobile apps—in more
detail later. In upcoming units and modules, we'll also create reports in Power BI
Desktop, share them in the service, and eventually drill into them on our mobile device.
EXCELGENIUSES-NAGARAJU
POWER BI
It doesn't always happen that way, and that's okay. But we'll use that flow to help you
learn the different parts of Power BI and how they complement each another.
Okay, now that we have an overview of this module, what Power BI is, and its three
main elements, let's take a look at what it's like to use Power BI.
Use Power BI
2 minutes
Now that you know the basics of Microsoft Power BI, let's jump into some hands-on
experiences and a guided tour.
As you learn about all the things that can be done with Power BI, keep in mind that all
these activities, and all the analysis that's done with Power BI, generally follow a
common flow. The common flow of activity in Power BI looks like this:
EXCELGENIUSES-NAGARAJU
POWER BI
As mentioned earlier, you might spend all your time in the Power BI service, viewing
visuals and reports that have been created by others. And that's just fine. Someone else
on your team might spend all her time in Power BI Desktop, which is fine too. To help
you understand the full continuum of Power BI and what it can do, we'll show you all of
it. Then you can decide how to use it to your best advantage.
So, let's jump in and step through the experience. The first order of business is to learn
the basic building blocks of Power BI, which will provide a solid basis for learning how
Power BI turns data into cool reports and visuals.
Everything you do in Microsoft Power BI can be broken down into a few basic building
blocks. After you understand these building blocks, you can expand on each of them
and begin creating elaborate and complex reports. After all, even seemingly complex
things are built from basic building blocks. For example, buildings are created with
wood, steel, concrete and glass, and cars are made from metal, fabric, and rubber. Of
course, buildings and cars can also be basic or elaborate, depending on how those
basic building blocks are arranged.
EXCELGENIUSES-NAGARAJU
POWER BI
Let's take a look at these basic building blocks, discuss some simple things that can be
built with them, and then get a glimpse into how complex things can also be created.
● Visualizations
● Datasets
● Reports
● Dashboards
● Tiles
Visualizations
A visualization (sometimes also referred to as a visual) is a visual representation of
data, like a chart, a color-coded map, or other interesting things you can create to
represent your data visually. Power BI has all sorts of visualization types, and more are
coming all the time. The following image shows a collection of different visualizations
that were created in the Power BI service.
EXCELGENIUSES-NAGARAJU
POWER BI
Visualizations can be simple, like a single number that represents something significant,
or they can be visually complex, like a gradient-colored map that shows voter
sentiment about a certain social issue or concern. The goal of a visual is to present data
in a way that provides context and insights, both of which would probably be difficult
to discern from a raw table of numbers or text.
Datasets
A dataset is a collection of data that Power BI uses to create its visualizations.
You can have a simple dataset that's based on a single table from a Microsoft Excel
workbook, similar to what's shown in the following image.
EXCELGENIUSES-NAGARAJU
POWER BI
Datasets can also be a combination of many different sources, which you can filter and
combine to provide a unique collection of data (a dataset) for use in Power BI.
For example, you can create a dataset from three database fields, one website table, an
Excel table, and online results of an email marketing campaign. That unique
combination is still considered a single dataset, even though it was pulled together
from many different sources.
Filtering data before bringing it into Power BI lets you focus on the data that matters to
you. For example, you can filter your contact database so that only customers who
received emails from the marketing campaign are included in the dataset. You can then
create visuals based on that subset (the filtered collection) of customers who were
included in the campaign. Filtering helps you focus your data—and your efforts.
An important and enabling part of Power BI is the multitude of data connectors that are
included. Whether the data you want is in Excel or a Microsoft SQL Server database, in
Azure or Oracle, or in a service like Facebook, Salesforce, or MailChimp, Power BI has
built-in data connectors that let you easily connect to that data, filter it if necessary,
and bring it into your dataset.
EXCELGENIUSES-NAGARAJU
POWER BI
After you have a dataset, you can begin creating visualizations that show different
portions of it in different ways, and gain insights based on what you see. That's where
reports come in.
Reports
In Power BI, a report is a collection of visualizations that appear together on one or
more pages. Just like any other report you might create for a sales presentation or write
for a school assignment, a report in Power BI is a collection of items that are related to
each another. The following image shows a report in Power BI Desktop—in this case,
it's the fifth page in a six-page report. You can also create reports in the Power BI
service.
EXCELGENIUSES-NAGARAJU
POWER BI
Reports let you create many visualizations, on multiple pages if necessary, and let you
arrange those visualization in whatever way best tells your story.
EXCELGENIUSES-NAGARAJU
POWER BI
You might have a report about quarterly sales, product growth in a particular segment,
or migration patterns of polar bears. Whatever your subject, reports let you gather and
organize your visualizations onto one page (or more).
Dashboards
When you're ready to share a single page from a report, or a collection of
visualizations, you create a dashboard. Much like the dashboard in a car, a Power
BI dashboard is a collection of visuals from a single page that you can share with
others. Often, it's a selected group of visuals that provide quick insight into the data or
story you're trying to present.
A dashboard must fit on a single page, often called a canvas (the canvas is the blank
backdrop in Power BI Desktop or the service, where you put visualizations). Think of it
like the canvas that an artist or painter uses—a workspace where you create, combine,
and rework interesting and compelling visuals. You can share dashboards with other
users or groups, who can then interact with your dashboards when they're in the
Power BI service or on their mobile device.
Tiles
In Power BI, a tile is a single visualization on a report or a dashboard. It's the
rectangular box that holds an individual visual. In the following image, you see one tile
(highlighted by a bright box), which is also surrounded by other tiles.
EXCELGENIUSES-NAGARAJU
POWER BI
When you're creating a report or a dashboard in Power BI, you can move or arrange
tiles however you want. You can make them bigger, change their height or width, and
snuggle them up to other tiles.
Power BI is a collection of services, apps, and connectors that lets you connect to your
data, wherever it happens to reside, filter it if necessary, and then bring it into Power BI
to create compelling visualizations that you can share with others.
Now that you've learned about the handful of basic building blocks of Power BI, it
should be clear that you can create datasets that make sense to you and create visually
compelling reports that tell your story. Stories told with Power BI don't have to be
complex, or complicated, to be compelling.
EXCELGENIUSES-NAGARAJU
POWER BI
For some people, using a single Excel table in a dataset and then sharing a dashboard
with their team will be an incredibly valuable way to use Power BI.
For others, the value of Power BI will be in using real-time Azure SQL Data Warehouse
tables that combine with other databases and real-time sources to build a moment-
by-moment dataset.
For both groups, the process is the same: create datasets, build compelling visuals, and
share them with others. And the result is also the same for both groups: harness your
ever-expanding world of data, and turn it into actionable insights.
Now let's see how this works. We'll start by taking a quick look at the Power BI service.
As we learned in the previous unit, the common flow of work in Microsoft Power BI is
to create a report in Power BI Desktop, publish it to the Power BI service, and then
share it with others, so that they can view it in the service or on a mobile app.
But because some people begin in the Power BI service, let's take a quick look at that
first, and learn about an easy and popular way to quickly create visuals in Power
BI: apps.
An app is a collection of preset, ready-made visuals and reports that are shared with
an entire organization. Using an app is like microwaving a TV dinner or ordering a fast-
food value meal: you just have to press a few buttons or make a few comments, and
you're quickly served a collection of entrees designed to go together, all presented in a
tidy, ready-to-consume package.
So, let's take a quick look at apps, the service, and how it works. We'll go into more
detail about apps (and the service) in upcoming modules, but you can think of this as a
taste to whet your appetite.
EXCELGENIUSES-NAGARAJU
POWER BI
The canvas (the area in the center of the Power BI service) shows you the available
sources of data in the Power BI service. In addition to common data sources like
Microsoft Excel files, databases, or Microsoft Azure data, Power BI can just as easily
connect to a whole assortment of software services (also called SaaS providers or
cloud services): Salesforce, Facebook, Google Analytics, and more.
EXCELGENIUSES-NAGARAJU
POWER BI
For these software services, the Power BI service provides a collection of ready-made
visuals that are pre-arranged on dashboards and reports for your organization. This
collection of visuals is called an app. Apps get you up and running quickly, with data
and dashboards that your organization has created for you. For example, when you use
the GitHub app, Power BI connects to your GitHub account (after you provide your
credentials) and then populates a predefined collection of visuals and dashboards in
Power BI.
There are apps for all sorts of online services. The following image shows a page of
apps that are available for different online services, in alphabetical order. This page is
shown when you select the Get button in the Services box (shown in the previous
image). As you can see from the following image, there are many apps to choose from.
EXCELGENIUSES-NAGARAJU
POWER BI
For our purposes, we'll choose GitHub. GitHub is an application for online source
control. When you select the Get it nowbutton in the box for the GitHub app,
the Connect to GitHub dialog box appears.
EXCELGENIUSES-NAGARAJU
POWER BI
After you enter the information and credentials for the GitHub app, installation of the
app begins.
After the data is loaded, the predefined GitHub app dashboard appears.
EXCELGENIUSES-NAGARAJU
POWER BI
In addition to the app dashboard, the report that was generated (as part of the GitHub
app) and used to create the dashboard is available, as is the dataset (the collection of
data pulled from GitHub) that was created during data import and used to create the
GitHub report.
EXCELGENIUSES-NAGARAJU
POWER BI
On the dashboard, you can select any of the visuals and interact with them. As you do
so, all the other visuals on the page will respond. For example, when the May 2018 bar
is selected in the Pull Requests (by month) visual, the other visuals on the page adjust
to reflect that selection.
EXCELGENIUSES-NAGARAJU
POWER BI
EXCELGENIUSES-NAGARAJU
POWER BI
The Datasets tab is selected on the Settings page that appears. In the right pane, select
the arrow next to Scheduled refresh to expand that section. The Settings dialog box
appears on the canvas, letting you set the update settings that meet your needs.
EXCELGENIUSES-NAGARAJU
POWER BI
That's enough for our quick look at the Power BI service. There are many more things
you can do with the service, and we'll cover these later in this module and in upcoming
modules. Also, remember that there are many types of data you can connect to, and all
sorts of apps, with more of both coming all the time.
Next: Summary
Continue
Summary
5 minutes
Microsoft Power BI is a collection of software services, apps, and connectors that work
together to turn your data into interactive insights. You can use data from single basic
sources, like a Microsoft Excel workbook, or pull in data from multiple databases and
cloud sources to create complex datasets and reports. Power BI can be as
straightforward as you want or as enterprise-ready as your complex global business
requires.
EXCELGENIUSES-NAGARAJU
POWER BI
In the Power BI service, we installed an app in just a few clicks. That app, a ready-
made collection of visuals and reports, let us easily connect to a software service to
populate the app and bring that data to life.
Finally, we set up a refresh schedule for our data, so that we know the data will be
fresh when we go back to the Power BI service.
Next steps
Congratulations! You've finished the first module of the learning path for Power BI. You
now have a firm foundation of knowledge for when you move on to the next module,
which walks through the steps to create your first report.
We mentioned this before, but it's worth restating: this learning path builds your
knowledge by following the common flow of work in Power BI:
EXCELGENIUSES-NAGARAJU
POWER BI
You might not do all that work yourself—some people will only view dashboards that
were created by someone else, and they'll just use the service. That's fine, and we'll
soon have a module dedicated to showing how you can easily navigate and use
the Power BI service to view and interact with reports and apps.
But the next module follows the flow of work in Power BI, showing you how to create a
report and publish it to the Power BI service. You'll learn how those reports and
dashboards are created and how they connected to the data. You might even decide to
create a report or dashboard of your own.
EXCELGENIUSES-NAGARAJU
POWER BI
Introduction
3 minutes
Welcome to the learning module designed to get you up and running with Microsoft
Power BI Desktop. In this module, you'll learn how to get around in Power BI Desktop,
connect to data, create visuals and reports, and publish those reports to the Power BI
service.
Power BI Desktop lets you create a collection of queries, data connections, and reports
that can easily be shared with others. Power BI Desktop integrates proven Microsoft
technologies—the powerful Microsoft Power Query for Excel engine, data modeling,
and visualizations—and works seamlessly with the online Power BI service.
Through the combination of Power BI Desktop (where analysts and others can create
powerful data connections, models, and reports) and the Power BI service (where
Power BI Desktop reports can be shared, so that users can view and interact with
them), new insights from the world of data are easier to model, build, share, and
extend.
Data analysts will find Power BI Desktop a powerful, flexible, and a highly accessible
tool for connecting with and shaping the world of data, building robust models, and
crafting well-structured reports.
When these steps—connect, shape, and report—are finished to your satisfaction, you
can save your work in the Power BI Desktop file format, which uses the .pbix
extension. Power BI Desktop files can be shared like any other file, but the most
compelling way to share them is to upload them to the Power BI service.
EXCELGENIUSES-NAGARAJU
POWER BI
You can also install Power BI Desktop as an app from Microsoft Store.
EXCELGENIUSES-NAGARAJU
POWER BI
Power BI Desktop is installed as an application and runs on your desktop. When you
start Power BI Desktop, a Welcomescreen is shown.
You can get data, see recent sources, or open other reports directly from
the Welcome screen, by using the links in the left pane. If you close
the Welcome screen (by selecting the X in the upper-right corner), the Report view of
Power BI Desktop is shown.
EXCELGENIUSES-NAGARAJU
POWER BI
Three icons along the left edge of the window correspond to the three views that are
available in Power BI Desktop: Report, Data, and Relationships (from top to bottom).
You can change views by selecting the icons. The current view is indicated by a yellow
bar to the left of the icon. For example, in the following image, the Report view is
currently shown.
EXCELGENIUSES-NAGARAJU
POWER BI
Power BI Desktop also includes Power Query Editor, which starts in a separate
window. In Power Query Editor, you can build queries and transform data, load that
refined data model into Power BI Desktop, and create reports.
Now that Power BI Desktop is installed, you're ready to connect to data, shape data,
and build reports (usually in that order). In the following units, we'll take a tour through
each of those activities in turn.
Continue
Now that Microsoft Power BI Desktop is installed, you're ready to connect to the ever-
expanding world of data. There are all sorts of data sources available in the Microsoft
Power Query for Excel window. The following image shows how to connect to data by
selecting the Home tab on the ribbon and then selecting Get Data > More.
EXCELGENIUSES-NAGARAJU
POWER BI
Imagine you’re retiring – you want to live where there’s lots of sunshine, low crime
rates, and good health care – or perhaps you’re a data analyst, and you want that
information to help your customers. For example, maybe you want to help your
sunglasses retailer target sales where the sun shines most frequently.
Either way, the following web resource has interesting data about those topics, and
more:
http://www.bankrate.com/finance/retirement/best-places-retire-how-state-
ranks.aspx
EXCELGENIUSES-NAGARAJU
POWER BI
When you select OK, the Query functionality of Power BI Desktop goes to work. Query
contacts the web resource, and the Navigator window shows what it found on that
webpage. In this case, it finds a table (Table 0) and the overall web document. We're
interested in the table, so select it in the list. The Navigator window shows a preview.
EXCELGENIUSES-NAGARAJU
POWER BI
At this point, you can edit the query before loading the table, by selecting Edit at the
bottom of the window. Or, you can just load the table.
When you select Edit, Power Query Editor starts, and a representative view of the
table is shown. The Query Settings pane appears (if it doesn't, select the View tab on
the ribbon, then select Show > Query Settings). Here's what it looks like.
In Power BI Desktop, you can connect to multiple data sources and combine them to
do interesting things.
In the next unit, we'll adjust the data to make it meet our needs. The process of
adjusting connected data is called shaping.
EXCELGENIUSES-NAGARAJU
POWER BI
Now that we've connected to a data source by using Microsoft Power BI Desktop, we
must adjust the data to meet our needs. Sometimes, adjusting means transforming the
data by, for example, renaming columns or tables, changing text to numbers, removing
rows, or setting the first row as a header.
Power Query Editor in Power BI Desktop makes extensive use of shortcut menus (also
known as right-click or context menus), in addition to having tasks available on the
ribbon. Most of what you can select on the Transform tab on the ribbon is also
available by right-clicking an item (like a column) and then selecting a command on the
shortcut menu that appears.
Shape data
When you shape data in Power Query Editor, you're providing step-by-step
instructions that Power Query Editor will carry out to adjust the data as it loads and
presents it. The original data source isn't affected. Only this particular view of the data
is adjusted, or shaped.
The steps you specify (for example, rename a table, transform a data type, or delete
columns) are recorded by Power Query Editor. Those steps are then carried out each
time the query connects to the data source, so that the data is always shaped the way
you specify. This process occurs whenever you use the query in Power BI Desktop, or
whenever anyone else uses your shared query (for example, in the Power BI service).
The steps are captured sequentially under Applied Steps in the Power Query
Settings pane.
The following image shows the Query Settings pane for a query that has been shaped.
We'll go through each of the steps in the next few paragraphs.
EXCELGENIUSES-NAGARAJU
POWER BI
Let's return to the retirement data that we found by connecting to a Web data source,
and let's shape that data to fit our needs.
For starters, most of the ratings were brought into Power Query Editor as whole
numbers, but some weren't. Because one column had text and numbers, it wasn't
automatically converted. Power BI often detects these changes and automatically
changes the data type.
We need the data to be numbers. No problem: just right-click the column header, and
then select Change Type > Whole Number to change the data type. If you must change
more than one column, select one of them, and then hold down the Shift key while you
select additional adjacent columns. Then right-click a column header to change all the
selected columns. You can also use the Ctrl key to select non-adjacent columns.
EXCELGENIUSES-NAGARAJU
POWER BI
Note
Often, Power Query will detect that a column of text should be numbers, and will
automatically change the data type when it brings the table into Power Query Editor. In
this case, a step under Applied steps identifies what Power Query did for you.
You can also change, or transform, those columns from text to header by using
the Transform tab on the ribbon. The following image shows the Transform tab. The
arrow points to the Data Type button, which lets you transform the current data type
to another.
Notice that the Applied Steps list in the Query Settings pane reflects all the changes
that were made. To remove any step from the shaping process, just select it, and then
select the X to the left of it.
EXCELGENIUSES-NAGARAJU
POWER BI
Connect to data
That data about different states is interesting, and will be useful for building additional
analysis efforts and queries. But there's one problem: most data out there uses a two-
letter abbreviation for state codes, not the full name of the state. Therefore, we need
some way to associate state names with their abbreviations.
We're in luck: there's another public data source that does just that, but it needs a fair
amount of shaping before we can connect it to our retirement table. Here's the web
resource for state abbreviations:
http://en.wikipedia.org/wiki/List_of_U.S._state_abbreviations
In Power Query Editor, on the Home tab on the ribbon, select New Source > Web. Then
enter the address, and select OK. The Navigator window shows what it found on that
webpage.
EXCELGENIUSES-NAGARAJU
POWER BI
Select the Codes and abbreviations... table, because it includes the data we want,
although it's going to take quite a bit of shaping to pare down that data.
Select OK to bring the data into Power Query Editor so that we can shape it. Then
follow these steps:
● Remove the top three rows – Those rows are a result of the way the webpage's
table was created, and we don't need them. To remove them, on the Home tab
on the ribbon, select Remove rows > Remove Top Rows. In the dialog box that
appears, enter 3 as the number of rows to remove.
EXCELGENIUSES-NAGARAJU
POWER BI
● Remove the bottom 26 rows – Those rows are all for territories, which we don't
need to include. The process is the same, but this time, select Remove rows >
Remove Bottom Rows, and enter 26 as the number of rows to remove.
EXCELGENIUSES-NAGARAJU
POWER BI
● Remove a few unneeded columns – We just need the mapping of each state to its
official two-letter abbreviation, and that information is given in the second and
fifth columns. Therefore, we just need to keep those two columns and can
remove all the others. Select the first column to remove, and then hold down the
Ctrl key while you select the other columns to remove (this lets you select
multiple, non-adjacent columns). Then, on the Home tab on the ribbon,
select Remove Columns > Remove Columns.
EXCELGENIUSES-NAGARAJU
POWER BI
● Use the first row as headers – Because we removed the top three rows, the
current top row is the header we want. Select the Use first row as
headers button.
Note
EXCELGENIUSES-NAGARAJU
POWER BI
This is a good time to point out that the sequence of applied steps in Power
Query Editor is important and can affect how the data is shaped. It's also
important to consider how one step might affect another subsequent step. If you
remove a step from the Applied Steps list, subsequent steps might not behave as
originally intended, because of the impact of the query's sequence of steps.
● Rename the columns and the table itself – As usual, there are a couple ways to
rename a column. You can use whichever way you prefer. Let's rename
them State Name and State Code. To rename the table, just enter the name in
the Name field in the Query Settings pane. Let's call this table StateCodes.
Combine data
Now that the StateCodes table is shaped, we can combine our two tables into one.
Because the tables that we now have are a result of the queries we applied to the data,
they're often referred to as queries.
There are two primary ways of combining queries: merging and appending.
When you have one or more columns that you want to add to another query,
you merge the queries. When you have additional rows of data to add to an existing
query, you append the query.
In this case, we want to merge the queries. To get started, select the query to merge
the other query into. Then, on the Home tab on the ribbon, select Merge Queries. We
EXCELGENIUSES-NAGARAJU
POWER BI
want to select our retirement query first. While we're at it, let's rename that
query RetirementStats.
The Merge dialog box appears, prompting us to select the table to merge into the
selected table, and the matching columns to use for the merge.
Select State from the RetirementStats table (query), and then select
the StateCodes query. (In this case, the choice is easy, because there's only one other
query. But when you connect to many data sources, there will be many queries to
choose from.) After you select the correct matching columns—
State from RetirementStats and State Name from StateCodes—the Merge dialog box
will look like this, and the OK button will become available.
EXCELGENIUSES-NAGARAJU
POWER BI
A NewColumn is created at the end of the query and is the contents of the table
(query) that was merged with the existing query. All columns from the merged query
are condensed into the NewColumn, but you can expand the table and include
whichever columns you want. To expand the merged table and select the columns to
include, select the expand icon ( ). The Expand dialog box appears.
EXCELGENIUSES-NAGARAJU
POWER BI
In this case, we just want the State Code column. Therefore, select only that column,
and then select OK. You can also clear the Use original column name as prefix check
box. If you leave it selected, the merged column will be named NewColumn.State
Code (the original column name, or NewColumn, then a dot, and then the name of the
column that's being brought into the query).
Note
If you want, you can play around with how the NewColumn table is brought it. If you
don't like the results, just delete the Expand step from the Applied Steps list in
the Query Settings pane. Your query will return to the state it was in before you applied
that step. It's like a free do-over that you can do as many times as you want, until the
expand process looks the way you want.
We now have a single query (table) that combines two data sources, each of which
has been shaped to meet our needs. This query can serve as a basis for lots of
additional, interesting data connections, like housing cost statistics, demographics, or
job opportunities in any state.
To apply the changes in Power Query Editor and load them into Power BI Desktop,
select Close & Apply on the Home tab on the ribbon.
EXCELGENIUSES-NAGARAJU
POWER BI
The data in your model is now ready to work with. Next, we'll create some visuals for
your report.
For now, we have enough data to create a few interesting reports, all in Power BI
Desktop. Because this is a milestone, let's save this Power BI Desktop file. Select File >
Save on the Home tab on the ribbon to save the report—we'll call it Getting Started
with Power BI Desktop.
Great! Now on to the next unit, where we'll create some interesting visuals.
That doesn't mean we're stuck with that data model forever. Additional changes can be
made in Power Query Editor after the model is loaded, and you can reload a model to
apply any changes you make. But for now, this model will do just fine.
To get started creating a report with the data model we created, open the Report view
in Microsoft Power BI Desktop.
EXCELGENIUSES-NAGARAJU
POWER BI
1. The ribbon, which shows common tasks associated with reports and
visualizations
2. The Report view, or canvas, where visualizations are created and arranged
3. The Pages tab area along the bottom, which lets you select or add report pages
4. The Visualizations pane, where you can change visualizations, customize colors
or axes, apply filters, drag fields, and more
5. The Fields pane, from which query elements and filters can be dragged either
onto the Report view or into the Filters area of the Visualizations pane
The Visualizations and Fields pane can be collapsed by selecting the small arrow along
the edge, providing more space in the Report view to build cool visualizations.
EXCELGENIUSES-NAGARAJU
POWER BI
Create visuals
To create a visualization, just drag a field from the Fields list onto the Report view. In
this case, let's drag the State field from RetirementStats and see what happens.
EXCELGENIUSES-NAGARAJU
POWER BI
EXCELGENIUSES-NAGARAJU
POWER BI
Notice that you can select different types of visualizations in the Visualizations pane.
Then, in the area below those icons, you can drag fields to different areas to apply a
legend or change the visualization in other ways.
Let's create a few visuals on this first report page and see what happens.
You can change the type of any visual by selecting it on the canvas and then selecting a
different tile in the Visualizationspane. Let's do that. Instead of Map (the tile with a
globe icon), select Filled Map (the next tile, which looks like states in different colors).
First visual
Drag the Overall rank field from the Fields pane to the Color saturation well in
the Visualizations pane.
EXCELGENIUSES-NAGARAJU
POWER BI
To adjust the colors used in the map, select the Format tab (looks like a paint roller) in
the Visualizations pane, and expand Data colors to adjust.
EXCELGENIUSES-NAGARAJU
POWER BI
You can adjust the size of a visual by dragging its corners or sides. Let's move this
visual to the upper left before creating the next visual.
EXCELGENIUSES-NAGARAJU
POWER BI
Select any blank area of the canvas, so that no visual is selected. You're now ready to
drag fields and create the next visual.
Second visual
Drag State from RetirementStats onto a blank area of the canvas. Then drag the Overall
rank field, then the Health care quality field, and then the Well-being field onto that
visual. Now let's change the visual to a Line and clustered column chart visual by
selecting the appropriate tile in the Visualizations pane.
We're almost done. On the Fields tab, move the Well-being field to the Line
values well. The following image shows what your visual should now look like. Note
that the order of the fields in each bucket will change how a visual appears. For
example, Health care quality is above Overall rank in the Column values bucket,
shown in the following image.
EXCELGENIUSES-NAGARAJU
POWER BI
You can experiment with these visuals as much as you want: change the visual type,
add fields, change the colors, or arrange the visual on the canvas. All these changes are
fun to do, easy to undo, and quick to take effect.
EXCELGENIUSES-NAGARAJU
POWER BI
Let's fast-forward a bit and see what the Report view looks like after a handful of
visualizations and a few report pages have been added. Don't worry: you can see this
report first-hand. The summary unit for this module includes a link to download the
final .pbix file. You can then load the report into your local version of Power BI Desktop
and see exactly how things came together.
The first report page provides a perspective of the data that's based on overall rank.
When you select one of the visualizations, the Fields and Filters pane shows which
fields are selected and the structure of the visualization (that is, which fields are applied
to Shared Axis, Column Values, and Line Values).
There are six pages in this report, each visualizing specific elements of our data:
1. The first page, shown in the preceding image, shows all states, based on overall
rank.
2. The second page shows on the top 10 states, based on overall rank.
3. The third page shows the top 10 states for cost of living (and associated data).
4. The fourth page focuses on weather and is filtered to show the 15 sunniest states.
5. The fifth page shows the top 15 states for community well-being.
6. The sixth page focuses on crime statistics, showing the 10 best and 10 worst
states.
Here's what the page that focuses on cost of living looks like.
EXCELGENIUSES-NAGARAJU
POWER BI
There are all sorts of interesting reports and visualizations you can create. But what's
best about creating reports is sharing them with others. In the next unit, we'll see just
how easy it is to share Power BI reports.
You can add all sorts of visualizations to a page, but it's important not to overdo it. Too
many visualizations on a page will make it look busy and will also make the correct
information difficult to find.
To add a page to your report, just select New Page on the ribbon, or select the plus sign
(+) next to the last report page.
EXCELGENIUSES-NAGARAJU
POWER BI
Okay, even with just a couple of visuals, you have a report. Let's move on to the next
unit and learn how we can share these insight-filled reports with others.
Continue
Exercise - Share a Power BI report
5 minutes
Now that we have a Microsoft Power BI Desktop report that's reasonably complete (or
at least ready to move ahead with), we can share it with others by using the Power BI
service. There are a few ways to share your work in Power BI Desktop. You can publish
to the Power BI service, upload the .pbix file directly from the Power BI service, or save
the .pbix file and send it like any other file. You can also export a report to a Microsoft
PowerPoint file, and can even create a PDF file of your report.
EXCELGENIUSES-NAGARAJU
POWER BI
First, let's look at publishing directly from Power BI Desktop to the Power BI service. On
the Home tab on the ribbon, select Publish.
The next window that appears asks for a destination for your published report. You can
publish a report to a workspace that's accessible to your entire organization (and
therefore share your report with everyone in your organization), or you can publish it to
other available workspaces. The workspaces you see depend on the workspaces that
are available to you and your organization.
You can also share the report just in your own workspace (called My Workspace).
From there, you can do more with it in the Power BI service (including sharing it more
broadly). In our case, we'll select My Workspace.
EXCELGENIUSES-NAGARAJU
POWER BI
When you've signed in and the publish process is finished, you'll see the following
dialog box.
When you sign in to Power BI, you'll see the Power BI Desktop file you just loaded in
the Dashboards, Reports, and Datasets sections of the service.
Another way to share your work is to load it from within the Power BI service. The
following link opens the Power BI service in a browser:
https://app.powerbi.com
Select Get Data to start the process of loading your Power BI Desktop report.
EXCELGENIUSES-NAGARAJU
POWER BI
On the Get Data page that appears, you can select where to get your data from. In our
case, we'll select Get in the Filesbox.
The Files view appears. In our case, we'll select Local File.
EXCELGENIUSES-NAGARAJU
POWER BI
EXCELGENIUSES-NAGARAJU
POWER BI
After the file is uploaded, you can select it. In the Power BI service, select My
Workspace in the left pane, and then select the Reports tab to show all your reports.
When you select the report (by selecting its name), the Power BI service shows the
first page of it. Along the bottom of the page, you can select any tab to view that page
of the report.
EXCELGENIUSES-NAGARAJU
POWER BI
You can change a report in the Power BI service by selecting Edit Report at the top of
the report canvas.
In the Power BI service, after the report is loaded, select File > Export to PowerPoint
(Preview).
EXCELGENIUSES-NAGARAJU
POWER BI
After the export process is finished, Power BI tell you where the PowerPoint file was
saved and lets you know that it's ready to be shared with others.
Now that you know how to create and share reports, you can use your imagination to
tell stories with data and share them with your entire organization.
Let's head to the next unit, where we'll wrap things up for this module.
Next: Summary
EXCELGENIUSES-NAGARAJU
POWER BI
Summary
2 minutes
Congratulations! You've just gone through the process of creating a Microsoft Power BI
report from scratch and sharing your work with others. To review, let's take a look at
what you learned.
In Power BI Desktop, you can connect to all sorts of data sources. You just have to
select Get Data on the ribbon, and then a multitude of connector options appears.
EXCELGENIUSES-NAGARAJU
POWER BI
You also learned that connecting to more than one data source is as easy as making a
second Get Data connection. You can also use the New Source button in Power Query
Editor. The Navigator window in Power Query Editor provides a preview of the data.
EXCELGENIUSES-NAGARAJU
POWER BI
After you select data, you can shape it the way you want by removing columns and
rows, or by merging connections into a single data model that you can use in your
report.
You learned that creating visuals is as easy as dragging fields onto the report canvas.
You can then change those visuals however you want, experimenting until you get
them looking just the way you want.
EXCELGENIUSES-NAGARAJU
POWER BI
And after your report is all done, you can share it with others in your organization by
publishing it to the Power BI service.
EXCELGENIUSES-NAGARAJU
POWER BI
Great work! As you might remember, we went through a few visuals but then had to
move on, promising that the finished report would be available from a link in this
summary. Well, here we are, and here it is. To download the finished Power BI Desktop
report, use the following link:
Great work! There's more to learn about Power BI, and Power BI Desktop, so look for
more modules that will take your learning even further.
You'll undoubtedly hear the term "Power BI Desktop" or just "Desktop", and this is a
stand-alone tool used by designers who build and share dashboards and reports with
you. It's important to know that there are other Power BI tools out there, but as long as
you're a consumer, you'll only work with Power BI service. And this article applies only
to Power BI service.
Terminology and concepts
This article isn't a visual tour of Power BI, nor is it a hands-on tutorial. Instead it's an
overview article that we hope will get you comfortable with Power BI terminology and
concepts. Kind of teach you the lingo and lay of the land. For a tour of Power BI service
and its navigation, visit Take a tour.
Open Power BI service for the first time
Most Power BI consumers get Power BI service because 1) their company buys licenses
and 2) an administrator assigns those license to employees like you.
To get started, simply open a browser and type app.powerbi.com. The very first time
you open Power BI service, you'll see something like this.
EXCELGENIUSES-NAGARAJU
POWER BI
As you use Power BI, you'll personalize what you see when you open the website each
time. For example, some people like Power BI to open to the Home page while others
have a favorite dashboard they want to see first. Don't worry, we'll teach you how to
do this.
● Home preview
● Set content as featured
But before we get much further, let's back up and talk about the building blocks that
make up Power BI service.
Power BI content
Introduction to building blocks
EXCELGENIUSES-NAGARAJU
POWER BI
EXCELGENIUSES-NAGARAJU
POWER BI
or answer a question. The dashboard content comes from one or more reports
and one or more datasets.
● A report is one or more pages of interactive visuals, text, and graphics that
together make up a single report. A report is based on a single dataset. Oten
report pages are organized to each address a central area of interest or answer a
single question.
To be clear, if you're a brand new user; and you've logged in to Power BI for the first
time, you have no dashboards, apps, or reports yet.
Datasets
A dataset is a collection of data that designers import or connect to and then use to
build reports and dashboards. As a consumer, you won't interact directly with datasets,
but it's still nice to understand how they fit into the bigger picture.
Each dataset represents a single source of data, for example, an Excel workbook on
OneDrive, or an on-premises SSAS tabular dataset, or a Salesforce dataset. There are
many different data sources supported.
When a designer shares an app with you, you can see which datasets are included
with the app.
EXCELGENIUSES-NAGARAJU
POWER BI
ONE dataset...
Visualizations
Visualizations (aka visuals) display insights that have been discovered in the data.
Visualizations make it easier to interpret the insight, because your brain can
comprehend a picture faster than a spreadsheet of numbers, for example.
Just some of the visualizations you'll encounter in Power BI are: waterfall, ribbon,
treemap, pie, funnel, card, scatter, and gauge. See the full list of visualizations included
with Power BI.
EXCELGENIUSES-NAGARAJU
POWER BI
Visualizations are also available from the community and these are called custom
visuals. If you receive a report with a visual you don't recognize, likely it's a custom
visual. If you need help interpreting the custom visual, look up the name of the report
or dashboard designer and contact him or her.
● can be used over and over in the same report using copy/paste.
● can be used on many different dashboards
Reports
A Power BI report is one or more pages of visualizations, graphics, and text. All of the
visualizations in a report come from a single dataset. Designers share reports
with consumers who interact with the reports in Reading view.
EXCELGENIUSES-NAGARAJU
POWER BI
ONE report...
● can be associated with multiple dashboards (tiles pinned from that one report
can appear on multiple dashboards).
● are created using data from only one dataset.
● can be part of multiple apps
Dashboards
A dashboard represents a customized view of some subset of the underlying
dataset(s). Designersbuild dashboards and share them with consumers; either
individually or as part of an app. A dashboard is a single canvas that contains tiles,
graphics, and text.
A tile is a rendering of a visual that a designer pins, for example, from a report to a
dashboard. Each pinned tile displays a visualization that was created from a dataset
and pinned to that dashboard. A tile can also contain an entire report page and can
EXCELGENIUSES-NAGARAJU
POWER BI
contain live streaming data or a video. There are many ways that designers add tiles to
dashboards; too many to be covered in this overview topic. To learn more,
see Dashboard tiles in Power BI.
From a consumer standpoint, dashboards cannot be edited. You can however add
comments, view related data, set it as favorite, subscribe, and more.
What are some purposes for dashboards? Here are just a few:
ONE dashboard...
Apps
These collections of dashboards and reports organize related content together into a
single package. Power BI designers build them and share them with individuals,
groups, an entire organization, or the public. As a consumer, you can be confident that
you and your colleagues are working with the same data; a single trusted version of the
truth.
EXCELGENIUSES-NAGARAJU
POWER BI
Apps are easy to find and install in the Power BI service (https://powerbi.com) and on
your mobile device. After you install an app, you don't have to remember the names of
a lot of different dashboards because they're all together in one app, in your browser or
on your mobile device.
This app has three related dashboards and three related reports that make up a single
app.
EXCELGENIUSES-NAGARAJU
POWER BI
With apps, whenever the app author releases updates, you automatically see the
changes. The author also controls how often the data is scheduled to refresh, so you
don't need to worry about keeping it up to date.
You can get apps in a few different ways. The app designer can install the app
automatically in your Power BI account, or send you a direct link to an app, or you can
search for it in Microsoft AppSource, where you see all the apps that you can access. In
Power BI on your mobile device, you can only install apps from a direct link, and not
from AppSource. If the app designer installs the app automatically, you'll see it in your
list of apps.
Once the app is installed, just select it from your Apps list and select which dashboard
or report to open and explore first.
You can download Power BI Desktop from the web, you can also install Power BI
Desktop as an app from the Windows Store, or you can download it from the Power BI
service. In the service, to get Power BI Desktop you just select the down arrow button
in the upper right side of Power BI, then select Power BI Desktop.
EXCELGENIUSES-NAGARAJU
POWER BI
So once you download it, you'll install Power BI Desktop and run it like other
applications on Windows. The following image shows the Start Screen of Power BI
Desktop, which appears when you start the application.
EXCELGENIUSES-NAGARAJU
POWER BI
Power BI Desktop connects to a wide variety of data sources, from local on-premises
databases to Excel worksheets to cloud services. It helps you clean and format your
data to make it more usable, including splitting and renaming columns, changing data
types, and working with dates. You can also create relationships between columns so
that it's easier to model and analyze your data.
Introduction to modeling your data
Welcome to the Modeling section of the Guided Learning course for Power BI. This section
shows you how to get your connected data ready for use, using Power BI Desktop. Often, you'll
connect to more than one data source to create your reports, and you'll need all of that data to
work together. Modeling is how you get it there.
EXCELGENIUSES-NAGARAJU
POWER BI
reports. This section explains relationships (only the data-centric ones, though), and
even shows you how to create relationships when none exists.
As always in this course, your learning journey follows the same path as the flow of
work in Power BI. We'll still be in Power BI Desktop for most of this section, but the
work done here has direct affect on working in the Power BI service.
One of Power BI's strengths is that you don't need to flatten your data into one table.
Instead, you can use multiple tables from multiple sources, and define
the relationship between them. You can also create your own custom calculations and
assign new metrics to view specific segments of your data, and use these new
measures in visualizations for easy modeling.
How to manage your data relationships
Power BI allows you to visually set the relationship between tables or elements. To see
a diagrammatic view of your data, use the Relationship view, found on the far left side
of the screen next to the Report canvas.
EXCELGENIUSES-NAGARAJU
POWER BI
From the Relationships view, you can see a block that represents each table and its
columns, and lines between them to represent relationships.
EXCELGENIUSES-NAGARAJU
POWER BI
For a more detailed view of your data relationships, select Manage Relationships in
the Home tab. This will open the Manage Relationships dialog, which displays your
relationships as a list instead of a visual diagram. From here you can
select Autodetect to find relationships in new or updated data. Select Edit in
the Manage Relationships dialog to manually edit your relationships. This is also where
you can find advanced options to set the Cardinality and Cross-filter direction of your
relationships.
EXCELGENIUSES-NAGARAJU
POWER BI
Your options for Cardinality are Many to One, and One to One. Many to One is the fact
to dimension type relationship, for example a sales table with multiple rows per
product being matched up with a table listing products in their own unique row. One
to One is used often for linking single entries in reference tables.
Setting accurate relationships between your data allows you to create complex
calculations across multiple data elements.
EXCELGENIUSES-NAGARAJU
POWER BI
To create a relationship with unique fields in data, you can, for example, create a new
calculated column for "Full Phone Number" by combining the values from the "Area
Code" and "Local Number" columns when those values exist in your data. Calculated
columns are a useful tool for quickly creating models and visualizations.
EXCELGENIUSES-NAGARAJU
POWER BI
To create a calculated column, select the Data view in Power BI Desktop from the left
side of the report canvas.
From the Modeling tab, select New Column. This will enable the formula bar where you
can enter calculations using DAX (Data Analysis Expressions) language. DAX is a
powerful formula language, also found in Excel, that lets you build robust calculations.
As you type a formula, Power BI Desktop displays matching formulas or data elements
to assist and accelerate the creation of your formula.
The Power BI formula bar will suggest specific DAX functions and related data columns
as you enter your expression.
EXCELGENIUSES-NAGARAJU
POWER BI
Once the calculated columns are created in each table, they can be used as a unique
key to establish a relationship between them. Going to Relationship view, you can then
drag the field from one table to the other to create the relationship.
Returning to Report view, you now see a different value for each district.
EXCELGENIUSES-NAGARAJU
POWER BI
There are all sorts of other things you can do by creating calculated columns, too.
Optimizing data models
Imported data often contains fields that you don't actually need for your reporting and
visualization tasks, either because it's extra information, or because that data is already
available in another column. Power BI Desktop has tools to optimize your data, and
make it more usable for you to create reports and visuals, and for viewing your shared
reports.
Hiding fields
To hide a column in the Fields pane of Power BI Desktop, right-click on it and
select Hide. Note that your hidden columns are not deleted; if you've used that field in
existing visualizations, the data is still in that visual, and you can still use that data in
other visualizations too, the hidden field just isn't displayed in the Fields pane.
EXCELGENIUSES-NAGARAJU
POWER BI
If you view tables in the Relationships view, hidden fields are indicated by being
grayed out. Again, their data is still available and is still part of the model, they're just
hidden from view. You can always unhide any field that has been hidden by right-
clicking the field, and selecting unhide.
As a common example, data that includes the name of the month is sorted
alphabetically by default, so for example, "August" appears before "February".
EXCELGENIUSES-NAGARAJU
POWER BI
In this case, selecting the field in the Fields list, then selecting Sort By Column from
the Modeling tab and then choosing a field to sort by can remedy the problem. In this
case, the "MonthNo" category sort option orders the months as intended.
Setting the data type for a field is another way to optimize your information so it's
handled correctly. To change a data type from the report canvas, select the column in
the Fields pane, and then use the Format drop-down menu to select one of the
EXCELGENIUSES-NAGARAJU
POWER BI
formatting options. Any visuals you've created that display that field are updated
automatically.
Create calculated measures
A measure is a calculation that exists in your Power BI data model. To create a
measure, in Report view select New Measurefrom the Modeling tab.
One of the great things about DAX, the Data Analysis Expression language in Power BI,
is that it has lots of useful functions, particularly around time-based calculations such
as Year to Date or Year Over Year. With DAX you can define a measure of time once,
and then slice it by as many different fields as you want from your data model.
In Power BI, a defined calculation is called a measure. To create a measure, select New
Measure from the Home tab. This opens the Formula bar where you can enter the DAX
expression that defines your measure. As you type, Power BI suggests relevant DAX
functions and data fields as you enter your calculation, and you'll also get a tooltip
explaining some of the syntax and function parameters.
EXCELGENIUSES-NAGARAJU
POWER BI
If your calculation is particularly long, you can add extra line breaks in the Expression
Editor by typing ALT-Enter.
Once you've created a new measure, it will appear in one of the tables on
the Fields pane, found on the right side of the screen. Power BI inserts the new
measure into whichever table you have currently selected, and while it doesn't matter
exactly where the measure is in your data, you can easily move it by selecting the
measure and using the Home Table drop-down menu.
EXCELGENIUSES-NAGARAJU
POWER BI
You can use a measure like any other table column: just drag and drop it onto the
report canvas or visualization fields. Measures also integrate seamlessly with slicers,
segmenting your data on the fly, which means you can define a measure once, and use
it in many different visualizations.
The Calculate DAX function is a powerful function that enables all sorts of useful
calculations, which is especially useful for financial reporting and visuals.
Create calculated tables
Calculated tables are a function within DAX that allows you to express a whole range
of new modeling capabilities. For example, if you want to do different types of merge
joins or create new tables on the fly based on the results of a functional formula,
calculated tables are the way to accomplish that.
To create a calculated table, go to Data view in Power BI Desktop, which you can
activate from the left side of the report canvas.
EXCELGENIUSES-NAGARAJU
POWER BI
Select New Table from the Modeling tab to open the formula bar.
Type the name of your new table on the left side of the equal sign, and the calculation
that you want to use to form that table on the right. When you're finished your
calculation, the new table appears in the Fields pane in your model.
EXCELGENIUSES-NAGARAJU
POWER BI
Once created, you can use your calculated table as you would any other table in
relationships, formulas, and reports.
Explore your time-based data
It's easy to analyze time-based data with Power BI. The modeling tools in Power BI
Desktop automatically include generated fields that let you drill down through years,
quarters, months, and days with a single click.
When you create a table visualization in your report using a date field, Power BI
Desktop automatically includes breakdowns by time period. For example, the single
date field in the Date table was automatically separated into Year, Quarter, Month and
Day by Power BI, as shown in the following image.
EXCELGENIUSES-NAGARAJU
POWER BI
Visualizations display data at the year level by default, but you can change that by
turning on Drill Down in the top right-hand corner of the visual.
Now when you click on the bars or lines in your chart, it drills down to the next level of
time hierarchy, for example from yearsto quarters. You can continue to drill down until
you reach the most granular level of the hierarchy, which in this example is days. To
move back up through the time hierarchy, click on Drill Up in the top left-hand corner
of the visual.
EXCELGENIUSES-NAGARAJU
POWER BI
You can also drill down through all of the data shown on the visual, rather than one
selected period, by using the Drill Alldouble-arrow icon, also in the top right-hand
corner of the visual.
EXCELGENIUSES-NAGARAJU
POWER BI
As long as your model has a date field, Power BI will automatically generate different
views for different time hierarchies.
To get back to individual dates rather than using the date hierarchy, simply right-click
the column name in the Fields well (in the following image, the name of the column
is InvoiceDate), then select the column name from the menu that appears, rather
than Date Hierarchy. Your visual then shows the data based on that column data,
without using the date hierarchy. Need to go back to using the date hierarchy? No
problem - just right-click again and select Date Hierarchy from the menu.
Next steps
Congratulations! You've completed this section of the Guided Learning course for
Power BI. Now that you know about modeling data, you're ready to learn about the fun
stuff waiting in the next section: Visualizations.
As mentioned before, this course builds your knowledge by following the common
flow of work in Power BI:
EXCELGENIUSES-NAGARAJU
POWER BI
While you might not do all that work yourself, you'll understand how those
dashboards were created, and how they connected to the data... and when you're
done with this course, you'll be able to create one of your own.
Visualizations
Welcome to the Visualizations section of the Guided Learning course for Power BI. Get
ready for a fun, interesting, and enlightening tour of the many, many visualizations
Power BI has to offer. And this isn't all of them - there are more visualizations coming
all the time!
EXCELGENIUSES-NAGARAJU
POWER BI
It might seem like there are lots of topics in this section, but don't worry: each topic is
short, filled with (you guessed it) visuals, and easy to absorb. You'll likely find yourself
cruising through this section, and imagining how you'll make these visuals present your
own data.
We'll start with the mainstays of visualizations - the simple visuals we're all familiar
with - and make sure you know the ins and outs. Then we'll get more advanced, or at
least a little less common, and fill up your report-creating toolbox.
Power BI has a whole range of visualizations available by default, from simple bar
charts to pie charts to maps, and even more esoteric offerings like waterfalls, funnels,
gauges, and more. Power BI Desktop also offers extensive page formatting tools, such
as shapes and images, that help bring your report to life.
EXCELGENIUSES-NAGARAJU
POWER BI
There are two different ways to create a new visualization in Power BI Desktop:
● You can drag field names from the Fields pane, and drop them on the report
canvas. By default your visualization appears as a table of data.
● You can also click the type of visualization you want to create in
the Visualizations pane. With this method, the default visual is a blank
placeholder that resembles the type of visual you selected.
EXCELGENIUSES-NAGARAJU
POWER BI
Once you create your graph, map, or chart, you can begin dragging data fields onto the
bottom portion of the Visualizationpane to build and organize your visual. The available
fields will change based on the type of visualization that you selected. As you drag and
drop data fields, your visualization will automatically update to reflect changes.
You can resize your visualization by selecting it and then dragging the handles in or out.
You can also move your visualization anywhere on the canvas by clicking and then
dragging it. If you want to convert between different types of visualizations, select the
visual you want to change and simply select a different visual from the icons in
the Visualization pane. Power BI attempts to convert your selected fields to the new
visual type as closely as possible.
As you hover over parts of your visualizations, you'll get a tooltip that contains details
about that segment, such as labels and total value.
EXCELGENIUSES-NAGARAJU
POWER BI
Select the paintbrush icon on the Visualizations pane to make cosmetic changes to
your visual, such as background alignment, title text, and data colors.
The available options for cosmetic changes to your visual vary depending on the type
of visual you have selected.
Combination charts
EXCELGENIUSES-NAGARAJU
POWER BI
Combination charts
When you want to visualize two measures that have very different scales, such as
revenue and units, a combination chart that shows a line and a bar with different axis
scales is very useful. Power BI supports many different types of combination charts by
default, including the popular Line and Stacked Columns charts.
When you create a combination chart, you're presented with a field for Shared
Axis (the X-axis), and then values for your two fields, in this case a column and a line.
The two Y-axis legends appear on either side of the visualization.
EXCELGENIUSES-NAGARAJU
POWER BI
You can also split each column by category, by dragging a category into the Column
Series field in the Visualizations pane. When you do so, each bar is proportionately
colored based on the values within each category.
Combination charts are an effective way to visualize multiple measures that have very
different scales in a single visualization.
Slicers
Slicers are one of the most powerful types of visualizations, particularly as part of a
busy report. A slicer is an on-canvas visual filter in Power BI Desktop that lets anyone
looking at a report segment the data by a particular value, such as by year or by
geographical location.
To add a slicer to your report, select Slicer from the Visualizations pane.
EXCELGENIUSES-NAGARAJU
POWER BI
Drag the field by which you want to slice and drop it top of the slicer placeholder. The
visualization turns into a list of elements with checkboxes. These elements are your
filters - select the box next to one to segment, and all other visualizations on the same
report page are filtered, or sliced, by your selection.
EXCELGENIUSES-NAGARAJU
POWER BI
There are a few different options available to format your slicer. You can set it to
accept multiple inputs at once, or toggle Single Select mode to use one at a time. You
can also add a Select All option to your slicer elements, which is helpful when you
have a particularly long list. Change the orientation of your slicer from the vertical
default to horizontal, and it becomes a selection bar rather than a checklist.
EXCELGENIUSES-NAGARAJU
POWER BI
Map visualizations
Power BI has two different types of map visualizations: a bubble map that places a bubble over
a geographic point, and a shape map that actually shows the outline of area you want to
visualize.
Note
When working with countries or regions, use the three-letter abbreviation to ensure
that geocoding works properly in map visualizations. Do not use two-letter
abbreviations, as some countries or regions may not be properly recognized. If you
only have two-letter abbreviations, check out this external blog post for steps on how
to associate your two-letter country/region abbreviations with three-letter
country/region abbreviations.
EXCELGENIUSES-NAGARAJU
POWER BI
To create a bubble map, select the Map option in the Visualization pane. You must add
a value to the Location bucket in the Visualizations options to use a map visual.
Power BI is flexible about what type of location value it accepts, from more general
details like city name or airport code, down to very specific latitude and longitude data.
Add a field to the Size bucket to change the size of the bubble accordingly for each
map location.
EXCELGENIUSES-NAGARAJU
POWER BI
A warning icon in the top left corner of your visual indicates that the map needs more
location data to accurately plot values. This is a particularly common problem when
the data in your location field is ambiguous, such as using an area name
EXCELGENIUSES-NAGARAJU
POWER BI
like Washington that could indicate a state or a district. One way to resolve this
problem is to rename your column to be more specific, such as State. Another way to
resolve it is to manually reset the data category by selecting Data Category in the
Modeling tab. From there you can assign a category to your data such as "State" or
"City".
EXCELGENIUSES-NAGARAJU
POWER BI
If you have numerical information in a table, such as revenue, a total sum will appear at
the bottom. You can manually sort by each column by clicking on its header to toggle
ascending or descending order. If a column is not wide enough to display all of its
contents, click and drag the header sideways to expand it.
The order of the fields in the Values bucket in the Visualizations pane determines the
order in which they appear in your table.
A matrix is similar to a table, but it has different category headers on the columns and
rows. As with tables, numerical information will be automatically totaled along the
bottom and right side of the matrix.
EXCELGENIUSES-NAGARAJU
POWER BI
There are many cosmetic options available for matrixes, such as auto-sizing columns,
toggling row and column totals, setting colors, and more. When creating a matrix,
make sure your categorical data (the non-number data) is on the left of the matrix, and
the numeric files on the right to ensure the horizontal scroll bar appears, and to make
sure that scrolling behavior works properly.
Scatter charts
If you want to compare two different measures, such as unit sales verses revenue, a
common visualization to use is a scatter chart.
EXCELGENIUSES-NAGARAJU
POWER BI
To create a blank chart, select Scatter chart from the Visualizations pane. Drag and
drop the two fields you want to compare from the Fields pane to the X Axis and Y
Axis options buckets. At this point, your scatter chart probably just has a small bubble
in the center of the visual - you need to add a measure to the Details bucket to indicate
how you would like to segment your data. For example, if are comparing item sales
and revenue, perhaps you want to split the data by category, or manufacturer, or
month of sale.
Adding an additional field to the Legend bucket color-codes your bubbles according to
the field's value. You can also add a field to the Size bucket to alter the bubble size
according to that value.
EXCELGENIUSES-NAGARAJU
POWER BI
Scatter charts have many visual formatting options as well, such as turning on an
outline for each colored bubble and toggling individual labels. You can change the data
colors for other chart types, as well.
EXCELGENIUSES-NAGARAJU
POWER BI
You can create an animation of your bubble chart's changes over time by adding a
time-based field to the Play Axis bucket. Click on a bubble during an animation to see a
trace of its path.
EXCELGENIUSES-NAGARAJU
POWER BI
Note
Remember, if you only see one bubble in your scatter chart, it's because Power BI is
aggregating your data, which is the default behavior. Add a category to
the Details bucket, in the Visualizations pane, to get more bubbles.
Waterfall and funnel charts
Waterfall and funnel charts are two of the more interesting (and perhaps uncommon)
standard visualizations that are included in Power BI. To create a blank chart of either
type, select its icon from the Visualizations pane.
EXCELGENIUSES-NAGARAJU
POWER BI
Waterfall charts are typically used to show changes in a particular value over time.
EXCELGENIUSES-NAGARAJU
POWER BI
Waterfalls only have two bucket options: Category and Y Axis. Drag a time-based field
such as year to the Category bucket, and the value you want to track to the Y
Axis bucket. Time periods where there was an increase in value are displayed in green
by default, while periods with a decrease in value are displayed in red.
Funnel charts are typically used to show changes over a particular process, such as a
sales pipeline or website retention efforts.
EXCELGENIUSES-NAGARAJU
POWER BI
Both Waterfall and Funnel charts can be sliced and visually customized.
Previous
https://docs.microsoft.com/en-us/power-bi/guided-learning/visualizations?tutorial-step=8
DAX
Data Analysis Expressions (DAX) is a formula language introduced by
Microsoft in Power Pivot and Analysis Services Tabular to define calculations
and queries.
DAX is a collection of functions, operators, and constants that can be used in a formula,
or expression, to calculate and return one or more values. Stated more simply, DAX
helps you create new information from data already in your model.
DAX is a collection of functions, operators, and constants that can be used in a formula,
or expression, to calculate and return one or more values. Stated more simply, DAX
helps you create new information from data already in your model.
EXCELGENIUSES-NAGARAJU
POWER BI
market trends? DAX formulas provide this capability and many other important
capabilities as well. Learning how to create effective DAX formulas will help you get
the most out of your data. When you get the information you need, you can begin to
solve real business problems that affect your bottom line. This is the power in Power
BI, and DAX will help you get there.
Prerequisites
You might already be familiar with creating formulas in Microsoft Excel. That
knowledge will be helpful in understanding DAX, but even if you have no experience
with Excel formulas, the concepts described here will help you get started creating
DAX formulas and solving real-world BI problems right away.
We’re going to focus on understanding DAX formulas used in calculations, more
specifically, in measures and calculated columns. You should already be familiar with
Power BI Desktop, importing data, adding fields to a report, and you should also be
familiar with fundamental concepts of Measures and Calculated columns.
By Using DAX :
We Can Calculate/Create Measure, Column & Table
DAX
Let's begin!
We will frame our understanding of DAX around three fundamental
concepts: Syntax,Functions, and Context. Of course, there are other important
EXCELGENIUSES-NAGARAJU
POWER BI
concepts in DAX, but understanding these three concepts will provide the best
foundation on which to build your DAX skills.
Syntax
Before you create your own formulas, let’s take a look at DAX formula syntax. Syntax
includes the various elements that make up a formula, or more simply, how the
formula is written. For example, let’s look at a simple DAX formula for a measure.
Functions
Functions are predefined formulas that perform calculations by using specific values,
called arguments, in a particular order or structure. Arguments can be other functions,
another formula, expression, column references, numbers, text, logical values such as
TRUE or FALSE, or constants.
Context
Context is one of the most important DAX concepts to understand. There are two
types of context in DAX; row context and filter context. We’ll first look at row context.
Row Context
Row context is most easily thought of as the current row. It applies whenever a
formula has a function that applies filters to identify a single row in a table. The function
will inherently apply a row context for each row of the table over which it is filtering.
This type of row context most often applies to measures.
EXCELGENIUSES-NAGARAJU
POWER BI
Filter Context
Filter context is a little more difficult to understand than row context. You can most
easily think of filter context as: One or more filters applied in a calculation that
determines a result or value.
=now() =now()
EXCELGENIUSES-NAGARAJU
POWER BI
data is:
below table is the sample data then copy into excel sheet
and load into the power BI Desktop Application.
state model sales date
andhra pradesh polo 25000 01-01-2017
telangana vista 36000 31-01-2017
rajistan polo 5000 02-03-2017
assam vista 5600 01-04-2017
upper pradesh polo 6200 01-05-2017
andhra pradesh vista 6800 31-05-2017
telangana polo 7400 30-06-2017
rajistan vista 8000 30-07-2017
assam polo 8600 29-08-2017
upper pradesh vista 9200 28-09-2017
andhra pradesh polo 9800 28-10-2017
EXCELGENIUSES-NAGARAJU
POWER BI
EXCELGENIUSES-NAGARAJU
POWER BI
new measure:
assamsalestot =
CALCULATE(SUM(Sheet1[sales]),FILTER(Sheet1,Sheet1[state]
="assam"))
new measure:
polosalestot =
CALCULATE(SUM(Sheet1[sales]),FILTER(Sheet1,Sheet1[model
]="polo"))
EXCELGENIUSES-NAGARAJU
POWER BI
new measure:
or condition :
calculate the sum of assam and Telangana sales
assamsandtelanganasalestot =
CALCULATE(SUM(Sheet1[sales]),FILTER(Sheet1,Sheet1[state]
="assam"||Sheet1[state]="telangana"))
new measure:
2018 year tot sales =
CALCULATE(SUM(Sheet1[sales]),FILTER(Sheet1,Sheet1[date].
[Year]=2018))
Here sheet1 is the table name,date is column
name .year=2018
EXCELGENIUSES-NAGARAJU
POWER BI
new measure:
new measure:
sum of tot sales month is jan and state is telangana
monthjan&statetelangana_totsales =
CALCULATE(SUM(Sheet1[sales]),FILTER(Sheet1,Sheet1[date].
[Month]="january" && Sheet1[state]="telangana"))
CALCULATED COLUMNS
Additio
DAX Formula Description nal
links
Concatenate
string - it is
recommended
to use operator
"&" instead of
=[ChannelLabel] & " - " & [ChannelName]
function
"Concatenate"
as function
accepts just 2
parameters
=CONCATENATE( CONCATENATE( [ChannelLabel], " - Concatenate
"), [ChannelName]) string
=Format([Datekey], "YYYY-MM-DD") Converts date
type value to
EXCELGENIUSES-NAGARAJU
POWER BI
string.
Formating
options are:
YYYY- 4 digit
year, example
"2010"
YY - 2 digit
year, example
"10"
MM - 2 digit
month, example
"06"
MMM - short
month name,
example "Jun"
MMMM - long
month name,
example "June"
DD - 2 digit
day, example
07
DDD - short
weekday name,
example "Mon"
DDDD - long
weekday name,
example
"Monday"
Create date
=Date(2010, 6, 1)
type field
Create date
=Date(2010,6,1) + Time(20,15,0) and time type
field
Follow relation
ship and
retrieve related
value from
another table.
Example: add
=Related(DimProductCategory[ProductCategoryName]) this calculation
for Product
table to
calculate
related
ProductCategor
y column.
EXCELGENIUSES-NAGARAJU
POWER BI
EXCELGENIUSES-NAGARAJU
POWER BI
percentage of
total sales.
Example: For
ProductCategor
y table add
column
"SalesWeight"
with this
formula that
calculates
percentage of
that
ProductCategor
y sales over
grand total
sales. This
formula sums
each Product
category total
sales and
divides by
grand total of
all sales.
For current row
calculate
number of
distinct values
from related
table.
Example: when
=CALCULATE(COUNTROWS(DISTINCT(FactSales[Produ you add this
ctKey]))) calculation to
dimDate table,
then for each
row (day) you
will get distinct
number of
ProductKey
sold that day.
EXCELGENIUSES-NAGARAJU
POWER BI
CALCULATED MEASURES
Addition
DAX Formula Description
al links
Distinct count
=COUNTROWS( DISTINCT( FactSales[ProductKey calculation.
])) Example: number of Marco
distinct products sold Russo
for current Pivot
selection
Many to many
calculation.
We have accounts
table with amount and
customer table. There
=CALCULATE( SUM(Accounts[Amount]), is also Cross table that
Marco
( FILTER( VALUES(Accounts[Account]), contains relationship
Russo
COUNTROWS(RELATEDTABLE(Cross)) > 0) ) ) between customers
and accounts. We
follow this many-to-
many relationship and
calculate proper
account SUM value
= SUMX (FactSales, [UnitPrice] * [SalesQuantity]) Sum of two multiplied
columns
=SUM(FactSales[SalesAmount]) / Sales ratio to Product
CALCULATE(SUM(FactSales[SalesAmount]), category. We place
ALL(DimProductCategory[ProductCategoryName])) ProductCategory on
row and create
calculated measure
with this formula. We
calculate total sales
for this Product
EXCELGENIUSES-NAGARAJU
POWER BI
Last year to
date
Month to date
Last month to
date
Previous Mont
h
=IF( COUNTROWS(VALUES(DimDate[CalendarYear]))= Previous Year
1
, CALCULATE([Sales],
EXCELGENIUSES-NAGARAJU
POWER BI
PREVIOUSYEAR(DimDate[DateKey]))
, BLANK()
)
or
=IF(
COUNTROWS(VALUES(DimDate[CalendarYear]))=1 ,
CALCULATE([Sales],
PARALLELPERIOD(DimDate[Datekey],-12,MONTH))
, BLANK()
)
or
=IF(
COUNTROWS(VALUES(DimDate[CalendarYear]))=1 ,
[Sales] (PARALLELPERIOD(DimDate[Datekey],-
12,MONTH)),
BLANK()
)
=IF(COUNTROWS(VALUES(DimDate[CalendarYear]) = 1
, [Sales] - CALCULATE([Sales],
PREVIOUSYEAR(DimDate[Datekey])) Year over year
, Blank() growth
)
EXCELGENIUSES-NAGARAJU
POWER BI
The Azure AD report does not indicate if a user is Free of Pro within Power BI. It only
reports which users have signed in to Power BI and when they logged in. If a user is
listed in this report, it does not necessarily mean that they are eligible for the Extended
Pro Trial.
EXCELGENIUSES-NAGARAJU
POWER BI
EXCELGENIUSES-NAGARAJU
POWER BI
The list of data sources for Power BI is extensive, but it can be grouped into the
following:
● Data from Excel and Power BI Desktop files.
● Content packs for services, with ready-made dashboards, reports, and datasets for
services such as Salesforce. In addition to establishing a data connection, Power BI
provides pre-built dashboards and reports for each of these services.
● Connectors to databases and other datasets such as Azure SQL Database and SQL
Server Analysis Services tabular data.
Read more about getting data in Power BI.
EXCELGENIUSES-NAGARAJU
POWER BI
EXCELGENIUSES-NAGARAJU
POWER BI
EXCELGENIUSES-NAGARAJU
POWER BI
● - Visualizations
- Datasets
- Reports
- Dashboards
- Tiles
● Visualizations
● Visualization is a visual representation of data.
Example:
Pie Chart, Line Graph, Side by Side Bar Charts, Graphical
Presentation of the source data on top of geographical map, tree
map etc.
● Datasets
● Dataset is a collection of data that Power BI uses to create its
visualizations.
Example:
Excel sheets, oracle or sql server tables.
● Reports
● Report is a collection of visualizations that appear together on one or
more pages.
Example:
Sales by Country, State, City Report, Logistic Performance Report,
Profit by Products report etc.
● Dashboards
● Dashboard is single layer presentation of multiple visualization. i.e we
can integrate one or more visualizations in to one page layer.
Example:
Sales dashboard can have pie charts, geographical maps and bar
charts.
● Tiles
EXCELGENIUSES-NAGARAJU
POWER BI
Example:
Pie Chart in Dashboard or Report.
● Difference between Microsoft Business Intelligence MSBI and Power BI. SSIS,
SSAS and SSRS.
● Microsoft Business Intelligence - MSBI
● Microsoft product with ETL capability, multidimensional data
organizing capability and visualization ability. MSBI comes with three
sub components to support earlier mentioned functionalities. The
following are the components of MSBI:
● MSBI - SSIS
● This component works as an Data Integration Service which can
perform up to some level of ETL acitivity.
● MSBI - SSAS
● This component works as Multi Dimensional data storage using a
CUBE to store the facts and dimensions.
● MSBI - SSRS
● This component works as Data Visualization layer by allowing to
create Dashboards and Reports.
● POWER BI
● This is a new Product from Microsoft. Designed to improve the Self-
Service capabilities of older SSRS. Power BI desktop allows to
create reports on the fly and publish them. Using any browser end
users can view the reports.
EXCELGENIUSES-NAGARAJU
POWER BI
Note: Work email addresses ending in .gov and .mil aren’t currently supported.
What is DAX ?
To do basic calculation and data analysis on data in power pivot we use Data Analysis
Expression (DAX).It is formula language to compute calculated column and calculated
field.
For the measure named Total Sales, calculate (=) the SUM of values in the
[SalesAmount ] column in the Sales table.
A- Measure Name
B- equal sign – indicate beginning of formula
C- DAX Function
D- Parenthesis for Sum Function
E- Referenced Table
F- Referenced column name
EXCELGENIUSES-NAGARAJU
POWER BI
● Content packs for services, with ready-made dashboards, reports, and datasets
for services such as Salesforce. In addition to establishing a data connection,
Power BI provides pre-built dashboards and reports for each of these services.
● Connectors to databases and other datasets such as Azure SQL Databaseand
SQL Server Analysis Services tabular data.
What are content packs?
● Content packs for services are pre-built solutions for popular services as part of
the Power BI experience. A subscriber to a supported service can quickly
connect to their account from Power BI and see their data through live
dashboards and interactive reports that have been pre-built for them. We’ve
released content packs for popular services such as Salesforce.com, Marketo,
Adobe Analytics, Azure Mobile Engagement, CircuitID, comScore Digital
Analytix, Quickbooks Online, SQL Sentry, and tyGraph. Over the coming
months, we’ll extend this to include content packs and integrations for Sage,
SpaceCurve, Sumo Logic, Zuora, Planview, Insightly, Troux, Inkling, and others.
● Organizational content packs provide users, BI professionals, and system
integrators the tools to build their own content packs to share purpose-built
dashboards, reports, and datasets within their organization.
What are the different Excel BI add ins?
● Power Query—find, edit and load external data
● PowerPivot—for data modeling for analysis
● Power View—design visually and interactively reports
● Power Map—display insights on 3D Map
16.What do I need to install in order to use Power BI?
To use the Power BI service for free, you just need a Web browser and email.
You can download the Power BI mobile apps from their respective stores:
● App Store
● Google Play
● Windows Store
Where do I get started with Power BI?
The following resources are available to help get your started:
● Power BI Blog
● Webinars
● Getting started videos on our YouTube Channel
● Get started with Power BI article
● Join our community and ask questions
EXCELGENIUSES-NAGARAJU
POWER BI
What is OLAP?
OLAP stands for On-Line Analytical Processing. It stands for a category of applications
and technologies that allow the collection, storage, manipulation and reproduction of
multidimensional data, with the goal of analysis.
EXCELGENIUSES-NAGARAJU
POWER BI
the older Silverlight reports are not compatible in PowerBI and needs to be
recreated in PowerBI.
7. PowerMap/ 3D Maps: It started as a 3D data visualization tool in Excel 2013. It
is now renamed as 3D maps and it an Excel 2016 Ad-In. Currently, there are no
web versions of this tool.
PowerBI.com, on the other hand, is the Cloud Service where users will eventually
publish their PowerBI Desktop & Excel DataModels & Reports and share it with
others within the organization. Here is a side by side comparison with screenshots:
In Excel 2010/2013/2016 you can embed Data Models using PowerPivot Add-On.
PowerPivot allows a user to create SSAS Tabular models using a familiar Excel user
interface.
EXCELGENIUSES-NAGARAJU
POWER BI
EXCELGENIUSES-NAGARAJU
POWER BI
EXCELGENIUSES-NAGARAJU
POWER BI
EXCELGENIUSES-NAGARAJU
POWER BI
EXCELGENIUSES-NAGARAJU
POWER BI
EXCELGENIUSES-NAGARAJU