Power Bi PDF
Power Bi PDF
Data is at the heart of Power BI. Let's say you're exploring data. You may do that by creating charts and
dashboards, or asking questions with Q&A . The visualizations and answers you see are getting their underlying
data from a dataset. But where does that dataset come from? Well, it comes from a data source.
In this article, we're going to cover the data source types you can connect to from the Power BI service. Keep in
mind that there are many other types of data sources you can get data from, too. If you choose these data sources,
you may need to use Power BI Desktop or Excel's advanced data query and modeling features first. We'll go into
more about those options later. For now, let's look at the different types of data sources available right from your
Power BI service site.
You can get data from any of the data sources in Power BI by selecting Get Data in the bottom-left corner of the
page.
After you select Get Data , you can choose the data you want to access
Discover content
The Discover content section contains all the data and reports you need already prepared for you. In Power BI,
there are two types of content packs: Organizational and Services.
Organizational : If you and other users in your organization have a Power BI Pro account, you can create, share,
and use content packs. To learn more, see Intro to organizational content packs.
Ser vices : There are literally dozens of services with content packs for Power BI, and more are being added all the
time. Most services require you to have an account. To learn more, see Connect to services you use with Power BI.
Excel (.xlsx, .xlsm) - In Excel, a workbook may include different data types. For example, it can include data you've
entered into worksheets yourself. It can also include data that you've queried and loaded from external data
sources by using Power Query. Power Query is available through Get & Transform in Excel 2016 or Power Pivot.
You may import data from tables in worksheets, or import data from a data model. To learn more, see Get data
from files for Power BI.
Power BI Desktop (.pbix) - You can use Power BI Desktop to query and load data from external data sources and
create reports. You can also extend your data model with measures and relationships, or import your Power BI
Desktop file into your Power BI site. Power BI Desktop is best for more advanced users. Typically these users are
ones who have a good understanding of their data sources. They also understand data query and transformation,
and data modeling concepts. To learn more, see Connect to data in Power BI Desktop.
Comma-Separated Value (.csv) - Files are simple text files with rows of data. Each row may contain one or more
values, each separated by a comma. For example, a .csv containing name and address data might have many rows.
Each row may have values for first name, last name, street address, city, state, and so on. You can't import data into
a .csv file, but many applications, like Excel, can save simple table data as a .csv file.
For other file types, like XML Table (.xml) or text (.txt) files, you can use Get & Transform to query, transform, and
load that data into an Excel or Power BI Desktop file first. You can then import the Excel or Power BI Desktop file
into Power BI.
Where you store your files makes a significant difference, too. OneDrive for Business provides the greatest amount
of flexibility and integration with Power BI. It's OK to keep your files on your local drive. Though if you need to
refresh your data, there are a few extra steps. For more information, see the article links below.
Databases
Databases in the Cloud - From the Power BI service, you can connect live to:
Azure SQL Database
Azure SQL Data Warehouse
Spark on Azure HDInsight
Connections from Power BI to these databases are live. Let's say you connect to an Azure SQL Database. You then
begin exploring its data by creating reports in Power BI. Whenever you slice your data or add another field to a
visualization, Power BI makes a query right to the database. To learn more, see Azure and Power BI.
Databases on-premises - From the Power BI service, you can connect directly to SQL Server Analysis Services
Tabular model databases. To do so, you'll need a Power BI Enterprise gateway. If you're not clear on how to connect
to your organization's tabular model database, check with your administrator or IT department. To learn more, see
SQL Server Analysis Services live data in Power BI.
For other database types in your organization, you'll need to use Power BI Desktop or Excel to connect to, query,
and load data into a data model. You can then import your file into Power BI where a dataset exists. If you
configure a scheduled refresh, Power BI will use that configuration and connection information from the file to
connect directly to the datasource and query for updates. Power BI then loads those updates into the dataset. To
learn more, see Connect to data in Power BI Desktop.
Data refresh
Maybe you save your files on your local drive or a drive somewhere in your organization. You may need a Power
BI gateway so that you can refresh the dataset in Power BI. The computer that stores the file needs to be on when a
refresh happens. You can reimport your file or use Publish from Excel or Power BI Desktop, but those options
aren't automated processes.
If you save your files on OneDrive for Business or SharePoint - Team Sites, you can then connect to or import them
into Power BI. Then, your dataset, reports, and dashboard will always be up-to-date. Because both OneDrive and
Power BI are in the cloud, Power BI can connect directly to your saved file. It connects about once every hour and
checks for updates. The dataset and any visualizations refresh automatically if there are any updates.
Content packs from services are automatically updated. In most cases, they're updated once a day. You can
manually refresh, but if you see any updated data will depend on the service provider. Updates to content packs
from people in your organization will depend on the data sources used. They'll also depend on how the person
who created the content pack configured the refresh.
Azure SQL Database, Azure SQL Data Warehouse, and Spark on Azure HDInsight are data sources in the Cloud.
The Power BI service is also in the cloud so Power BI can connect to those data sources live, using DirectQuer y .
What you see in Power BI is always in sync and there's no need to set up a scheduled refresh.
When you connect to SQL Server Analysis Services from Power BI, it's a live connection just like an Azure database
in the cloud. The difference is the database itself is on a server in your organization. This type of connection
requires a Power BI gateway, which an IT department configures.
Data refresh is a super important part of Power BI, and much too deep to cover here. If you want to get a thorough
understanding, be sure to check out Data Refresh in Power BI.
NOTE
We recently revised the on-premises data gateway docs. We split them into content that's specific to Power BI and general
content that applies to all services that the gateway supports. You're currently in the Power BI content. To provide feedback
on this article, or the overall gateway docs experience, scroll to the bottom of the article.
The on-premises data gateway acts as a bridge to provide quick and secure data transfer between on-premises
data (data that isn't in the cloud) and several Microsoft cloud services. These cloud services include Power BI,
PowerApps, Power Automate, Azure Analysis Services, and Azure Logic Apps. By using a gateway, organizations
can keep databases and other data sources on their on-premises networks, yet securely use that on-premises
data in cloud services.
For more information on how the gateway works, see On-premises data gateway architecture.
Types of gateways
There are two different types of gateways, each for a different scenario:
On-premises data gateway allows multiple users to connect to multiple on-premises data sources. You
can use an on-premises data gateway with all supported services, with a single gateway installation. This
gateway is well-suited to complex scenarios with multiple people accessing multiple data sources.
On-premises data gateway (personal mode) allows one user to connect to sources, and can’t be
shared with others. An on-premises data gateway (personal mode) can be used only with Power BI. This
gateway is well-suited to scenarios where you’re the only person who creates reports, and you don't need
to share any data sources with others.
Use a gateway
There are four main steps for using a gateway.
1. Download and install the gateway on a local computer.
2. Configure the gateway based on your firewall and other network requirements.
3. Add gateway admins who can also manage and administer other network requirements.
4. Use the gateway to refresh an on-premises data source.
5. Troubleshoot the gateway in case of errors.
Next steps
Install the on-premises data gateway
More questions? Try the Power BI Community
Quickstart: Connect to data in Power BI Desktop
5/13/2020 • 2 minutes to read • Edit Online
In this quickstart, you connect to data using Power BI Desktop, which is the first step in building data models and
creating reports.
If you're not signed up for Power BI, sign up for a free trial before you begin.
Prerequisites
To complete the steps in this article, you need the following resources:
Download and install Power BI Desktop, which is a free application that runs on your local computer. You can
download Power BI Desktop directly, or you can get it from the Microsoft Store.
Download this sample Excel workbook, and create a folder called C:\PBID-qs where you can store the Excel file.
Later steps in this quickstart assume that is the file location for the downloaded Excel workbook.
For many data connectors in Power BI Desktop, Internet Explorer 10 (or newer) is required for authentication.
The Get Data window appears. You can choose from the many different data sources to which Power BI Desktop
can connect. In this quickstart, use the Excel workbook that you downloaded in Prerequisites.
Since this data source is an Excel file, select Excel from the Get Data window, then select the Connect button.
Power BI prompts you to provide the location of the Excel file to which to connect. The downloaded file is called
Financial Sample. Select that file, and then select Open .
Power BI Desktop then loads the workbook and reads its contents, and shows you the available data in the file
using the Navigator window. In that window, you can choose which data you would like to load into Power BI
Desktop. Select the tables by marking the checkboxes beside each table you want to import. Import both available
tables.
Once you've made your selections, select Load to import the data into Power BI Desktop.
Next steps
There are all sorts of things you can do with Power BI Desktop once you've connected to data. You can create
visuals and reports. Take a look at the following resource to get you going:
Get started with Power BI Desktop
Tutorial: Shape and combine data in Power BI
Desktop
5/13/2020 • 13 minutes to read • Edit Online
With Power BI Desktop, you can connect to many different types of data sources, then shape the data to meet
your needs, enabling you to create visual reports to share with others. Shaping data means transforming the
data: renaming columns or tables, changing text to numbers, removing rows, setting the first row as headers, and
so on. Combining data means connecting to two or more data sources, shaping them as needed, then
consolidating them into a useful query.
In this tutorial, you'll learn how to:
Shape data by using Query Editor.
Connect to different data sources.
Combine those data sources, and create a data model to use in reports.
This tutorial demonstrates how to shape a query by using Power BI Desktop, highlighting the most common
tasks. The query used here is described in more detail, including how to create the query from scratch, in Getting
Started with Power BI Desktop.
Query Editor in Power BI Desktop makes ample use of right-click menus, as well as the Transform ribbon. Most
of what you can select in the ribbon is also available by right-clicking an item, such as a column, and choosing
from the menu that appears.
Shape data
When you shape data in Query Editor, you provide step-by-step instructions for Query Editor to carry out for you
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 (such as rename a table, transform a data type, or delete a column) are recorded by Query
Editor. Each time this query connects to the data source, Query Editor carries out those steps so that the data is
always shaped the way you specify. This process occurs whenever you use Query Editor, or for anyone who uses
your shared query, such as on the Power BI service. Those steps are captured, sequentially, in the Quer y
Settings pane, under Applied Steps . We’ll go through each of those steps in the next few paragraphs.
From Getting Started with Power BI Desktop, let's use the retirement data, which we found by connecting to a
web data source, to shape that data to fit our needs. We'll add a custom column to calculate rank based on all
data being equal factors, and compare this column to the existing column, Rank .
1. From the Add Column ribbon, select Custom Column , which lets you add a custom column.
2. In the Custom Column window, in New column name , enter New Rank. In Custom column formula ,
enter the following data:
([Cost of living] + [Weather] + [Health care quality] + [Crime] + [Tax] + [Culture] + [Senior] +
[#"Well-being"]) / 8
3. Make sure the status message is No syntax errors have been detected, and select OK .
4. To keep column data consistent, transform the new column values to whole numbers. To change them,
right-click the column header, and then select Change Type > Whole Number .
If you need to choose more than one column, select a column, hold down SHIFT , select additional
adjacent columns, and then right-click a column header. You can also use the CTRL key to choose non-
adjacent columns.
5. To transform column data types, in which you transform the current data type to another, select Data
Type Text from the Transform ribbon.
6. In Quer y Settings , the Applied Steps list reflects any shaping steps applied to the data. To remove a
step from the shaping process, select the X to the left of the step.
In the following image, the Applied Steps list reflects the added steps so far:
Source : Connecting to the website.
Navigation : Selecting the table.
Changed Type : Changing text-based number columns from Text to Whole Number.
Added Custom : Adding a custom column.
Changed Type1 : The last applied step.
Adjust data
Before we can work with this query, we need to make a few changes to adjust its data:
Adjust the rankings by removing a column.
We've decided Cost of living is a non-factor in our results. After removing this column, we find that the
data remains unchanged.
Fix a few errors.
Because we removed a column, we need to readjust our calculations in the New Rank column, which
involves changing a formula.
Sort the data.
Sort the data based on the New Rank and Rank columns.
Replace the data.
We'll highlight how to replace a specific value and the need of inserting an Applied Step .
Change the table name.
Because Table 0 isn't a useful descriptor for the table, we'll change its name.
1. To remove the Cost of living column, select the column, choose the Home tab from the ribbon, and then
select Remove Columns .
Notice the New Rank values haven't changed, due to the ordering of the steps. Because Query Editor
records the steps sequentially, yet independently, of each other, you can move each Applied Step up or
down in the sequence.
2. Right-click a step. Query Editor provides a menu that lets you do the following tasks:
Rename ; Rename the step.
Delete : Delete the step.
Delete Until End : Remove the current step, and all subsequent steps.
Move Up : Move the step up in the list.
Move Down : Move the step down in the list.
3. Move up the last step, Removed Columns , to just above the Added Custom step.
4. Select the Added Custom step.
Notice the data now shows Error, which we'll need to address.
There are a few ways to get more information about each error. If you select the cell without clicking on
the word Error, Query Editor displays the error information on the bottom of the window.
If you select the word Error directly, Query Editor creates an Applied Step in the Quer y Settings pane
and displays information about the error.
5. Because we don't need to display information about the errors, select Cancel .
6. To fix the errors, select the New Rank column, then display the column's data formula by selecting the
Formula Bar checkbox from the View tab.
7. Remove the Cost of living parameter and decrement the divisor, by changing the formula as follows:
Table.AddColumn(#"Removed Columns", "New Rank", each ([Weather] + [Health care quality] + [Crime] +
[Tax] + [Culture] + [Senior] + [#"Well-being"]) / 7)
8. Select the green checkmark to the left of the formula box or press Enter .
Query Editor replaces the data with the revised values and the Added Custom step completes with no errors.
NOTE
You can also select Remove Errors , by using the ribbon or the right-click menu, which removes any rows that have errors.
However, we didn't want to do so in this tutorial because we wanted to preserve the data in the table.
1. Sort the data based on the New Rank column. First, select the last applied step, Changed Type1 to
display the most recent data. Then, select the drop-down located next to the New Rank column header
and select Sor t Ascending .
The data is now sorted according to New Rank . However, if you look at the Rank column, you'll notice
the data isn't sorted properly in cases where the New Rank value is a tie. We'll fix it in the next step.
2. To fix the data sorting issue, select the New Rank column and change the formula in the Formula Bar to
the following formula:
3. Select the green checkmark to the left of the formula box or press Enter .
The rows are now ordered in accordance with both New Rank and Rank . In addition, you can select an
Applied Step anywhere in the list, and continue shaping the data at that point in the sequence. Query
Editor automatically inserts a new step directly after the currently selected Applied Step .
4. In Applied Step , select the step preceding the custom column, which is the Removed Columns step.
Here we'll replace the value of the Weather ranking in Arizona. Right-click the appropriate cell that
contains Arizona's Weather ranking, and then select Replace Values . Note which Applied Step is
currently selected.
5. Select Inser t .
Because we're inserting a step, Query Editor warns us about the danger of doing so; subsequent steps
could cause the query to break.
Combine data
The data about various 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. We need a 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. TO shape the data, follow these steps:
1. From the Home ribbon in Query Editor, select New Source > Web .
2. Enter the address of the website for state abbreviations,
https://en.wikipedia.org/wiki/List_of_U.S._state_abbreviations, and then select Connect .
The Navigator displays the content of the website.
3. Select Codes and abbreviations .
TIP
It will take quite a bit of shaping to pare this table’s data down to what we want. Is there a faster or easier way to
accomplish the steps below? Yes, we could create a relationship between the two tables, and shape the data based
on that relationship. The following steps are still good to learn for working with tables; however, relationships can
help you quickly use data from multiple tables.
NOTE
If Power BI accidentally imports the table headers as a row in your data table, you can select Use First Row As
Headers from the Home tab, or from the Transform tab in the ribbon, to fix your table.
2. Remove the bottom 26 rows. These rows are U.S. territories, which we don’t need to include. From the
Home ribbon, select Reduce Rows > Remove Rows > Remove Bottom Rows .
3. Because the RetirementStats table doesn't have information for Washington DC, we need to filter it from
our list. Select the Region Status drop-down, then clear the checkbox beside Federal district .
4. Remove a few unneeded columns. Because we need only the mapping of each state to its official two-
letter abbreviation, we can remove the following columns: Column1 , Column3 , Column4 , and
Column6 through Column11 . First select Column1 , then hold down the CTRL key and select each of
the other columns to be removed. From the Home tab on the ribbon, select Remove Columns >
Remove Columns .
NOTE
This is a good time to point out that the sequence of applied steps in Query Editor is important, and can affect
how the data is shaped. It’s also important to consider how one step may impact another subsequent step; if you
remove a step from the Applied Steps, subsequent steps may not behave as originally intended, because of the
impact of the query’s sequence of steps.
NOTE
When you resize the Query Editor window to make the width smaller, some ribbon items are condensed to make
the best use of visible space. When you increase the width of the Query Editor window, the ribbon items expand to
make the most use of the increased ribbon area.
5. Rename the columns and the table. There are a few ways to rename a column: First, select the column,
then either select Rename from the Transform tab on the ribbon, or right-click and select Rename . The
following image has arrows pointing to both options; you only need to choose one.
6. Rename the columns to State Name and State Code. To rename the table, enter the Name in the Quer y
Settings pane. Name this table StateCodes.
Combine queries
Now that we’ve shaped the StateCodes table the way we want, let’s combine these two tables, or queries, into
one. Because the tables 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’d like to add to another query, you merge the queries.
When you have additional rows of data that you’d like to add to an existing query, you append the query.
In this case, we want to merge the queries. To do so, follow these steps:
1. From the left pane of Query Editor, select the query into which you want the other query to merge. In this
case, it's RetirementStats .
2. Select Combine > Merge Queries from the Home tab on the ribbon.
You may be prompted to set the privacy levels, to ensure the data is combined without including or
transferring data you don't want transferred.
The Merge window appears. It prompts you to select which table you'd like merged into the selected
table, and the matching columns to use for the merge.
3. Select State from the RetirementStats table, then select the StateCodes query.
When you select the correct matching columns, the OK button is enabled.
4. Select OK .
Query Editor creates a NewColumn column at the end of the query, which contains the contents of the
table (query) that was merged with the existing query. All columns from the merged query are condensed
into the NewColumn column, but you can Expand the table and include whichever columns you want.
5. To expand the merged table, and select which columns to include, select the expand icon ( ).
The Expand window appears.
6. In this case, we want only the State Code column. Select that column, clear Use original column name
as prefix , and then select OK .
If we had left the checkbox selected for Use original column name as prefix , the merged column
would be named NewColumn.State Code .
NOTE
Want to explore how to bring in the NewColumn table? You can experiment a bit, and if you don’t like the results,
just delete that step from the Applied Steps list in the Quer y Settings pane; your query returns to the state
prior to applying that Expand step. You can do this as many times as you like until the expand process looks the
way you want it.
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 many additional and interesting data connections,
such as housing cost statistics, demographics, or job opportunities in any state.
7. To apply your changes and close Query Editor, select Close & Apply from the Home ribbon tab.
The transformed dataset appears in Power BI Desktop, ready to be used for creating reports.
Next steps
For more information on Power BI Desktop and its capabilities, see the following resources:
What is Power BI Desktop?
Query overview in Power BI Desktop
Data sources in Power BI Desktop
Connect to data in Power BI Desktop
Common query tasks in Power BI Desktop
Tutorial: Analyze webpage data by using Power BI
Desktop
9/9/2020 • 7 minutes to read • Edit Online
As a long-time soccer fan, you want to report on the UEFA European Championship (Euro Cup) winners over the
years. With Power BI Desktop, you can import this data from a web page into a report and create visualizations that
show the data. In this tutorial, you learn how to use Power BI Desktop to:
Connect to a web data source and navigate across its available tables.
Shape and transform data in the Power Query Editor.
Name a query and import it into a Power BI Desktop report.
Create and customize a map and a pie chart visualization.
Web connections are only established using basic authentication. Web sites requiring authentication may not work
properly with the Web connector.
To import the data:
1. In the Power BI Desktop Home ribbon tab, drop down the arrow next to Get Data , and then select Web .
NOTE
You can also select the Get Data item itself, or select Get Data from the Power BI Desktop get started dialog, then
select Web from the All or Other section of the Get Data dialog, and then select Connect .
After connecting to the Wikipedia web page, the Navigator dialog shows a list of available tables on the
page. You can select any of the table names to preview its data. The Results[edit] table has the data you
want, although it's not exactly in the shape you want. You'll reshape and clean up the data before loading it
into your report.
NOTE
The Preview pane shows the most recent table selected, but all selected tables will load into the Power Query Editor
when you select Transform Data or Load .
3. Select the Results[edit] table in the Navigator list, and then select Transform Data .
A preview of the table opens in Power Quer y Editor , where you can apply transformations to clean up the
data.
or
Next, remove the extra word Details from the first column cells.
1. Select the first column.
2. Right-click, and select Replace Values , or select Replace Values from the Transform group in the Home
tab of the ribbon. This option is also found in the Any Column group in the Transform tab.
or
3. In the Replace Values dialog, type Details in the Value To Find text box, leave the Replace With text box
empty, and then select OK to delete the word Details from this column.
Some cells contain only the word "Year" rather than year values. You can filter the column to only display rows that
don't contain the word "Year".
1. Select the filter drop-down arrow on the column.
2. In the drop-down menu, scroll down and clear the checkbox next to the Year option, and then select OK .
Since you're only looking at the final winners data now, you can rename the second column to Countr y . To rename
the column:
1. Double-click or tap and hold in the second column header, or
Right-click the column header, and select Rename , or
Select the *column and select Rename from the Any Column group in the Transform tab of the ribbon.
or
2. Type Countr y in the header and press Enter to rename the column.
You also want to filter out rows like "2020" that have null values in the Countr y column. You could use the filter
menu as you did with the Year values, or you can:
1. Right-click on the Countr y cell in the 2020 row, which has the value null.
2. Select Text Filters > Does not Equal in the context menu to remove any rows that contain that cell's value.
2. Select Close & Apply > Close & Apply from the Home tab of the ribbon.
The query loads into the Power BI Desktop Report view, where you can see it in the Fields pane.
TIP
You can always get back to the Power Query Editor to edit and refine your query by:
Selecting the More options ellipsis (... ) next to Euro Cup Winners in the Fields pane, and selecting Edit Quer y , or
Selecting Edit Queries > Edit Queries in the External data group of the Home ribbon tab in Report view.
Create a visualization
To create a visualization based on your data:
1. Select the Countr y field in the Fields pane, or drag it to the report canvas. Power BI Desktop recognizes the
data as country names, and automatically creates a Map visualization.
2. Enlarge the map by dragging the handles in the corners so all the winning country names are visible.
3. The map shows identical data points for every country that won a Euro Cup tournament. To make the size of
each data point reflect how often the country has won, drag the Year field to Drag data fields here under
Size in the lower part of the Visualizations pane. The field automatically changes to a Count of Year
measure, and the map visualization now shows larger data points for countries that have won more
tournaments.
Customize the visualization
As you can see, it's very easy to create visualizations based on your data. It's also easy to customize your
visualizations to better present the data in ways that you want.
Format the map
You can change the appearance of a visualization by selecting it and then selecting the Format (paint roller) icon in
the Visualizations pane. For example, the "Germany" data points in your visualization could be misleading,
because West Germany won two tournaments and Germany won one, and the map superimposes the two points
rather than separating or adding them together. You can color these two points differently to highlight this fact. You
can also give the map a more descriptive and attractive title.
1. With the visualization selected, select the Format icon, and then select Data colors to expand the data color
options.
2. Turn Show all to On , and then select the drop-down menu next to West Germany and choose a yellow
color.
3. Select Title to expand the title options, and in the Title text field, type Euro Cup Winners in place of the
current title.
4. Change Font color to red, Text size to 12 , and Font family to Segoe (Bold) .
TIP
You can use the Data colors formatting options to make "Germany" and "West Germany" the same color.
To group the countries with the most wins together on the pie chart, select the ellipsis (... ) at the upper right of the
visualization, and then select Sor t by Count of Year .
Power BI Desktop provides a seamless end-to-end experience, from getting data from a wide range of data sources
and shaping it to meet your analysis needs, to visualizing this data in rich and interactive ways. Once your report is
ready, you can upload it to Power BI and create dashboards based on it, which you can share with other Power BI
users.
See also
Microsoft Learn for Power BI
Watch Power BI Desktop videos
Visit the Power BI Forum
Read the Power BI Blog
Tutorial: Analyze sales data from Excel and an OData
feed
9/9/2020 • 10 minutes to read • Edit Online
It's common to have data in multiple data sources. For example, you could have two databases, one for product
information, and another for sales information. With Power BI Desktop, you can combine data from different
sources to create interesting, compelling data analyses and visualizations.
In this tutorial, you combine data from two data sources:
An Excel workbook with product information
An OData feed containing orders data
You're going to import each dataset and do transformation and aggregation operations. Then, you'll use the two
source's data to produce a sales analysis report with interactive visualizations. Later, you can apply these techniques
to SQL Server queries, CSV files, and other data sources in Power BI Desktop.
NOTE
In Power BI Desktop, there are often a few ways to accomplish a task. For example, you can right-click or use a More
options menu on a column or cell to see additional ribbon selections. Several alternate methods are described in the steps
below.
3. In the Open dialog box, navigate to and select the Products.xlsx file, and then select Open .
4. In the Navigator , select the Products table and then select Transform Data .
A table preview opens in the Power Query Editor, where you can apply transformations to clean up the data.
NOTE
You can also open the Power Query Editor by selecting Edit Queries > Edit Queries from the Home ribbon in Power BI
Desktop, or by right-clicking or choosing More options next to any query in the Repor t view, and selecting Edit Quer y .
3. In Navigator , select the Orders table, and then select Transform Data to load the data into Power Query
Editor.
NOTE
In Navigator , you can select any table name, without selecting the checkbox, to see a preview.
After you expand the Order_Details table, three new nested table columns replace the Order_Details column.
There are new rows in the table for each order's added data.
The new LineTotal field appears as the last column in the Orders table.
TIP
Underlying the Applied Steps are formulas written in the Power Query Language, also known as the M language. To see and
edit the formulas, select Advanced Editor in the Quer y group of the Home tab of the ribbon.
2. In the Manage relationships dialog box, you can see that Power BI Desktop has already detected and listed
an active relationship between the Products and Orders tables. To view the relationship, select Edit .
Edit Relationship opens, showing details about the relationship.
3. Power BI Desktop has autodetected the relationship correctly, so you can select Cancel and then Close .
In Power BI Desktop, on the left side, select Model to view and manage query relationships. Double-click the arrow
on the line connecting the two queries to open the Edit relationship dialog and view or change the relationship.
To get back to Repor t view from Model view, select the Repor t icon.
TIP
If you only see Years on the chart and only three data points, select the arrow next to OrderDate in the Axis field of
the Visualizations pane, and select OrderDate instead of Date Hierarchy .
Finally, create a map visualization showing order amounts from each country.
1. With nothing selected on the canvas, select ShipCountr y from Orders in the Fields pane, or drag it to a
blank space on the canvas. Power BI Desktop detects that the data is country names. It then automatically
creates a map visualization, with a data point for each country with orders.
2. To make the data point sizes reflect each country's order amounts, drag the LineTotal field onto the map.
You can also drag it to Drag data fields here under Size in the Visualizations pane. The sizes of the
circles on the map now reflect the dollar amounts of the orders from each country.
Interact with your report visuals to analyze further
In Power BI Desktop, you can interact with visuals that cross-highlight and filter each other to uncover further
trends. For more information, see Filters and highlighting in Power BI reports.
Because of the relationship between your queries, interactions with one visualization affect all the other
visualizations on the page.
On the map visualization, select the circle centered in Canada . The other two visualizations filter to highlight the
Canadian line totals and order quantities.
Select a Quantity by ProductName chart product to see the map and the date chart filter to reflect that product's
data. Select a LineTotal by OrderDate chart date to see the map and the product chart filter to show that date's
data.
TIP
To deselect a selection, select it again, or select one of the other visualizations.
Next steps
Microsoft Learn for Power BI
Watch Power BI Desktop videos
Visit the Power BI Forum
Read the Power BI Blog
Tutorial: Analyze Facebook data by using Power BI
Desktop
5/13/2020 • 9 minutes to read • Edit Online
In this tutorial, you learn how to import data from Facebook and use it in Power BI Desktop. You'll connect and
import data from the Power BI Facebook page, apply transformations to the imported data, and use the data in
report visualizations.
WARNING
Due to Facebook App permission restrictions, the connector capabilities described in this article are not currently working
properly. We’re working with Facebook to return this functionality as soon as possible.
3. Select Continue .
4. In the Facebook dialog box, enter the page name microsoftbi as the user name , select Posts from the
Connection dropdown, and then select OK .
5. When prompted for credentials, sign in to your Facebook account, and allow Power BI access to your
account.
After you connect to the Power BI Facebook page, you see a preview of the page's posts data.
The Power BI Desktop Power Query Editor opens in a new window and displays the data preview from the
Power BI Facebook page.
2. Select the created_time column. Notice that it's a Text data type, as denoted by an ABC icon in the column
header. Right-click the header and select Split Column > By Delimiter in the drop-down list. Or, select
Split Column > By Delimiter under the Transform group in the Home tab of the ribbon.
3. In the Split Column by Delimiter dialog box, select Custom from the dropdown, enter T (the character
that starts the time part of the created_time values) in the input field, and then select OK .
The column splits into two columns that contain the strings before and after the T delimiter. The new
columns are named created_time.1 and created_time.2 , respectively. Power BI has automatically detected
and changed the data types to Date for the first column and Time for the second column, and formatted the
date and time values to be more readable.
4. Rename the two columns. Select the created_time.1 column, and then select Rename in the Any Column
group of the Transform tab in the ribbon. Or, double-click the column header and enter the new column
name, created_date . Repeat for the created_time.2 column, and rename it created_time .
The column now displays the number of comments for each message.
4. Rename the Count of object_link .connections.comments.id column to Number of comments .
5. Select the down arrow next to the Number of comments column header and select Sor t Descending to
see the posts sorted from most to fewest comments.
TIP
Underlying the Applied Steps are formulas written in the Power Query M formula language. To see and edit the formulas,
select Advanced Editor in the Quer y group of the Home tab of the ribbon.
A dialog box displays the progress of loading the data into the Power BI Desktop data model.
Once the data is loaded, it appears in the Repor t view as a new query in the Fields pane.
Use the data in report visualizations
Now that you have imported data from the Facebook page, you can quickly and easily gain insights about your
data by using visualizations. Creating a visualization is easy, just select a field or drag it from the Fields pane onto
the report canvas.
Create a bar chart
1. In Power BI Desktop Repor t view, select message from the Fields pane, or drag it onto the report canvas. A
table showing all post messages appears on the canvas.
2. With that table selected, also select Number of comments from the Fields pane, or drag it into the table.
3. Select the Stacked bar char t icon in the Visualizations pane. The table changes to a bar chart showing
the number of comments per post.
4. Select More options (...) next to the visualization, and then select Sor t by > Number of comments to
sort the table by descending number of comments.
Notice that the most comments were associated with (Blank) messages (these posts may have been stories,
links, videos, or other non-text content).
5. To filter out the blank rows, select message is (All) from the Filters pane, select Select all , and then select
(Blank) to deselect it.
The Filters pane entry changes to message is not (Blank) , and the (Blank) row disappears from the chart
visualization.
The x axis (number of comments) of the chart doesn't show exact values, and looks lost at the bottom of the chart.
Let's use data labels instead:
1. Select the Format icon, and then set the slider for X axis to Off .
2. Select the Data labels slider to On .
Now the chart shows the exact number of comments for each post.
4. To apply the changes, select File > Close & Apply , or File > Apply to keep the Power Quer y Editor
window open.
After the changes load, the data labels on the chart become whole numbers.
Create a date slicer
Suppose you want to visualize the number of comments on posts over time. You can create a slicer visualization to
filter the chart data to different time frames.
1. Select a blank area of the canvas, and then select the Slicer icon in the Visualizations pane.
A blank slicer visualization appears.
2. Select the created_date field from the Fields pane, or drag it into the new slicer.
The slicer changes to a date range slider, based on the field's Date data type.
3. Move the slider handles to select different date ranges, and note how the chart data filters accordingly. You
can also select the date fields in the slicer and type in specific dates, or choose them from a calendar popup.
Power BI Desktop provides a seamless end-to-end experience, from getting data from a wide range of data sources
and shaping it to meet your analysis needs, to visualizing this data in rich and interactive ways. When your report is
ready, you can upload it to the Power BI service and create dashboards based on it to share with other Power BI
users.
Next steps
Read other Power BI Desktop tutorials
Watch Power BI Desktop videos
Visit the Power BI Forum
Read the Power BI Blog
Implement row-level security in an Analysis Services
tabular model
9/9/2020 • 6 minutes to read • Edit Online
Using a sample dataset to work through the steps below, this tutorial shows you how to implement row-level
security in an Analysis Services Tabular Model and use it in a Power BI report.
Create a new security table in the AdventureworksDW2012 database
Build the tabular model with necessary fact and dimension tables
Define user roles and permissions
Deploy the model to an Analysis Services tabular instance
Build a Power BI Desktop report that displays data tailored to the user accessing the report
Deploy the report to Power BI service
Create a new dashboard based on the report
Share the dashboard with your coworkers
This tutorial requires the AdventureworksDW2012 database.
Task 1: Create the user security table and define data relationship
You can find many articles describing how to define row-level dynamic security with the SQL Server Analysis
Services (SSAS) tabular model. For our sample, we use Implement Dynamic Security by Using Row Filters.
The steps here require using the AdventureworksDW2012 relational database.
1. In AdventureworksDW2012, create the DimUserSecurity table as shown below. You can use SQL Server
Management Studio (SSMS) to create the table.
2. Once you create and save the table, you need to establish the relationship between the DimUserSecurity
table's SalesTerritoryID column and the DimSalesTerritory table's SalesTerritoryKey column, as shown
below.
In SSMS, right-click DimUserSecurity , and select Design . Then select Table Designer > Relationships....
When done, save the table.
3. Add users to the table. Right-click DimUserSecurity and select Edit Top 200 Rows . Once you've added
users, the DimUserSecurity table should appear similar to the following example:
The joined table shows who is responsible for each sales region, thanks to the relationship created in Step 2.
For example, you can see that Rita Santos is responsible for Australia.
Task 2: Create the tabular model with facts and dimension tables
Once your relational data warehouse is in place, you need to define the tabular model. You can create the model
using SQL Server Data Tools (SSDT). For more information, see Create a New Tabular Model Project.
1. Import all the necessary tables into the model as shown below.
2. Once you've imported the necessary tables, you need to define a role called SalesTerritoryUsers with Read
permission. Select the Model menu in SQL Server Data Tools, and then select Roles . In Role Manager ,
select New .
3. Under Members in the Role Manager , add the users that you defined in the DimUserSecurity table in Task
1.
4. Next, add the proper functions for both DimSalesTerritory and DimUserSecurity tables, as shown below
under Row Filters tab.
5. The LOOKUPVALUE function returns values for a column in which the Windows user name matches the one
the USERNAME function returns. You can then restrict queries to where the LOOKUPVALUE returned values
match ones in the same or related table. In the DAX Filter column, type the following formula:
=DimSalesTerritory[SalesTerritoryKey]=LOOKUPVALUE(DimUserSecurity[SalesTerritoryID],
DimUserSecurity[UserName], USERNAME(), DimUserSecurity[SalesTerritoryID],
DimSalesTerritory[SalesTerritoryKey])
In this formula, the LOOKUPVALUE function returns all values for the DimUserSecurity[SalesTerritoryID]
column, where the DimUserSecurity[UserName] is the same as the current logged on Windows user name,
and DimUserSecurity[SalesTerritoryID] is the same as the DimSalesTerritory[SalesTerritoryKey] .
IMPORTANT
When using row-level security, the DAX function USERELATIONSHIP is not supported.
The set of Sales 's LOOKUPVALUE returns is then used to restrict the rows shown in the
SalesTerritoryKey
DimSalesTerritory . Only rows where the SalesTerritoryKey value is in the IDs that the LOOKUPVALUE
function returns are displayed.
6. For the DimUserSecurity table, in the DAX Filter column, add the following formula:
=FALSE()
This formula specifies that all columns resolve to false ; meaning DimUserSecurity table columns can't be
queried.
Now you need to process and deploy the model. For more information, see Deploy.
With Power BI, dynamic security works only with a live connection.
4. You can see that the deployed model is in the Analysis Services instance. Select the respective model and
then select OK .
Power BI Desktop now displays all the available fields, to the right of the canvas in the Fields pane.
5. In the Fields pane, select the SalesAmount measure from the FactInternetSales table and the
SalesTerritor yRegion dimension from the SalesTerritor y table.
6. To keep this report simple, we won't add any more columns right now. To have a more meaningful data
representation, change the visualization to Donut char t .
7. Once your report is ready, you can directly publish it to the Power BI portal. From the Home ribbon in Power
BI Desktop, select Publish .
When Rita logs in to the Power BI service and views the shared dashboard that Grace created, only sales from the
Australia region are visible.
Congratulations! The Power BI service shows the dynamic row-level security defined in the on-premises Analysis
Services tabular model. Power BI uses the EffectiveUserName property to send the current Power BI user credential
to the on-premises data source to run the queries.
Based on the effective user name request, Analysis Services converts the request to the actual contoso\rita
credential after querying the local Active Directory. Once Analysis Services gets the credential, Analysis Services
returns the data the user has permission to view and access.
If more activity occurs with the dashboard, with SQL Profiler you would see a specific query coming back to the
Analysis Services tabular model as a DAX query. For example, if Rita goes from the dashboard to the underlying
report, the following query occurs.
You can also see below the DAX query that is getting executed to populate report data.
EVALUATE
ROW(
"SumEmployeeKey", CALCULATE(SUM(Employee[EmployeeKey]))
)
<PropertyList xmlns="urn:schemas-microsoft-com:xml-analysis">``
<Catalog>DefinedSalesTabular</Catalog>
<Cube>Model</Cube>
<SspropInitAppName>PowerBI</SspropInitAppName>
<EffectiveUserName>[email protected]</EffectiveUserName>
<LocaleIdentifier>1033</LocaleIdentifier>
<ClientProcessID>6408</ClientProcessID>
<Format>Tabular</Format>
<Content>SchemaData</Content>
<Timeout>600</Timeout>
<DbpropMsmdRequestID>8510d758-f07b-a025-8fb3-a0540189ff79</DbpropMsmdRequestID>
<DbPropMsmdActivityID>f2dbe8a3-ef51-4d70-a879-5f02a502b2c3</DbPropMsmdActivityID>
<ReturnCellProperties>true</ReturnCellProperties>
<DbpropMsmdFlattened2>true</DbpropMsmdFlattened2>
<DbpropMsmdActivityID>f2dbe8a3-ef51-4d70-a879-5f02a502b2c3</DbpropMsmdActivityID>
</PropertyList>
Considerations
On-premises row-level security with Power BI is only available with live connection.
Any changes in the data after processing the model would be immediately available for the users accessing
the report with live connection from the Power BI service.
Tutorial: Connect to a GitHub repo with Power BI
5/13/2020 • 3 minutes to read • Edit Online
In this tutorial, you connect to real data in the GitHub service with Power BI, and Power BI automatically creates
dashboards and reports. You connect to the Power BI content public repository (also known as a repo) and see
answers to questions like: How many people contribute to the Power BI public content? Who contributes the most?
Which day of the week has the most contributions? And other questions.
Prerequisites
To complete this tutorial, you need a GitHub account, if you don't already have one.
Sign up for a GitHub account.
How to connect
1. Sign in to the Power BI service ( https://app.powerbi.com ).
2. In the nav pane, select Apps , then Get apps .
3. Select Apps , type GitHub in the search box > Get it now .
7. Enter the repository name and repository owner of the repo. The URL for this repo is
https://github.com/MicrosoftDocs/powerbi-docs, so Repositor y Owner is MicrosoftDocs , and
Repositor y is powerbi-docs .
8. Enter the GitHub credentials you created. Power BI might skip this step if you're already signed in to GitHub
in your browser.
9. For Authentication Method , keep oAuth2 selected > Sign In .
10. Follow the GitHub authentication screens. Grant Power BI permission to the GitHub data.
Now Power BI can connect with GitHub and connect to the data. The data is refreshed once a day.
11. After Power BI imports the data, you see the contents of your new GitHub workspace.
12. Select the arrow next to the workspace name in the nav pane. You see the workspace contains a dashboard
and a report.
13. Select More options (...) next to the dashboard name > Rename > type GitHub dashboard .
14. Select the global navigation icon to minimize the nav pane, so you have more room.
2. Select a user name in the Total pull requests by user chart. In this example, we see most of their hours
were in February.
3. Select the Punch Card tab to view the next page in the report.
Apparently Tuesday at 3 pm is the most common time and day of the week for commits, when people check
in their work.
Clean up resources
Now that you've finished the tutorial, you can delete the GitHub app.
1. In the nav pane, select Apps .
2. Hover over the GitHub tile and select the Delete garbage can.
Next steps
In this tutorial, you've connected to a GitHub public repo and gotten data, which Power BI has formatted in a
dashboard and report. You've answered some questions about the data by exploring the dashboard and report.
Now you can learn more about connecting to other services, such as Salesforce, Microsoft Dynamics, and Google
Analytics.
Connect to the online services you use
Tutorial: Use Cognitive Services in Power BI
5/13/2020 • 5 minutes to read • Edit Online
Power BI provides access to a set of functions from Azure Cognitive Services to enrich your data in the self-service
data prep for Dataflows. The services that are supported today are Sentiment Analysis, Key Phrase Extraction,
Language Detection, and Image Tagging. The transformations are executed on the Power BI service and do not
require an Azure Cognitive Services subscription. This feature requires Power BI Premium.
Cognitive Services transforms are supported in the Self-Service Data Prep for Dataflows. Use the step-by-step
examples for text analytics and image tagging below to get started.
In this tutorial, you learn how to:
Import data into a dataflow
Score sentiment and extract key phrases of a text column in a dataflow
Connect to the results from Power BI Desktop
Prerequisites
To complete this tutorial, you need the following:
A Power BI account. If you're not signed up for Power BI, sign up for a free trial before you begin.
Access to a Power BI Premium capacity with the AI workload enabled. This workload will be turned off by default
during preview. If you are in on a Premium capacity and AI Insights are not showing up, contact your Premium
capacity admin to enable the AI workload in the admin portal.
Text analytics
Follow the steps in this section to complete the text analytics portion of the tutorial.
Step 1: Apply sentiment scoring in Power BI Service
To get started, navigate to a Power BI workspace with Premium capacity and create a new dataflow using the
Create button in the upper right of the screen.
The dataflow dialog shows you the options for creating a new dataflow, select Add new entities. Next, choose
Text/CSV from the menu of data sources.
Paste this URL into the URL field: https://pbiaitutorials.blob.core.windows.net/textanalytics/FabrikamComments.csv
and click Next.
The data is now ready to use for text analytics, and we can use Sentiment Scoring and Key Phrase Extraction on the
customer comments column.
In Power Query Editor, select AI Insights
Expand the Cognitive Ser vices folder and select the function you would like to use. This example is scoring the
sentiment of the comment column, but you can follow the same steps to try out Language Detection and Key
Phrase Extraction.
Once a function is selected, the required and optional fields will show. To score the sentiment of the example
reviews, select the reviews column as text input. Culture info is an optional input and requires an ISO format. For
example, enter 'en' if you want the text to be treated as English. When the field is left blank, Power BI will first detect
the language of the input value before scoring the sentiment.
Now select Invoke to run the function. A new column with the sentiment score for each row is added to the table.
You can go back to AI insights to extract key phrases of the review text in the same way.
Once you are finished with the transformations, change the query name to 'Customer comments' and select Done.
Next, Save the dataflow and name it Fabrikam. Select the Refresh Now button that pops up after saving the
dataflow.
Once the dataflow is saved and refreshed, you can use it in a Power BI report.
Step 2: Connect from Power BI Desktop
Open Power BI Desktop. In the Home ribbon, select Get Data.
Navigate to the Power BI dataflows (Beta ) in the Power BI section and select Connect.
As this is a preview feature, the connector will ask you to accept the preview conditions. After accepting these, sign
in with your organization account.
Select the dataflow you have just created. Navigate to the Customer comments table and click Load.
Now the data is loaded you can start building a report.
Image tagging
Navigate to a Power BI workspace with Premium capacity. Create a new dataflow using the Create button in the
upper right of the screen.
Copy the query below in the query editor and click next. You can replace the URL paths below with other images or
add more rows. The Web.Contents function imports the image URL as binary. If you have a data source with
images stored as binary, you can also use that directly.
let
Source = Table.FromRows({
{ Web.Contents("https://images.pexels.com/photos/87452/flowers-background-butterflies-beautiful-87452.jpeg")
},
{ Web.Contents("https://upload.wikimedia.org/wikipedia/commons/5/53/Colosseum_in_Rome%2C_Italy_-
_April_2007.jpg") }}, { "Image" })
in
Source
When prompted for credentials, select anonymous.
NOTE
You currently cannot pick a column using a dropdown, which will be resolved as soon as possible during the private preview.
In the function editor, remove the quotation marks around the column name.
NOTE
Removing the quotation marks is a temporary workaround, which will be resolved as soon as possible during preview.
The function returns a record with both the tags in comma-separated format and as a json record. Select the
expand-button to add one or both as columns to the table.
Select Done and save the dataflow. Once you have refreshed the dataflow one, you can connect to it from Power BI
Desktop using the Dataflows connectors. (See steps on page 5 of this document).
Clean up resources
When no longer needed, delete the query by right-clicking the query name in the Power Query editor and selecting
Delete .
Next steps
In this tutorial, you applied sentiment scoring and image tagging functions on a Power BI dataflow. To learn more
about Cognitive Services in Power BI, read the following articles.
Cognitive Services in Azure
Get started with self-service data prep on dataflows
Learn more about Power BI Premium
You might also be interested in the following articles.
Tutorial: Invoke a Machine Learning Studio (classic) model in Power BI (Preview)
Azure Machine Learning integration in Power BI (Preview)
Cognitive Services in Power BI (Preview)
Tutorial: Invoke a Machine Learning Studio (classic)
model in Power BI (Preview)
5/13/2020 • 7 minutes to read • Edit Online
In this tutorial, we walk through the experience of incorporating insights from an Azure Machine Learning
Studio (classic) model into Power BI. This tutorial includes guidance for granting a Power BI user access to an
Azure ML model, creating a dataflow, and applying the insights from the Azure ML model to your dataflow. It also
references the quickstart guide for creating an Azure ML model if you don't already have a model.
The tutorial takes you through the following steps:
Create and publish an Azure Machine Learning model
Grant access to a Power BI user to use the model
Create a dataflow
Apply insights from the Azure ML model to the dataflow
Then repeat the steps above to grant Contributor role access to the Power BI user for the specific Machine
Learning web service to which the Azure ML model has been deployed.
Create a dataflow
Get data for creating the dataflow
Sign in to the Power BI service with the user credentials for whom you granted access to the Azure ML model in the
previous step.
This step assumes you have the data you want to score with your Azure ML model in CSV format. If you used the
Automobile Pricing Experiment to create the model in the Machine Learning Studio (classic), the dataset for is
shared in the following link:
Azure Learning Studio (classic) sample model
Create a dataflow
To create the entities in your dataflow, sign in to the Power BI service and navigate to a workspace on your
dedicated capacity that has the AI preview enabled.
If you don't already have a workspace, you can create one by selecting Workspaces in the left menu, and then
select Create workspace in the panel at the bottom. This opens a panel to enter the workspace details. Enter a
workspace name, and then select Save .
After the workspace has been created, you can select Skip in the bottom right of the Welcome screen.
Select the Dataflows (preview) tab, and then select the Create button at the top right of the workspace, and then
select Dataflow .
Select Add new entities , which launches Power Quer y Editor in the browser.
Power Query Editor shows a preview of the data from the CSV file. Select Transform Table from the command
ribbon and then select Use first row as headers . This adds the Promoted headers query step into the Applied
steps pane on the right. You can also rename the query to a friendlier name, such as Automobile Pricing using the
pane on the right.
Our source dataset has unknown values set to '?'. To clean this, we can replace '?' with '0' to avoid errors later for
simplicity. To do this, select the columns normalized-losses, bore, stroke, compression-ratio, horsepower, peak-rpm
and price by clicking on their name in the column headers, then click on 'Transform columns' and select 'Replace
values'. Replace '?' with '0'.
All the columns in the table from a Text/CSV source are treated as text columns. Next, we need to change the
numeric columns to their correct data types. You can do this in Power Query by clicking on the data type symbol in
the column header. Change the columns to the below types:
Whole number : symboling, normalized-losses, curb-weight, engine-size, horsepower, peak-rpm, city-mpg,
highway-mpg, price
Decimal number : wheel-base, length, width, height, bore, stroke, compression-ratio
Select Done to close Power Query Editor. This will show the entities list with the Automobile Pricing data we added.
Select Save in the top right corner, provide a name for the dataflow, and then select Save .
Select the AI Insights button in the ribbon, and then select the Azure Machine Learning Models folder from the
nav pane menu.
The Azure ML models to which you've been granted access are listed as Power Query functions with a prefix
AzureML. When you click on the function corresponding to the AutomobilePricePrediction model, the parameters
for the model's web service are listed as function parameters.
To invoke an Azure ML model, you can specify any of the selected entity's columns as an input from the drop-down.
You can also specify a constant value to be used as an input by toggling the column icon to the left of the input
dialog. When a column name that matches one of the function parameter names, then the column is automatically
suggested as an input. If the column name doesn't match, you can select it from the drop-down.
In the case of the Automobile Pricing Prediction model, the input parameters are:
make
body-style
wheel-base
engine-size
horsepower
peak-rpm
highway-mpg
In our case, since our table matches the original dataset used to train the model, all the parameters have the correct
columns already selected.
Select Invoke to view the preview of the Azure ML model's output as a new column in the entity table. You'll also
see the model invocation as an applied step for the query.
The output of the model is shown as a record in the output column. You can expand the column to produce
individual output parameters in separate columns. In our case, we're only interested in the Scored Labels which
contains the predicted price of the automobile. So we deselect the rest, and select OK .
The resulting Scored Labels column has the price prediction from the Azure ML model.
Once you save your dataflow, the Azure ML model will be automatically invoked when the dataflow is refreshed for
any new or updated rows in the entity table.
Clean up resources
If you no longer need the Azure resources you created using this article, delete them to avoid incurring any
charges. You can also delete the dataflows you created, if you no longer require them.
Next steps
In this tutorial, you created a simple experiment using Azure Machine Learning Studio (classic) using a simple
dataset using these steps:
Create and publish an Azure Machine Learning model
Grant access to a Power BI user to use the model
Create a dataflow
Apply insights from the Azure ML model to the dataflow
For more information about Azure Machine Learning integration in Power BI, see Azure Machine Learning
integration in Power BI (Preview).
Tutorial: Build a Machine Learning model in Power BI
9/9/2020 • 9 minutes to read • Edit Online
In this tutorial article, you use Automated Machine Learning to create and apply a binary prediction model in
Power BI. The tutorial includes guidance for creating a Power BI dataflow, and using the entities defined in the
dataflow to train and validate a machine learning model directly in Power BI. We then use that model for scoring
new data to generate predictions.
First, you'll create a Binary Prediction machine learning model, to predict the purchase intent of online shoppers
based on a set of their online session attributes. A benchmark machine learning dataset is used for this exercise.
Once a model is trained, Power BI will automatically generate a validation report explaining the model results. You
can then review the validation report and apply the model to your data for scoring.
This tutorial consists of following steps:
Select the Create button at the top right of the workspace, and then select Dataflow .
Select Add new entities . This launches a Power Quer y editor in the browser.
The Power Query Editor shows a preview of the data from the CSV file. You can rename the query to a friendlier
name by changing the value in the Name box found in the right pane. For example, you could change the Query
name to Online Visitors.
Power Query automatically infers the type of columns. You can change the column type by clicking on the attribute
type icon at the top of the column header. In this example, we change the type of the Revenue column to True/False.
Select the Save & close button to close Power Query Editor. Provide a name for the dataflow, and then select Save
on the dialog, as shown in the following image.
Create and train a machine learning model
To add a machine learning model, Select the Apply ML model button in the Actions list for the base entity that
contains your training data and label information, and then select Add a machine learning model .
The first step for creating our machine learning model is to identify the historical data including the outcome field
that you want to predict. The model will be created by learning from this data.
In the case of the dataset we're using, this is the Revenue field. Select Revenue as the 'Outcome field' value and
then select Next .
Next, we must select the type of machine learning model to create. Power BI analyzes the values in the outcome
field that you've identified and suggests the types of machine learning models that can be created to predict that
field.
In this case since we're predicting a binary outcome of whether a user will make a purchase or not, Binary
Prediction is recommended. Since we are interested in predicting users who will make a purchase, select True as the
Revenue outcome that you're most interested in. Additionally, you can provide friendly labels for the outcomes to
be used in the automatically generated report that will summarize the results of the model validation. Then select
Next.
Next, Power BI does a preliminary scan of a sample of your data and suggests the inputs that may produce more
accurate predictions. If Power BI doesn't recommend a field, an explanation would be provided next to it. You have
the option to change the selections to include only the fields you want the model to study, or you can select all the
fields by selecting the checkbox next to the entity name. Select Next to accept the inputs.
In the final step, we must provide a name for our model. Name the model Purchase Intent Prediction. You can
choose to reduce the training time to see quick results or increase the amount of time spent in training to get the
best model. Then select Save and train to start training the model.
The training process will begin by sampling and normalizing your historical data and splitting your dataset into two
new entities Purchase Intent Prediction Training Data and Purchase Intent Prediction Testing Data.
Depending on the size of the dataset, the training process can take anywhere from a few minutes to the training
time selected at the previous screen. At this point, you can see the model in the Machine learning models tab of
the dataflow. The Ready status indicates that the model has been queued for training or is under training.
You can confirm that the model is being trained and validated through the status of the dataflow. This appears as a
data refresh in progress in the Dataflows tab of the workspace.
Once the model training is completed, the dataflow displays an updated refresh time. You can confirm that the
model is trained, by navigating to the Machine learning models tab in the dataflow. The model you created
should show status as Trained and the Last Trained time should now be updated.
The other pages of the report describe the statistical performance metrics for the model.
The report also includes a Training Details page that describes the different iterations that were run, how features
were extracted from the inputs, and the hyperparameters for the final model used.
Once the dataflow refresh is completed, you can select the Online Visitors enriched Purchase Intent
Prediction entity to view the results.
You can also invoke any AutoML model in the workspace, directly from the Power Query Editor in your dataflow. To
access the AutoML models, select the Edit button for the entity that you want to enrich with insights from your
AutoML model, as shown in the following image.
Selecting the Edit button opens the Power Query Editor for the entities in your dataflow. Select the AI
Insights button in the ribbon.
Select the Power BI Machine Learning Models folder from the nav pane menu. All the AutoML models to which you
have access are listed here as Power Query functions. Also, the input parameters for the AutoML model are
automatically mapped as parameters of the corresponding Power Query function. Note that automatic mapping of
parameters happens only if the name and data type of the parameter is the same.
To invoke an AutoML model, you can specify any of the selected entity's columns as an input from the drop-down.
You can also specify a constant value to be used as an input by toggling the column icon to the left of the input
dialog.
Select Apply to view the preview of the AutoML model's output as a new columns in the entity table. You will also
see the model invocation as an applied step for the query.
Once you save your dataflow, the model is automatically invoked when the dataflow is refreshed, for any new or
updated rows in the entity table.
Next steps
In this tutorial, you created and applied a binary prediction model in Power BI using these steps:
Create a dataflow with the input data
Create and train a machine learning model
Review the model validation report
Apply the model to a dataflow entity
Using the scored output from the model in a Power BI report
For more information about Machine Learning automation in Power BI, see Automated Machine Learning in Power
BI.
Refresh data from an on-premises SQL Server
database
5/13/2020 • 8 minutes to read • Edit Online
In this tutorial, you explore how to refresh a Power BI dataset from a relational database that exists on premises in
your local network. Specifically, this tutorial uses a sample SQL Server database, which Power BI must access
through an on-premises data gateway.
In this tutorial, you complete the following steps:
Create and publish a Power BI Desktop (.pbix) file that imports data from an on-premises SQL Server database.
Configure data source and dataset settings in Power BI for SQL Server connectivity through a data gateway.
Configure a refresh schedule to ensure your Power BI dataset has recent data.
Perform an on-demand refresh of your dataset.
Review the refresh history to analyze the outcomes of past refresh cycles.
Clean up resources by deleting the artifacts created in this tutorial.
Prerequisites
If you don't already have one, sign up for a free Power BI trial before you begin.
Install Power BI Desktop on a local computer.
Install SQL Server on a local computer, and restore the sample database from a backup. For more information
about AdventureWorks, see AdventureWorks installation and configuration.
Install an on-premises data gateway on the same local computer as SQL Server (in production, it would
typically be a different computer).
NOTE
If you're not a gateway administrator and don't want to install a gateway yourself, contact a gateway administrator in your
organization. They can create the required data source definition to connect your dataset to your SQL Server database.
NOTE
If you're unable to authenticate, make sure you select the correct authentication method and use an account with
database access. In test environments, you might use Database authentication with an explicit username and
password. In production environments, you typically use Windows authentication. Refer to Troubleshooting refresh
scenarios and contact your database administrator for additional assistance.
7. With the column chart selected in the report canvas, in the Fields pane select the EnglishProductName
and ListPrice fields.
8. Drag the EndDate onto Repor t level filters , and under Basic filtering select only the checkbox for
(Blank) .
2. On the Datasets tab, select the dataset AdventureWorksProducts , so you can connect to your on-
premises SQL Server database through a data gateway.
3. Expand Gateway connection and verify that at least one gateway is listed. If you don't have a gateway, see
the Prerequisites section earlier in this tutorial for a link to the product documentation for installing and
configuring a gateway.
4. Under Actions , expand the toggle button to view the data sources and select the Add to gateway link.
NOTE
If you're not a gateway administrator and don't want to install a gateway yourself, contact a gateway administrator in
your organization. They can create the required data source definition to connect your dataset to your SQL Server
database.
5. On the Gateways management page, on the Data Source Settings tab, enter and verify the following
information, and select Add .
O P T IO N VA L UE
Password The password for the account you use to connect to SQL
Server.
6. On the Datasets tab, expand the Gateway connection section again. Select the data gateway you
configured, which shows a Status of running on the machine where you installed it, and select Apply .
Configure a refresh schedule
Now you've connected your dataset in Power BI to your SQL Server database on-premises through a data gateway,
follow these steps to configure a refresh schedule. Refreshing your dataset on a scheduled basis helps to ensure
that your reports and dashboards have the most recent data.
1. In the nav pane, open My Workspace > Datasets . Select the ellipsis (. . .) for the
AdventureWorksProducts dataset, then select Schedule refresh .
NOTE
Make sure you select the ellipsis for the AdventureWorksProducts dataset and not the ellipsis for the report with
the same name. The context menu of the AdventureWorksProducts report does not include a Schedule refresh
option.
2. In the Scheduled refresh section, under Keep your data up to date , set refresh to On .
3. Select an appropriate Refresh frequency , ( Daily for this example), and then under Time , select Add
another time to specify the desired refresh time (6:30 AM and PM for this example).
NOTE
You can configure up to 8 daily time slots if your dataset is on shared capacity, or 48 time slots on Power BI Premium.
4. Leave the checkbox Send refresh failure notification emails to me enabled and select Apply .
UPDATE [AdventureWorksDW].[dbo].[DimProduct]
SET ListPrice = 5000
WHERE EnglishProductName ='Road-250 Red, 58'
Now follow these steps so the updated data can flow through the gateway connection to the dataset and into the
reports in Power BI.
1. In the Power BI Service, in the nav pane, select and expand My Workspace .
2. Under Datasets , for the AdventureWorksProducts dataset, select the ellipsis (. . .) then select Refresh
now .
Note in the upper right corner, that Power BI is preparing to perform the requested refresh.
3. Select My Workspace > Repor ts > AdventureWorksProducts . See how the updated data flowed
through, and the product with the highest list price is now Road-250 Red, 58 .
4. On the Scheduled tab, notice the past scheduled and on-demand refreshes with their Star t and End times,
and a Status of Completed , which indicates that Power BI performed the refreshes successfully. For failed
refreshes, you can see the error message and examine error details.
NOTE
The OneDrive tab is only relevant for datasets connected to Power BI Desktop files, Excel workbooks, or CSV files on
OneDrive or SharePoint Online, as explained in more detail in Data refresh in Power BI.
Clean up resources
If you don't want to use the sample data anymore, drop the database in SQL Server Management Studio (SSMS). If
you don't want to use the SQL Server data source, remove the data source from your data gateway. Also consider
uninstalling the data gateway if you only installed it for the purposes of completing this tutorial. You should also
delete the AdventureWorksProducts dataset and AdventureWorksProducts report that Power BI created when you
uploaded the AdventureWorksProducts.pbix file.
Next steps
In this tutorial, you've explored how to import data from an on-premises SQL Server database into a Power BI
dataset and how to refresh this dataset on a scheduled and on-demand basis to keep the reports and dashboards
that use this dataset updated in Power BI. Now you can learn more about managing data gateways and data
sources in Power BI. It might also be a good idea to review the conceptual article Data Refresh in Power BI.
Manage an on-premises data gateway
Manage your data source - Import/Scheduled Refresh
Data refresh in Power BI
Power BI data sources
9/9/2020 • 6 minutes to read • Edit Online
The following table shows the data sources that Power BI supports for datasets, including information about
DirectQuery and the on-premises data gateway. For information about dataflows, see Connect to data sources
for Power BI dataflows.
NOTE
There are many data connectors for Power BI Desktop that require Internet Explorer 10 (or newer) for authentication.
C O N N EC T
AND DIREC TQ UE
C O N N EC T REF RESH RY / L IVE GAT EWAY
DATA F RO M F RO M C O N N EC T I ( SUP P O RT E GAT EWAY
SO URC E DESK TO P SERVIC E ON D) ( REQ UIRED)
Hadoop Yes No No No No
File (HDFS)
1 Supported with the ACE OLEDB provider, installed on the same machine as the gateway.
2
2 Supported with the same M function as the on-premises version, causing restricted Auth options (gateway
NOTE
Azure Multi-Factor Authentication (MFA) is not supported. Users who want to use SSO with DirectQuery must be
exempted from MFA.
Next steps
Connect to data in Power BI Desktop
Using DirectQuery in Power BI
SQL Server Analysis Services live data in Power BI
What is an on-premises data gateway?
Power BI report data sources in Power BI Report Server
Power BI data source prerequisites
5/13/2020 • 2 minutes to read • Edit Online
For each data provider, Power BI supports a specific provider version on objects. For more information about data
sources available to Power BI, see Data sources. The following table describes these requirements.
M IN IM UM SUP P O RT ED
P RO VIDER M IN IM UM DATA DATA SO URC E
DATA SO URC E P RO VIDER VERSIO N SO URC E VERSIO N O B JEC T S DO W N LO A D L IN K
SQL Server ADO.net (built .NET Framework SQL Server Tables/Views, Included in .NET
into .Net 3.5 (only) 2005+ Scalar functions, Framework 3.5 or
Framework) Table functions above
Access Microsoft Access ACE 2010 SP1 No restriction Tables/Views Download link
Database Engine
(ACE)
Excel (.xls files Microsoft Access ACE 2010 SP1 No restriction Tables, Sheets Download link
only) (see note 1) Database Engine
(ACE)
Oracle (see note ODP.NET ODAC 11.2 9.x+ Tables/Views Download link
2) Release 5
(11.2.0.3.20)
NOTE
The Oracle providers also require Oracle client software (version 8.1.7+).
Using enhanced dataset metadata (preview)
9/9/2020 • 4 minutes to read • Edit Online
When Power BI Desktop creates reports, it also creates dataset metadata in the corresponding PBIX and PBIT files.
Previously the metadata was stored in a format that was specific to Power BI Desktop. It used base-64 encoded M
expressions and data sources, and assumptions were made about how that metadata was stored.
With the release of the enhanced dataset metadata feature, many of these limitations are removed. With the
enhanced dataset metadata feature enabled, metadata created by Power BI Desktop uses a format similar to
what is used for Analysis Services tabular models, based on the Tabular Object Model.
The enhanced dataset metadata feature is strategic and foundational, because future Power BI functionality will
be built upon its metadata. Some additional capabilities that stand to benefit from enhanced dataset metadata
include XMLA read/write for management of Power BI datasets, and the migration of Analysis Services workloads
to Power BI to benefit from next-generation features.
IMPORTANT
Enabling the enhanced dataset metadata feature results in an irreversible upgrade to reports. Any Power BI reports
loaded or created with Power BI Desktop, once enhanced dataset metadata is enabled, are irreversibly converted to the
enhanced dataset metadata format.
2. Find a copy of the report there with the name and time stamp of the original file.
3. Copy the file to a location you would prefer, in order to preserve it.
4. Make sure the Enhanced metadata format preview feature is disabled in Power BI Desktop if you choose
to open or use that original file.
The backup file is created when the report is upgraded, so any changes made after the upgrade are not included.
New reports created when the Enhanced metadata format feature is enabled do not have a backup file.
Next steps
You can do all sorts of things with Power BI Desktop. For more information on its capabilities, check out the
following resources:
What is Power BI Desktop?
What's new in Power BI Desktop?
Query overview with Power BI Desktop
Data types in Power BI Desktop
Shape and combine data with Power BI Desktop
Common query tasks in Power BI Desktop
Work with multidimensional models in Power BI
5/13/2020 • 4 minutes to read • Edit Online
You can connect to multidimensional models in Power BI, and create reports that visualize all sorts of data within
the model. When working with multidimensional models, Power BI applies rules to how it processes data, based on
which column is defined as the default member.
When working with multidimensional models, Power BI handles data from the model based on where the column
that contains the DefaultMember is used. The DefaultMember attribute is set in CSDL (Conceptual Schema
Definition Language) for a particular column in a multidimensional model. You can learn more about the default
member in its attribute properties article. When a DAX query is executed, the default member specified in the
model is applied automatically.
This article described how Power BI behaves under various circumstances when working with multidimensional
models, based on where the default member is found.
Grouping behavior
In Power BI, whenever you group a visual on a column that has a default member, Power BI clears the default
member for that column and its attribute relationship path. This ensures the visual displays all values, rather than
just the default values.
NOTE
Population is not in the ARP path of City, it is solely related to State and thus Power BI doesn't clear it.
State - Power BI displays all the States by clearing all default members for City, State, Country and Population.
Countr y - Power BI displays all the countries by clearing all default members for City, State and Country, but
preserves the default member for Population.
City and State - Power BI clears all default members for all columns.
Groups displayed in the visual have their entire ARP path cleared.
If a group is not displayed in the visual, but is part of the ARP path of another grouped-on column, the following
applies:
Not all branches of the ARP path are cleared automatically.
That group is still filtered by that uncleared default member .
Slicers and filter cards
When working with slicers or filter cards, the following behavior occurs:
When a slicer or filter card is loaded with data, Power BI groups on the column in the visual, so the display
behavior is the same as described in the previous section.
Since slicers and filter cards are often used to interact with other visuals, the logic of clearing default members
for the affected visuals occurs as explained in the following table.
For this table, we use the same example data used earlier in this article:
The following rules apply for how Power BI behaves in these circumstances.
Power BI clears a default member for a given column if:
Power BI groups on that column
Power BI groups on a column related to that column (anywhere in the ARP, up or down)
Power BI filters on a column that is in the ARP (up or down)
The column has a filter card with ALL state
The column has a filter card with any value selected (Power BI receives a filter for the column)
Power BI does not clear a default member for a given column if:
The column has a filter card with default state, and Power BI is groupings on a column in its ARP.
The column is above another column in the ARP, and Power BI has a filter card for that other column in default
state.
Next steps
This article described the behavior of Power BI when working with default members in multidimensional models.
You might also be interested in the following articles:
Show items with no data in Power BI
Data sources in Power BI Desktop
About using DirectQuery in Power BI
9/9/2020 • 40 minutes to read • Edit Online
You can connect to all sorts of different data sources when using Power BI Desktop or the Power BI service, and
make those data connections in different ways. You can import data to Power BI, which is the most common way
to get data, or connect directly to data in the original source repository, which is known as DirectQuery. This
article describes DirectQuery capabilities:
Different connectivity options for DirectQuery
Guidance for when you should consider using DirectQuery rather than import
Drawbacks of using DirectQuery
Best practices for using DirectQuery
Follow best practices for using import versus DirectQuery:
You should import data to Power BI wherever possible. Importing takes advantage of the high performance
query engine of Power BI, and provides a highly interactive and fully featured experience.
If your goals can't be met by importing data, consider using DirectQuery. For example, if the data is changing
frequently and reports must reflect the latest data, DirectQuery may be best. However, using DirectQuery is
only feasible when the underlying data source can provide interactive queries, less than 5 seconds for the
typical aggregate query, and can handle the query load that will be generated. Additionally, the list of
limitations for the use of DirectQuery should be considered carefully.
The set of capabilities offered by Power BI for import and DirectQuery evolve over time. Changes will include
providing more flexibility when using imported data, such that import can be used in more cases and eliminating
some of the drawbacks of using DirectQuery. Regardless of improvements, when using DirectQuery, the
performance of the underlying data source always remains a major consideration. If that underlying data source
is slow, using DirectQuery for that source will remain unfeasible.
This article covers DirectQuery with Power BI, and not SQL Server Analysis Services. DirectQuery is also a
feature of SQL Server Analysis Services. Many of the details described in this article apply to that feature. There
are also important differences. For information about using DirectQuery with SQL Server Analysis Services, see
DirectQuery in SQL Server 2016 Analysis Services.
This article focuses on the recommended workflow for DirectQuery, where the report is created in Power BI
Desktop, but also covers connecting directly in the Power BI service.
Data is changing frequently, and near real-time reporting is Models with imported data can be refreshed at most once
needed per hour (more frequently with Power BI Pro or Power BI
Premium subscriptions). Tf the data is continually changing,
and it's necessary for reports to show the latest data, using
import with scheduled refresh might not meet those needs.
You can stream data directly into Power BI, though there are
limits on the data volumes supported for this case.
Data is very large If the data is very large, it wouldn't be feasible to import it all.
DirectQuery, by contrast, requires no large transfer of data,
because it's queried in place.
Security rules are defined in the underlying source When the data is imported, Power BI connects to the data
source using the current user's credentials from Power BI
Desktop, or the credentials defined as part of configuring
scheduled refresh from the Power BI service. In publishing
and sharing such a report, be careful to only share with users
allowed to see the same data, or to define row-level security
as part of the dataset.
Data sovereignty restrictions apply Some organizations have policies around data sovereignty,
meaning that data can't leave the organization premises. A
solution based on import would clearly present issues. By
contrast, with DirectQuery that data remains in the
underlying source.
Underlying data source is an OLAP source, containing If the underlying data source contains measures, such as SAP
measures HANA or SAP Business Warehouse, then importing the data
brings other issues. It means that the data imported is at a
particular level of aggregation, as defined by the query. For
example, measures TotalSales by Class , Year , and City .
Then if a visual is built asking for data at a higher-level
aggregate, such as TotalSales by Year , it's further
aggregating the aggregate value. This aggregation is fine for
additive measures, such as Sum and Min , but it's an issue
for non-additive measures, such as Average ,
DistinctCount .
In summary, given the current capabilities of DirectQuery in Power BI, it offers the benefits in the following
scenarios:
Data is changing frequently, and near real-time reporting is needed.
Handling very large data, without the need to pre-aggregate.
Data sovereignty restrictions apply.
The source is a multidimensional source containing measures, such as SAP BW.
The details in the previous list relate to the use of Power BI alone. Instead, you could use an external SQL Server
Analysis Services or Azure Analysis Services model to import data. Then use Power BI to connect to that model.
While that approach would require additional configuration, it does provide greater flexibility. Much larger
volumes of data can be imported. There's no restriction on how frequently the data can be refreshed.
Examine all uses of calculated columns and data type changes. Use of these capabilities aren't
necessarily harmful. They do result in the queries sent to the underlying source containing expressions
rather than simple references to columns. That again might result in indexes not being used.
Avoid use of the bi-directional cross filtering on relationships. Use of bi-directional cross filtering
can lead to query statements that don't perform well.
Experiment with setting Assume referential integrity . The Assume Referential Integrity setting on
relationships enables queries to use INNER JOIN statements rather than OUTER JOIN . This guidance
generally improves query performance, though it does depend on the specifics of the data source.
Don't use the relative data filtering in Quer y Editor. It's possible to define relative date filtering in
Query Editor. For example, to filter to the rows where the date is in the last 14 days.
However, this filter is translated into a filter based on the fixed date, as at the time the query was authored.
This result can be seen from viewing the native query.
This result is probably not what you wanted. To ensure the filter is applied based on the date at the time
the report runs, instead apply the filter in the report as a Report Filter. Currently, this approach would be
done by creating a calculated column calculating the number of days ago, using the DAX DATE() function,
and then using that calculated column in a filter.
Report Design Guidance
When creating a report using a DirectQuery connection, follow this guidance:
Consider use of Quer y Reduction options: Power BI provides options in the report to send fewer
queries, and to disable certain interactions that would result in a poor experience if the resulting queries
take a long time to run. To access these options in Power BI Desktop, go to File > Options and settings
> Options and select Quer y reduction .
Checking box selections on the Quer y reduction let you disable cross-highlighting throughout your
entire report. You can also show an Apply button to slicers or filter selections. This approach lets you then
make many slicer and filter selections before applying them. No queries are sent until you select the
Apply button on the slicer. Your selections can then be used to filter the data.
These options apply to your report while you interact with it in Power BI Desktop. These options also apply
when your users consume the report in the Power BI service.
Apply filters first: Always apply any applicable filters at the start of building a visual. For example, rather
than drag in TotalSalesAmount and ProductName , then filter to a particular year, apply the filter on
Year at the very start. Each step of building a visual sends a query. Although it's possible to then make
another change before the first query has completed, this approach still leaves unnecessary load on the
underlying source. By applying filters early, it generally makes those intermediate queries less costly. Also,
failing to apply filters early can result in hitting the 1 million row limit.
Limit the number of visuals on a page: When you open a page or change a page level slicer or filter,
all of the visuals on a page are refreshed. There's also a limit on the number of queries that are sent in
parallel. As the number of visuals increases, some of the visuals will be refreshed in a serial manner,
increasing the time taken to refresh the entire page. For this reason, we recommend that you limit the
number of visuals on a single page, and instead have more, simpler pages.
Consider switching off interaction between visuals: By default, visualizations on a report page can
be used to cross-filter and cross-highlight the other visualizations on the page. For example, having
selected 1999 on the pie chart, the column chart is cross highlighted to show the sales by category for
1999 .
This approach results in two queries being sent to the underlying source:
The first query retrieves the Categories meeting the condition, SalesAmount greater than 20 million.
The second query then retrieves the necessary data for the visual, including the categories that met the
condition in the WHERE clause.
This approach generally works well if there are hundreds or thousands of categories, as in this example.
Performance can degrade if the number of categories is much larger. The query fails for more than a
million categories meeting the condition. The 1 million row limit was discussed earlier.
TopN filters: Advanced filters can be defined to filter on only the top or bottom N values ranked by some
measure. For example, filters can include the top 10 categories in the previous visual. This approach again
results in two queries being sent to the underlying source. However, the first query will return all
categories from the underlying source, and then the TopN are determined based on the returned results.
Depending on the cardinality of the column involved, this approach can lead to performance issues or
query failures because of the 1 million row limit.
Median: Generally, any aggregation, such as Sum or Count Distinct , is pushed to the underlying source.
However, this fact isn't true for median, which this aggregate is generally not supported by the underlying
source. In such cases, the detail data is retrieved from the underlying source, and the median calculated
from the returned results. This approach is reasonable when the median is to be calculated over a
relatively small number of results. Performance issues or query failures because of the 1 million row limit
occur if the cardinality is large. For example, Median Countr y Population might be reasonable, but
Median Sales Price might not be.
Advanced text filters ( contains and similar): When filtering on a text column, the advanced filtering
allows filters like contains and begins with and so on. These filters can certainly result in degraded
performance for some data sources. In particular, the default contains filter shouldn't be used if what is
required is an exact match. Although the results might be the same, depending on the actual data, the
performance might be drastically different because of indexes.
Multi select slicers: By default, slicers only allow a single selection to be made. Allowing multi-selection
in filters can cause some performance issues, because the user selects a set of items in the slicer. For
example, if the user selects the 10 products of interest, each new selection results in queries being sent to
the source. Although the user can select the next item before the query completes, this approach results in
extra load on the underlying source.
Consider switching off totals on visuals: By default, tables and matrices display totals and subtotals.
In many cases, separate queries must be sent to the underlying source to obtain the values for such totals.
This fact applies whenever using DistinctCount aggregation, or in all cases when using DirectQuery over
SAP BW or SAP HANA. Such totals should be switched off by using the Format pane.
Maximum number of connections option for DirectQuery
You can set the maximum number of connections DirectQuery opens for each underlying data source, which
controls the number of queries concurrently sent to each data source.
DirectQuery opens a default maximum number of 10 concurrent connections. You can change the maximum
number for the current file in Power BI Desktop. Go to File > Options and Settings > Options . In the Current
File section in the left pane, select DirectQuer y .
The setting is only enabled when there's at least one DirectQuery source in the current report. The value applies
to all DirectQuery sources, and to any new DirectQuery sources added to the same report.
Increasing Maximum connections per data source ensures more queries, up to the maximum number
specified, can be sent to the underlying data source. This approach is useful when many visuals are on a single
page, or many users access a report at the same time. Once the maximum number of connections is reached,
further queries are queued until a connection becomes available. Increasing this limit does result in more load on
the underlying source, so the setting isn't guaranteed to improve overall performance.
Once a report is published, the maximum number of concurrent queries sent to the underlying data source also
depend upon fixed limits. The limits depend on the target environment to which the report is published. Different
environments, such as Power BI, Power BI Premium, or Power BI Report Server, can impose different limits.
Diagnosing performance issues
This section describes how to diagnose performance issues, or how to get more detailed information to allow the
reports to be optimized.
We recommended that you start diagnosis of performance issues in Power BI Desktop, rather than in the Power
BI service. Performance issues are often based on the performance of the underlying source. You can more easily
identify and diagnose issues in the more isolated environment of Power BI Desktop. This approach initially
eliminates certain components, such as the Power BI gateway. If the performance issues are absent from Power
BI Desktop, investigate the specifics of the report in the Power BI service. The performance analyzer is a useful
tool for identifying issues throughout this process.
Similarly, we recommend to first try to isolate any issues to an individual visual, rather than many visuals on a
page.
Let's say the steps in the previous paragraphs in this section have been taken. We now have a single visual on a
page in Power BI Desktop that is still sluggish. Use the performance analyzer to determine the queries that Power
BI Desktop sends to the underlying source. It's also possible to view traces and diagnostic information that might
be emitted by the underlying data source. Traces might also contain useful details of how the query was
executed, and how it can be improved.
Further, even in the absence of such traces from the source, it's possible to view the queries sent by Power BI,
along with their execution times, as described in the next section.
Determining the queries sent by Power BI Desktop
By default, Power BI Desktop logs events during a given session to a trace file called FlightRecorderCurrent.trc.
For some DirectQuery sources, this log includes all queries sent to the underlying data source. The remaining
DirectQuery sources will be included in the future. The following sources send queries to the log:
SQL Server
Azure SQL Database
Azure SQL Data warehouse
Oracle
Teradata
SAP HANA
The trace file can be found in the AppData folder for the current user:
<User>\AppData\Local\Microsoft\Power BI Desktop\AnalysisServicesWorkspaces
To get to this folder, in Power BI Desktop, select File > Options and settings > Options , and then select
Diagnostics . The following dialog appears:
When you select Open crash dump/traces folder , under Diagnostic Options , the following folder opens:
<User>\AppData\Local\Microsoft\Power BI Desktop\Traces.
Navigating to that folder's parent folder displays the folder containing AnalysisServicesWorkspaces, which will
contain one workspace folder for every open instance of Power BI Desktop. These folders are named with an
integer suffix, such as AnalysisServicesWorkspace2058279583.
Inside that folder is a \Data folder. It contains the trace file FlightRecorderCurrent.trc for the current Power BI
session. The corresponding workspace folder is deleted when the associated Power BI Desktop session ends.
The trace files can be read using the SQL Server Profiler tool. Get it as part of the free download SQL Server
Management Studio.
Once you download and install SQL Server Management Studio, run SQL Server Profiler.
Refreshing that visual will result in the SQL query shown here. As you can tell, there are three subselects for
Web Sales , Item , and Date_dim , that each return all the columns on the respective table, even though only four
columns are actually referenced by the visual. These queries in the subselects that are shaded are exactly the
result of the queries defined in Query Editor. Use of subselects in this manner hasn't been found to impact
performance for the data sources so far supported for DirectQuery. Data sources like SQL Server optimize away
the references to the other columns.
Power BI employs this pattern because the SQL query used can be provided directly by the analyst. It's used "as
provided", without an attempt to rewrite it.
Next steps
This article describes aspects of DirectQuery that are common across all data sources. There are certain details
that are specific to individual sources. See the following articles covering specific sources:
DirectQuery and SAP HANA
DirectQuery and SAP BW
For more information about DirectQuery, see the following resource:
Data Sources supported by DirectQuery
Guidance for deploying a data gateway for Power BI
5/13/2020 • 3 minutes to read • Edit Online
NOTE
We recently revised the on-premises data gateway docs. We split them into content that's specific to Power BI and general
content that applies to all services that the gateway supports. You're currently in the Power BI content. To provide feedback
on this article, or the overall gateway docs experience, scroll to the bottom of the article.
This article provides guidance and considerations for deploying a data gateway for Power BI in your network
environment.
For information about how to download, install, configure, and manage the on-premises data gateway, see What is
an on-premises data gateway?. You can also find out more about the on-premises data gateway and Power BI by
visiting the Microsoft Power blog and the Microsoft Power BI Community site.
If you intend to use the Power BI gateway with Azure Analysis Services, be sure that the data regions in both match.
For more information about how to set data regions for multiple services, watch this video.
Next steps
Configuring proxy settings
Troubleshoot gateways - Power BI
On-premises data gateway FAQ - Power BI
More questions? Try the Power BI Community.
On-premises data gateway FAQ - Power BI
9/9/2020 • 2 minutes to read • Edit Online
NOTE
We recently revised the on-premises data gateway docs. We split them into content that's specific to Power BI and general
content that applies to all services that the gateway supports. You're currently in the Power BI content. To provide feedback
on this article, or the overall gateway docs experience, scroll to the bottom of the article.
Power BI
Question: Do I need to upgrade the on-premises data gateway (personal mode)?
Answer : No, you can keep using the gateway (personal mode) for Power BI.
Question: Are any special permissions required to install the gateway and manage it in the Power BI service?
Answer : No special permissions are required.
Question: Can I upload Excel workbooks with Power Pivot data models that connect to on-premises data sources?
Do I need a gateway for this scenario?
Answer : Yes, you can upload the workbook. And, no, you don’t need a gateway. But, because the data will reside in
the Excel data model, reports in Power BI based on the Excel workbook won't be live. To refresh reports in Power BI,
you have to re-upload an updated workbook each time. Or, use the gateway with scheduled refresh.
Question: If users share dashboards that have a DirectQuery connection, will those other users be able to see the
data even though they might not have the same permissions?
Answer : For a dashboard connected to Azure Analysis Services, users will see only the data they have access to. If
the users don't have the same permissions, they won't be able to see any data. For other data sources, all users will
share the credentials entered by the admin for that data source.
Question: Why can't I connect to my Oracle server?
Answer : You might need to install the Oracle client and configure the tnsnames.ora file with the proper server
information in order to connect to your Oracle server. This is a separate installation outside of the gateway. For
more information, see Install the Oracle client.
Question: I'm using R scripts. Is that supported?
Answer : R scripts are supported only for personal mode.
Next steps
Troubleshooting the on-premises data gateway
More questions? Try the Power BI Community.
Connect to data sources in Power BI Desktop
9/9/2020 • 2 minutes to read • Edit Online
With Power BI Desktop, you can easily connect to the ever expanding world of data. If you don’t have Power BI
Desktop, you can download and install it.
There are all sorts of data sources available in Power BI Desktop. The following image shows how to connect to
data, by selecting Get Data > Other > Web .
At this point, you can edit the query before loading the table, by selecting Transform Data from the bottom of
the window, or just load the table.
Select Transform Data to load the table and launch Power Query Editor. The Quer y Settings pane is displayed.
If it's not, select View from the ribbon, then Quer y Settings to display the Quer y Settings pane. Here’s what
that looks like.
All those scores are text rather than numbers, and we need them to be numbers. No problem. Just right-click the
column header, and select Change Type > Whole Number to change them. To choose more than one column,
first select a column then hold down Shift, select additional adjacent columns, and then right-click a column
header to change all selected columns. Use Ctrl to choose columns that aren't adjacent.
In Quer y Settings , the APPLIED STEPS will reflect any changes that were made. As you make additional
changes to the data, Power Query Editor will record those changes in the APPLIED STEPS section, which you can
adjust, revisit, rearrange, or delete as necessary.
Additional changes to the table can still be made after it's loaded, but for now this will do. When you're done,
select Close & Apply from the Home ribbon, and Power BI Desktop applies the changes and closes Power Query
Editor.
With the data model loaded, in Repor t view in Power BI Desktop, we can begin creating visualizations by
dragging fields onto the canvas.
Of course, this model is simple, with a single data connection. Most Power BI Desktop reports will have
connections to different data sources, shaped to meet your needs, with relationships that produce a rich data
model.
Next steps
There are all sorts of things you can do with Power BI Desktop. For more information on its capabilities, check out
the following resources:
What is Power BI Desktop?
About using Query Editor in Power BI Desktop
Data sources in Power BI Desktop
Shape and combine data in Power BI Desktop
Perform common query tasks in Power BI Desktop
Want to give us feedback? Great! Use the Submit an Idea menu item in Power BI Desktop or visit Community
Feedback. We look forward to hearing from you!
Data sources in Power BI Desktop
9/9/2020 • 8 minutes to read • Edit Online
With Power BI Desktop, you can connect to data from many different sources. For a full list of available data
sources, see Power BI data sources.
You connect to data by using the Home ribbon. To show the Most Common data types menu, select the Get
Data button label or the down arrow.
To go to the Get Data dialog box, show the Most Common data types menu and select More . You can also
bring up the Get Data dialog box (and bypass the Most Common menu) by selecting the Get Data icon
directly.
NOTE
The Power BI team is continually expanding the data sources available to Power BI Desktop and the Power BI service. As
such, you'll often see early versions of work-in-progress data sources marked as Beta or Preview . Any data source
marked as Beta or Preview has limited support and functionality, and it shouldn't be used in production environments.
Additionally, any data source marked as Beta or Preview for Power BI Desktop may not be available for use in the Power
BI service or other Microsoft services until the data source becomes generally available (GA).
NOTE
There are many data connectors for Power BI Desktop that require Internet Explorer 10 (or newer) for authentication.
Data sources
The Get Data dialog box organizes data types in the following categories:
All
File
Database
Power Platform
Azure
Online Services
Other
The All category includes all data connection types from all categories.
File data sources
The File category provides the following data connections:
Excel
Text/CSV
XML
JSON
Folder
PDF
SharePoint folder
The following image shows the Get Data window for File .
NOTE
Some database connectors require that you enable them by selecting File > Options and settings > Options then
selecting Preview Features and enabling the connector. If you don't see some of the connectors mentioned above and
want to use them, check your Preview Features settings. Also note that any data source marked as Beta or Preview has
limited support and functionality, and should not be used in production environments.
The following image shows the Get Data window for Database .
Power Platform data sources
The Power Platform category provides the following data connections:
Power BI datasets
Power BI dataflows
Common Data Service
Power Platform dataflows (Beta)
The following image shows the Get Data window for Power Platform .
Azure data sources
The Azure category provides the following data connections:
Azure SQL Database
Azure SQL Data Warehouse
Azure Analysis Services database
Azure Database for PostgreSQL
Azure Blob Storage
Azure Table Storage
Azure Cosmos DB
Azure Data Explorer (Kusto)
Azure Data Lake Storage Gen2
Azure Data Lake Storage Gen1
Azure HDInsight (HDFS)
Azure HDInsight Spark
HDInsight Interactive Query
Azure Data Explorer (Kusto)
Azure Cost Management
Azure Time Series Insights (Beta)
The following image shows the Get Data window for Azure .
Online Services data sources
The Online Ser vices category provides the following data connections:
SharePoint Online List
Microsoft Exchange Online
Dynamics 365 (online)
Dynamics NAV
Dynamics 365 Business Central
Dynamics 365 Business Central (on-premises)
Microsoft Azure Consumption Insights (Beta)
Azure DevOps (Boards only)
Azure DevOps Server (Boards only)
Salesforce Objects
Salesforce Reports
Google Analytics
Adobe Analytics
appFigures (Beta)
Data.World - Get Dataset (Beta)
GitHub (Beta)
LinkedIn Sales Navigator (Beta)
Marketo (Beta)
Mixpanel (Beta)
Planview Enterprise One - PRM (Beta)
QuickBooks Online (Beta)
Smartsheet
SparkPost (Beta)
SweetIQ (Beta)
Planview Enterprise One - CTM (Beta)
Twilio (Beta)
Zendesk (Beta)
Asana (Beta)
Dynamics 365 Customer Insights (Beta)
Emigo Data Source
Entersoft Business Suite (Beta)
FactSet Analytics
Palantir Foundry
Industrial App Store
Intune Data Warehouse (Beta)
Microsoft Graph Security (Beta)
Projectplace for Power BI (Beta)
Product Insights (beta)
Quick Base
TeamDesk (Beta)
Webtrends Analytics (Beta)
Witivio (Beta)
Workplace Analytics (Beta)
Zoho Creator (Beta)
The following image shows the Get Data window for Online Ser vices .
Other data sources
The Other category provides the following data connections:
Web
SharePoint list
OData Feed
Active Directory
Microsoft Exchange
Hadoop File (HDFS)
Spark
Hive LLAP (Beta)
R script
Python script
ODBC
OLE DB
Solver
FHIR
Information Grid (Beta)
Jamf Pro (Beta)
Paxata
QubolePresto (Beta)
Roamler (Beta)
Shortcuts Business Insights (Beta)
Siteimprove
Tenforce (Smart)List
TIBCO(R) Data Virtualization (Beta)
Vessel Insight (Beta)
Workforce Dimensions (Beta)
Zucchetti HR Infinity (Beta)
Cognite Data Fusion (Beta)
MicroStrategy for Power BI
SurveyMonkey (Beta)
Vena (Beta)
Acterys : Model Automation & Planning (Beta)
Automation Anywhere (Beta)
Cherwell (Beta)
Blank Query
The following image shows the Get Data window for Other .
NOTE
At this time, it's not possible to connect to custom data sources secured using Azure Active Directory.
Connecting to a data source
To connect to a data source, select the data source from the Get Data window and select Connect . In the
following image, Web is selected from the Other data connection category.
A connection window is displayed, specific to the type of data connection. If credentials are required, you’ll be
prompted to provide them. The following image shows a URL being entered to connect to a Web data source.
Enter the URL or resource connection information, and then select OK . Power BI Desktop makes the connection
to the data source, and it presents the available data sources in the Navigator .
To load the data, select the Load button at the bottom of the Navigator pane. To transform or edit the query in
Power Query Editor before loading the data, select the Transform Data button.
That’s all there is to connecting to data sources in Power BI Desktop! Try connecting to data from our growing
list of data sources, and check back often - we continue to add to this list all the time.
{
"version": "0.1",
"connections": [
{
"details": {
"protocol": "analysis-services",
"address": {
"server": "server-here"
},
}
}
]
}
Folder
{
"version": "0.1",
"connections": [
{
"details": {
"protocol": "folder",
"address": {
"path": "folder-path-here"
}
}
}
]
}
OData
{
"version": "0.1",
"connections": [
{
"details": {
"protocol": "odata",
"address": {
"url": "URL-here"
}
}
}
]
}
SAP BW
{
"version": "0.1",
"connections": [
{
"details": {
"protocol": "sap-bw-olap",
"address": {
"server": "server-name-here",
"systemNumber": "system-number-here",
"clientId": "client-id-here"
},
}
}
]
}
SAP Hana
{
"version": "0.1",
"connections": [
{
"details": {
"protocol": "sap-hana-sql",
"address": {
"server": "server-name-here:port-here"
},
}
}
]
}
SharePoint list
The URL must point to the SharePoint site itself, not to a list within the site. Users get a navigator that allows
them to select one or more lists from that site, each of which becomes a table in the model.
{
"version": "0.1",
"connections": [
{
"details": {
"protocol": "sharepoint-list",
"address": {
"url": "URL-here"
},
}
}
]
}
SQL Server
{
"version": "0.1",
"connections": [
{
"details": {
"protocol": "tds",
"address": {
"server": "server-name-here",
"database": "db-name-here (optional) "
}
},
"options": {},
"mode": "DirectQuery"
}
]
}
Text file
{
"version": "0.1",
"connections": [
{
"details": {
"protocol": "file",
"address": {
"path": "path-here"
}
}
}
]
}
Web
{
"version": "0.1",
"connections": [
{
"details": {
"protocol": "http",
"address": {
"url": "URL-here"
}
}
}
]
}
Dataflow
{
"version": "0.1",
"connections": [
{
"details": {
"protocol": "powerbi-dataflows",
"address": {
"workspace":"workspace id (Guid)",
"dataflow":"optional dataflow id (Guid)",
"entity":"optional entity name"
}
}
}
]
}
Next steps
You can do all sorts of things with Power BI Desktop. For more information on its capabilities, check out the
following resources:
What is Power BI Desktop?
Query overview with Power BI Desktop
Data types in Power BI Desktop
Shape and combine data with Power BI Desktop
Common query tasks in Power BI Desktop
Create a report on a SharePoint List
9/9/2020 • 2 minutes to read • Edit Online
Many teams and organizations use Lists in SharePoint Online to store data because it's easy to set up and easy for
users to update. Sometimes a chart is a much easier way for users to quickly understand the data rather than
looking at the list itself. In this tutorial, we show how to transform your SharePoint List data into a Power BI report.
Watch this five-minute tutorial video, or scroll down for step-by-step instructions.
https://www.youtube.com/embed/OZO3x2NF8Ak
4. Select Connect .
5. Find the address (also known as a URL) of your SharePoint Online site that contains your list. From a page in
SharePoint Online, you can usually get the site address by selecting Home in the navigation pane, or the
icon for the site at the top, then copying the address from your web browser's address bar.
Watch a video of this step:
https://www.youtube.com/embed/OZO3x2NF8Ak?start=48&end=90
6. In Power BI Desktop, paste the address into the Site URL field in the open dialog box.
7. You may or may not see a SharePoint access screen like the following image. If you don't see it, skip to step
10. If you do see it, select Microsoft Account on the left side of the page.
8. Select Sign In and enter the user name and password you use to sign in to Microsoft 365.
11. Select Load . Power BI loads your list data into a new report.
In Power BI Desktop , you can connect to LinkedIn Sales Navigator to help find and build relationships just like
any other data source in Power BI Desktop, and create ready-made reports about your progress.
To connect to LinkedIn data using the LinkedIn Sales Navigator , you need to have a LinkedIn Sales Navigator
Enterprise plan, and either be an Admin or Reporting User on the Sales Navigator Contract.
The following video provides a quick tour and tutorial for using the LinkedIn Sales Navigator template app,
which is described in detail later in this article.
When you select Continue , you're prompted to specify which data you want.
In the LinkedIn Sales Navigator window that appears, select which data you want to return, either All contacts or
Selected contacts from the first drop-down selector. You can then specify the start and end dates to constrain the
data it receives to a particular time window.
Once you've provided the information, Power BI Desktop connects to the data associated with your LinkedIn Sales
Navigator contract. Use the same email address you use to sign in to LinkedIn Sales Navigator through the website.
When you connect successfully, you're prompted to select which data from your LinkedIn Sales Navigator contract
from a Navigator window.
You can create whatever reports you like with your LinkedIn Sales Navigator data. To make things easier, there is
also a LinkedIn Sales Navigator .PBIX file that you can download, that has sample data already provided, so you can
get familiar with the data and the reports, without having to start from scratch.
You can download the PBIX file from the following location:
PBIX for LinkedIn Sales Navigator
In addition to the PBIX file, the LinkedIn Sales Navigator also has a template app that you can download and use,
too. The next section describes the template app in detail.
You can get the LinkedIn Sales Navigator template app from the following link:
LinkedIn Sales Navigator template app
The template app provides four tabs to help analyze and share your information:
Usage
Search
InMail
SSI
The Usage tab shows your overall LinkedIn Sales Navigator data.
The Search tab lets you drill deeper into your search results:
The InMail provides insights into your InMail usage, including number of InMails sent, acceptance rates, and other
useful information:
The SSI tab provides additional details into your social selling index (SSI):
To go from the sample data to your own data, select edit app in the top-right corner (the pencil icon) and then
select Connect your data from the screen that appears.
From there you can connect your own data, selecting how many days of data to load. You can load up to 365 days
of data. You'll need to sign in, again using the same email address you use to sign in to LinkedIn Sales Navigator
through the website.
the template app then refreshes the data in the app with your data. You can also set up a scheduled refresh, so the
data in your app is as current as your refresh frequency specifies.
Once the data updates, you can see the app populated with your own data.
Getting help
If you run into problems when connecting to your data, you can contact LinkedIn Sales Navigator support at
https://www.linkedin.com/help/sales-navigator.
Next steps
There are all sorts of data you can connect to using Power BI Desktop. For more information on data sources, check
out the following resources:
What is Power BI Desktop?
Data Sources in Power BI Desktop
Shape and Combine Data with Power BI Desktop
Connect to Excel workbooks in Power BI Desktop
Enter data directly into Power BI Desktop
Get webpage data by providing examples
9/9/2020 • 2 minutes to read • Edit Online
Getting data from a web page lets users easily extract data from web pages, and import that data into Power BI
Desktop. Often however, data on Web pages aren't in tidy tables that are easy to extract. Getting data from such
pages can be challenging, even if the data is structured and consistent.
There's a solution. With the Get Data from Web by example feature, you can essentially show Power BI Desktop
which data you want to extract by providing one or more examples within the connector dialog. Power BI Desktop
gathers other data on the page that match your examples. With this solution you can extract all sorts of data from
Web pages, including data found in tables and other non-table data.
https://www.microsoft.com/store/top-paid/games/xbox?category=classics
When you select OK , you're taken to the Navigator dialog box where any autodetected tables from the Web page
are presented. In the case shown in the image below, no tables were found. Select Add table using examples to
provide examples.
Add table using examples presents an interactive window where you can preview the content of the Web page.
Enter sample values of the data you want to extract.
In this example, we'll extract the Name and Price for each of the games on the page. We can do that by specifying a
couple of examples from the page for each column. As you enter examples, Power Query extracts data that fits the
pattern of example entries using smart data extraction algorithms.
NOTE
Value suggestions only include values less than or equal to 128 characters in length.
Once you're happy with the data extracted from the Web page, select OK to go to Power Query Editor. You can
apply more transformations or shape the data, such as combining this data with other data our sources.
From there, you can create visuals or otherwise use the Web page data when creating your Power BI Desktop
reports.
Next steps
There are all sorts of data you can connect to using Power BI Desktop. For more information on data sources, check
out the following resources:
Add a column from an example in Power BI Desktop
Connect to webpages from Power BI Desktop
Data sources in Power BI Desktop
Shape and combine data in Power BI Desktop
Connect to Excel workbooks in Power BI Desktop
Connect to CSV files in Power BI Desktop
Enter data directly into Power BI Desktop
Connect to datasets in the Power BI service from
Power BI Desktop
9/9/2020 • 8 minutes to read • Edit Online
You can establish a live connection to a shared dataset in the Power BI service, and create many different reports
from the same dataset. You can create your perfect data model in Power BI Desktop and publish it to the Power BI
service. Then you and others can create multiple different reports in separate .pbix files from that common data
model, and save them to different workspaces. This feature is called Power BI service live connection.
There are all sorts of benefits of this feature, including best practices, which we discuss during this article. We
recommend you review the considerations and limitations of this feature.
If Anna isn't signed in to the Power BI service account, Power BI prompts Anna to do so.
From there, Anna can choose the workspace destination to which the report and dataset will be published.
Remember, if Anna saves it to a new experience workspace, then anyone with Build permission can have access to
that dataset. Build permission is set in the Power BI service, after publishing. If work is saved to a classic workspace
only members who have access to the workspace where a report is published can access its dataset using a Power
BI service live connection.
The publishing process begins, and Power BI Desktop shows the progress.
Once complete, Power BI Desktop shows you success, and provides a couple links to get you to the report itself in
the Power BI service, and a link to get quick insights about the report.
Now that your report with its dataset is in the Power BI service, you can also promote it. Promotion means that you
attest to its quality and reliability. You can even request that it be certified by a central authority in your Power BI
tenant. With either of these endorsements, your dataset always appears at the top of the list when people are
looking for datasets. For more information, see Promote your dataset.
The last step is to set Build permission for the dataset the report is based on. Build permission determines who can
see and use your dataset. You can set it in the workspace itself, or when you share an app from the workspace. For
more information, see Build permission for shared datasets.
Next, let's see how other teammates who have access to the workspace where the report and dataset were
published can connect to the dataset and build their own reports.
Establish a Power BI service live connection to the published dataset
To establish a connection to the published report, and create your own report based on the published dataset,
select Get Data from the Home ribbon in Power BI Desktop, select Power Platform in the left pane, and then
select Power BI datasets .
If you're not signed in, Power BI prompts you to sign in. Once signed in, Power BI shows which workspaces you're a
member of. You can select which workspace contains the dataset to which you want to establish a Power BI service
live connection.
The datasets in the list are all the shared datasets you have Build permission for, in any workspace. You can search
for a specific dataset and see its name, owner, the workspace where it resides, and when it was last refreshed. You
also see ENDORSEMENT for datasets, either certified or promoted, at the top of the list.
When you select Create , you establish a live connection to the selected dataset. Power BI Desktop loads the fields
and their values that you see into Power BI Desktop in real time.
Now you and others can create and share custom reports, all from the same dataset. This approach is a great way
to have one knowledgeable person create a well-formed dataset, such as what Anna does. Many teammates can
use that shared dataset to create their own reports.
With Power BI Desktop, you can easily import Excel workbooks that contain Power Query queries, Power Pivot
models, and Power View worksheets into Power BI Desktop. Power BI Desktop automatically creates reports and
visualizations based on the Excel workbook. Once imported, you can continue to improve and refine those reports
with Power BI Desktop, using the existing features and new features released with each Power BI Desktop monthly
update.
NOTE
To load or import Excel files from shared OneDrive for Business folders or from Microsoft 365 group folders, use the
URL of the Excel file, and input it into the Web data source in Power BI Desktop. There are a few steps you need to
follow to properly format the OneDrive for Business URL; for information and the correct series of steps, see Use
OneDrive for Business links in Power BI Desktop.
4. Select Close .
Power BI Desktop imports the Excel workbook and loads a report based on the workbook contents.
After the workbook is imported, you can continue working on the report. You can create new visualizations, add
data, or create new report pages by using any of the features and capabilities included in Power BI Desktop.
Power Query queries All Power Query queries from Excel are converted to queries in
Power BI Desktop. If there are query groups defined in the
Excel Workbook, the same organization is replicated in Power
BI Desktop. All queries are loaded unless they're set to Only
Create Connection in the Impor t Data Excel dialog box.
The load behavior is customized by selecting Proper ties from
the Home tab of Power Query Editor in Power BI Desktop.
Power Pivot external data connections All Power Pivot external data connections are converted to
queries in Power BI Desktop.
O B JEC T IN EXC EL W O RK B O O K F IN A L RESULT IN P O W ER B I DESK TO P F IL E
Linked tables or current workbook tables If there's a worksheet table in Excel linked to the data model,
or linked to a query (by using From Table or the
Excel.CurrentWorkbook() function in M), the following options
are presented:
1. Impor t the table to the Power BI Desktop file .
This table is a one-time snapshot of the data, after
which the data is read-only in the table in Power BI
Desktop. There's a size limitation of 1 million characters
(total, combining all column headers and cells) for
tables created using this option.
2. Keep a connection to the original workbook .
Alternatively, you can keep a connection to the original
Excel Workbook and Power BI Desktop retrieves the
latest content in this table with each refresh, just like
any other query created against an Excel workbook in
Power BI Desktop.
Data model calculated columns, measures, KPIs, data These data model objects are converted to the equivalent
categories, and relationships objects in Power BI Desktop. Note there are certain data
categories that aren't available in Power BI Desktop, such as
Image. In these cases, the data category information is reset
for the columns in question.
Power View worksheets A new report page is created for each Power View worksheet
in Excel. The name and order of these report pages match the
original Excel workbook.
You can connect to a multitude of different data sources in Power BI Desktop , using built-in data connectors that
range from Access databases to Zendesk resources, as shown in the Get Data window. You can also connect to
all sorts of other data sources to further expand your connectivity options, by using the generic interfaces (such as
ODBC or REST APIs ) built into Power BI Desktop .
The following list details a few examples of data sources to which Power BI Desktop can connect by using the
generic ODBC interface.
The following list details a few examples of the data sources to which Power BI Desktop can connect by using the
generic OLE DB interface.
The following list details a few examples of the data sources to which Power BI Desktop can connect by using the
generic OData interface.
The following list details a few examples of the data sources to which Power BI Desktop can connect by using the
generic REST APIs interface.
The following list details a few examples of the data sources to which Power BI Desktop can connect by using the
generic R scripts interface.
Next steps
There are all sorts of data sources you can connect to using Power BI Desktop . For more information on data
sources, check out the following resources:
What is Power BI Desktop?
Data Sources in Power BI Desktop
Shape and Combine Data with Power BI Desktop
Connect to Excel workbooks in Power BI Desktop
Enter data directly into Power BI Desktop
Connect to PDF files in Power BI Desktop
9/9/2020 • 2 minutes to read • Edit Online
In Power BI Desktop, you can connect to a PDF file and use the included data from the file, just like any other data
source in Power BI Desktop.
The following sections describe how to connect to a PDF file , select data, and bring that data into Power BI
Desktop .
We always recommend upgrading to the most recent release of Power BI Desktop , which you can get from a link
in get Power BI Desktop.
Next steps
There are all sorts of data you can connect to using Power BI Desktop. For more information on data sources, check
out the following resources:
What is Power BI Desktop?
Data Sources in Power BI Desktop
Shape and Combine Data with Power BI Desktop
Connect to Excel workbooks in Power BI Desktop
Enter data directly into Power BI Desktop
Connect to Adobe Analytics in Power BI Desktop
9/9/2020 • 2 minutes to read • Edit Online
In Power BI Desktop , you can connect to Adobe Analytics and use the underlying data just like any other data
source in Power BI Desktop.
You can Load the selected table, which brings the entire table into Power BI Desktop , or you can Edit the query,
which opens Quer y Editor so you can filter and refine the set of data you want to use, and then load that refined
set of data into Power BI Desktop .
Next steps
There are all sorts of data you can connect to using Power BI Desktop. For more information on data sources, check
out the following resources:
What is Power BI Desktop?
Data Sources in Power BI Desktop
Shape and Combine Data with Power BI Desktop
Connect to Excel workbooks in Power BI Desktop
Enter data directly into Power BI Desktop
Connect to an Oracle database with Power BI
Desktop
9/9/2020 • 3 minutes to read • Edit Online
To connect to an Oracle database with Power BI Desktop, the correct Oracle client software must be installed on the
computer running Power BI Desktop. The Oracle client software you use depends on which version of Power BI
Desktop you've installed: 32-bit or 64-bit. It also depends on your version of Oracle server.
Supported Oracle versions:
Oracle Server 9 and later
Oracle Data Access Client (ODAC) software 11.2 and later
NOTE
If you're configuring an Oracle database for Power BI Desktop, On Premises Data Gateway or Power BI Report Server, consult
the information in the Oracle Connection Type article.
3. In the Oracle database dialog that appears, provide the name of the Ser ver , and select OK . If a SID is
required, specify it by using the format: ServerName/SID, where SID is the unique name of the database. If
the ServerName/SID format doesn't work, use ServerName/ServiceName, where ServiceName is the alias
you use to connect.
NOTE
If you are using a local database, or autonomous database connections, you may need to place the server name in
quotation marks to avoid connection errors.
4. If you want to import data by using a native database query, put your query in the SQL statement box,
which appears when you expand the Advanced options section of the Oracle database dialog.
5. After you've entered your Oracle database information in the Oracle database dialog (including any
optional information such as a SID or a native database query), select OK to connect.
6. If the Oracle database requires database user credentials, input those credentials in the dialog when
prompted.
Troubleshooting
You might encounter any of several errors from Oracle when the naming syntax is either incorrect or not
configured properly:
ORA-12154: TNS:could not resolve the connect identifier specified.
ORA-12514: TNS:listener does not currently know of service requested in connect descriptor.
ORA-12541: TNS:no listener.
ORA-12170: TNS:connect timeout occurred.
ORA-12504: TNS:listener was not given the SERVICE_NAME in CONNECT_DATA.
These errors might occur if the Oracle client either isn't installed or isn't configured properly. If it's installed, verify
that the tnsnames.ora file is properly configured and you're using the proper net_service_name. You also need to
make sure that the net_service_name is the same between the machine that uses Power BI Desktop and the
machine that runs the gateway. For more information, see Install the Oracle client.
You might also encounter a compatibility issue between the Oracle server version and the Oracle Data Access Client
version. Typically, you want these versions to match, as some combinations are incompatible. For instance, ODAC
12.x does not support Oracle Server version 9.
If you downloaded Power BI Desktop from the Microsoft Store, you might be unable to connect to Oracle databases
because of an Oracle driver issue. If you encounter this issue, the error message returned is: Object reference not
set. To address the issue, do one of these steps:
Download Power BI Desktop from the Download Center instead of Microsoft Store.
If you want to use the version from Microsoft Store: on your local computer, copy oraons.dll from
12.X.X\client_X to 12.X.X\client_X\bin, where X represents version and directory numbers.
If you see the error message, Object reference not set, in the Power BI Gateway when you connect to an Oracle
database, follow the instructions in Manage your data source - Oracle.
If you're using Power BI Report Server, consult the guidance in the Oracle Connection Type article.
Run Python scripts in Power BI Desktop
9/9/2020 • 3 minutes to read • Edit Online
You can run Python scripts directly in Power BI Desktop and import the resulting datasets into a Power BI Desktop
data model.
Install Python
To run Python scripts in Power BI Desktop, you need to install Python on your local machine. You can download
Python from the Python website. The current Python scripting release supports Unicode characters and spaces in
the installation path.
Install required Python packages
The Power BI Python integration requires the installation of two Python packages:
Pandas. A software library for data manipulation and analysis. It offers data structures and operations for
manipulating numerical tables and time series. Your imported data must be in a pandas data frame. A data
frame is a two-dimensional data structure. For example, data is aligned in a tabular fashion in rows and
columns.
Matplotlib. A plotting library for Python and its numerical mathematics extension NumPy. It provides an object-
oriented API for embedding plots into applications using general-purpose GUI toolkits, such as Tkinter,
wxPython, Qt, or GTK+.
In a console or shell, use the pip command-line tool to install the two packages. The pip tool is packaged with more
recent Python versions.
import pandas as pd
data = [['Alex',10],['Bob',12],['Clarke',13]]
df = pd.DataFrame(data,columns=['Name','Age'],dtype=float)
print (df)
When run, this script returns:
Name Age
0 Alex 10.0
1 Bob 12.0
2 Clarke 13.0
When preparing and running a Python script in Power BI Desktop, there are a few limitations:
Only pandas data frames are imported, so make sure the data you want to import to Power BI is represented in
a data frame
Any Python script that runs longer than 30 minutes times out
Interactive calls in the Python script, such as waiting for user input, halts the script’s execution
When setting the working directory within the Python script, you must define a full path to the working
directory, rather than a relative path
Nested tables are currently not supported
Run your Python script and import data
To run your Python Script in Power BI Desktop:
1. In the Home ribbon, select Get Data > Other .
2. Select Other > Python script as shown in the following image:
3. Select Connect . Your local latest installed Python version is selected as your Python engine. Copy your
script into the Python script dialog box that appears. Here, we enter the simple Python script shown
before.
4. Select OK . If the script runs successfully, the Navigator appears and you can load the data and use it. For
the example, select df , as shown in the image, then Load .
Troubleshooting
If Python isn't installed or identified, a warning displays. You can also see a warning if you have multiple local
machine installations. Revisit and review the previous Install Python and Enable Python scripting sections.
Using custom Python distributions
Power BI executes scripts directly by using the python.exe executable from a user-provided directory (provided
through the settings page). Distributions that require an extra step to prepare the environment (for example,
Conda) might encounter an issue where their execution fails.
We recommend using the official Python distribution from https://www.python.org/ to avoid related issues.
As a possible solution, you can start Power BI Desktop from your custom Python environment prompt.
Refresh
You can refresh a Python script in Power BI Desktop. To refresh, go to the Home ribbon and select Refresh . When
you refresh a Python script, Power BI Desktop runs the Python script again.
Known Limitations
Currently you won't be able to use Python scripts in reports created with Enhanced Metadata (Preview) feature
enabled. Existing reports will continue to work. For more information check out Using enhanced dataset metadata
(preview).
Next steps
Take a look at the following additional information about Python in Power BI.
Create Python Visuals in Power BI Desktop
Use an external Python IDE with Power BI
Use Python in Query Editor
9/9/2020 • 4 minutes to read • Edit Online
You can use Python , a programming language widely used by statisticians, data scientists, and data analysts, in the
Power BI Desktop Quer y Editor . This integration of Python into Quer y Editor lets you perform data cleansing
using Python, and perform advanced data shaping and analytics in datasets, including completion of missing data,
predictions, and clustering, just to name a few. Python is a powerful language, and can be used in Quer y Editor
to prepare your data model and create reports.
Installing Python
To use Python in Power BI Desktop's Quer y Editor , you need to install Python on your local machine. You can
download and install Python for free from many locations, including the Official Python download page, and the
Anaconda.
2. Select the file and select Open , and the CSV is displayed in the CSV file dialog.
3. Once the data is loaded, you'll see it in the Fields pane in Power BI Desktop.
4. Open Quer y Editor by selecting Edit Queries from the Home tab in Power BI Desktop .
5. In the Transform tab, select Run Python Script and the Run Python Script editor appears (shown in the
next step). Notice that rows 15 and 20 suffer from missing data, as do other rows you can't see in the
following image. The steps below show how Python can (and will) complete those rows for you.
import pandas as pd
completedData = dataset.fillna(method='backfill', inplace=False)
dataset["completedValues"] = completedData["SMI missing values"]
NOTE
You'll need to have the pandas library installed in your Python environment for the previous script code to work
properly. To install pandas, run the following command in your Python installation: | > pip install pandas
When put into the Run Python Script dialog, the code looks like the following:
7. After selecting OK , Quer y Editor displays a warning about data privacy.
8. For the Python scripts to work properly in the Power BI service, all data sources need to be set to public. For
more information about privacy settings and their implications, see Privacy Levels.
Notice a new column in the Fields pane called completedValues. Notice there are a few missing data
elements, such as on row 15 and 18. Take a look at how Python handles that in the next section.
With just five lines of Python script, Quer y Editor filled in the missing values with a predictive model.
Once that visual is complete, and any other visuals you might want to create using Power BI Desktop , you can
save the Power BI Desktop file (which saves as a .pbix file) and then use the data model, including the Python
scripts that are part of it, in the Power BI service.
NOTE
Want to see a completed .pbix file with these steps completed? You're in luck - you can download the completed Power BI
Desktop file used in these examples right here.
Once you've uploaded the .pbix file to the Power BI service, a couple more steps are necessary to enable data
refresh (in the service) and to enable visuals to be updated in the service (the data needs access to Python for
visuals to be updated). The additional steps are the following:
Enable scheduled refresh for the dataset - to enable scheduled refresh for the workbook that contains
your dataset with Python scripts, see Configuring scheduled refresh, which also includes information about
Personal Gateway .
Install the Personal Gateway - you need a Personal Gateway installed on the machine where the file is
located, and where Python is installed; the Power BI service must access that workbook and re-render any
updated visuals. You can get more information on how to install and configure Personal Gateway.
Limitations
There are some limitations to queries that include Python scripts created in Quer y Editor :
All Python data source settings must be set to Public, and all other steps in a query created in Quer y Editor
must also be public. To get to data source settings, in Power BI Desktop select File > Options and
settings > Data source settings .
From the Data Source Settings dialog, select the data source(s) and then select Edit Permissions... and
ensure that the Privacy Level is set to Public.
To enable scheduled refresh of your Python visuals or dataset, you need to enable Scheduled refresh and
have a Personal Gateway installed on the computer that houses the workbook and the Python installation.
For more information on both, see the previous section in this article, which provides links to learn more
about each.
Nested tables (table of tables) are currently not supported
There are all sorts of things you can do with Python and custom queries, so explore and shape your data just the
way you want it to appear.
Use an external Python IDE with Power BI
9/9/2020 • 4 minutes to read • Edit Online
With Power BI Desktop , you can use your external Python IDE (Integrated Development Environment) to create
and refine Python scripts, then use those scripts in Power BI.
If you have multiple Python IDEs installed, you can specify which will be launched by selecting it from the Detected
Python IDEs drop-down in the Options dialog.
By default, Power BI Desktop will launch Visual Studio Code as the external Python IDE if it's installed on your
local computer; if Visual Studio Code is not installed and you have Visual Studio , that will be launched instead.
If neither of those Python IDEs is installed, the application associated with .PY files is launched.
And if no .PY file association exists, it's possible to specify a path to a custom IDE in the Browse to your preferred
Python IDE section of the Options dialog. You can also launch a different Python IDE by selecting the Settings
gear icon beside the Launch Python IDE arrow icon, in Power BI Desktop .
3. When script visuals are enabled, you can select a Python visual from the Visualizations pane, which
creates a blank Python visual that's ready to display the results of your script. The Python script editor
pane also appears.
4. Now you can select the fields you want to use in your Python script. When you select a field, the Python
script editor field automatically creates script code based on the field or fields you select. You can either
create (or paste) your Python script directly in the Python script editor pane, or you can leave it empty.
NOTE
The default aggregation type for Python visuals is do not summarize.
5. You can now launch your Python IDE directly from Power BI Desktop . Select the Launch Python IDE
button, found on the right side of the Python script editor title bar, as shown below.
6. Your specified Python IDE is launched by Power BI Desktop, as shown in the following image (in this image,
Visual Studio Code is the default Python IDE).
NOTE
Power BI Desktop adds the first three lines of the script so it can import your data from Power BI Desktop once
you run the script.
7. Any script you created in the Python script editor pane of Power BI Desktop appears starting in line 4
in your Python IDE. At this point, you can create your Python script in the Python IDE. Once your Python
script is complete in your Python IDE, you need to copy and paste it back into the Python script editor
pane in Power BI Desktop , excluding the first three lines of the script that Power BI Desktop
automatically generated. Do not copy the first three lines of script back into Power BI Desktop , those lines
were only used to import your data to your Python IDE from Power BI Desktop .
Known limitations
Launching a Python IDE directly from Power BI Desktop has a few limitations:
Automatically exporting your script from your Python IDE into Power BI Desktop is not supported.
Next steps
Take a look at the following additional information about Python in Power BI.
Running Python Scripts in Power BI Desktop
Create Power BI visuals using Python
Create Power BI visuals by using Python
9/9/2020 • 5 minutes to read • Edit Online
With Power BI Desktop, you can use Python to visualize your data.
Prerequisites
Work through the Run Python scripts in Power BI Desktop tutorial using the following Python script:
import pandas as pd
df = pd.DataFrame({
'Fname':['Harry','Sally','Paul','Abe','June','Mike','Tom'],
'Age':[21,34,42,18,24,80,22],
'Weight': [180, 130, 200, 140, 176, 142, 210],
'Gender':['M','F','M','M','F','M','M'],
'State':['Washington','Oregon','California','Washington','Nevada','Texas','Nevada'],
'Children':[4,1,2,3,0,2,0],
'Pets':[3,2,2,5,0,1,5]
})
print (df)
The Run Python scripts in Power BI Desktop article shows you how to install Python on your local machine and
enable it for Python scripting in Power BI Desktop. This tutorial uses data from the above script to illustrate
creating Python visuals.
2. In the Enable script visuals dialog box that appears, select Enable .
When you add a Python visual to a report, Power BI Desktop takes the following actions:
A placeholder Python visual image appears on the report canvas.
The Python script editor appears along the bottom of the center pane.
3. Next, drag the Age , Children , Fname , Gender , Pets , State , and Weight fields to the Values section
where it says Add data fields here .
Your Python script can only use fields added to the Values section. You can add or remove fields from the
Values section while working on your Python script. Power BI Desktop automatically detects field changes.
NOTE
The default aggregation type for Python visuals is do not summarize.
4. Now you can use the data you selected to create a plot.
As you select or remove fields, supporting code in the Python script editor is automatically generated or
removed.
Based on your selections, the Python script editor generates the following binding code.
The editor created a dataset dataframe, with the fields you added.
The default aggregation is: do not summarize.
Similar to table visuals, fields are grouped and duplicate rows appear only once.
TIP
In certain cases, you might not want automatic grouping to occur, or you'll want all rows to appear, including
duplicates. If so, you can add an index field to your dataset that causes all rows to be considered unique and which
prevents grouping.
You can access columns in the dataset using their respective names. For example, you can code
dataset["Age"] in your Python script to access the age field.
5. With the dataframe automatically generated by the fields you selected, you're ready to write a Python script
that results in plotting to the Python default device. When the script is complete, select Run from the
Python script editor title bar.
Power BI Desktop replots the visual if any of the following events occur:
When you select Run from the Python script editor title bar
Whenever a data change occurs, due to data refresh, filtering, or highlighting
When you run a Python script that results in an error, the Python visual isn't plotted and a canvas error
message appears. For error details, select See details from the message.
To get a larger view of the visualizations, you can minimize the Python script editor .
Ok, let's create some visuals.
Your Python script editor pane should now look like this:
The matplotlib library is imported to plot and create our visuals.
2. When you select the Run script button, the following scatter plot generates in the placeholder Python visual
image.
When you select the Run script button, the following line plot with multiple columns generates.
Create a bar plot
Let's create a bar plot for each person's age. Remove or comment the code under Paste or type your script
code here and enter this Python code:
When you select the Run script button, the following bar plot generates:
Security
IMPORTANT
Python scripts security: Python visuals are created from Python scripts, which could contain code with security or privacy
risks. When attempting to view or interact with an Python visual for the first time, a user is presented with a security warning
message. Only enable Python visuals if you trust the author and source, or after you review and understand the Python
script.
Next steps
Take a look at the following additional information about Python in Power BI.
Run Python Scripts in Power BI Desktop
Use an external Python IDE with Power BI
Create visuals by using Python packages in the Power
BI service
9/9/2020 • 2 minutes to read • Edit Online
You can use the powerful Python programming language to create visuals in the Power BI service. Many Python
packages are supported in the Power BI service and more are being supported all the time.
The following sections provide an alphabetical table of which Python packages are supported in Power BI.
PA C K A GE VERSIO N L IN K
Next steps
For more information about Python in Power BI, take a look at the following articles:
Create Power BI visuals using Python
Running Python scripts in Power BI Desktop
Using Python in Query Editor
Run R scripts in Power BI Desktop
9/9/2020 • 2 minutes to read • Edit Online
You can run R scripts directly in Power BI Desktop and import the resulting datasets into a Power BI Desktop data
model.
Install R
To run R scripts in Power BI Desktop, you need to install R on your local machine. You can download and install R
for free from many locations, including the Microsoft R Application Network and the CRAN Repository. The current
release supports Unicode characters and spaces (empty characters) in the installation path.
Run R scripts
Using just a few steps in Power BI Desktop, you can run R scripts and create a data model. With the data model,
you can create reports and share them on the Power BI service. R scripting in Power BI Desktop now supports
number formats that contain decimals (.) and commas (,).
Prepare an R script
To run an R script in Power BI Desktop, create the script in your local R development environment, and make sure it
runs successfully.
To run the script in Power BI Desktop, make sure the script runs successfully in a new and unmodified workspace.
This prerequisite means that all packages and dependencies must be explicitly loaded and run. You can use
source() to run dependent scripts.
When you prepare and run an R script in Power BI Desktop, there are a few limitations:
Because only data frames are imported, remember to represent the data you want to import to Power BI in a
data frame.
Columns typed as Complex and Vector aren't imported, and they're replaced with error values in the created
table.
Values that are N/A are translated to NULL values in Power BI Desktop.
If an R script runs longer than 30 minutes, it times out.
Interactive calls in the R script, such as waiting for user input, halts the script’s execution.
When setting the working directory within the R script, you must define a full path to the working directory,
rather than a relative path.
Run your R script and import data
Now you can run your R script to import data into Power BI Desktop:
1. In Power BI Desktop, select Get Data , choose Other > R script , and then select Connect :
2. If R is installed on your local machine, just copy your script into the script window and select OK . The latest
installed version is displayed as your R engine.
3. Select OK to run the R Script. When the script runs successfully, you can then choose the resulting data
frames to add to the Power BI model.
You can control which R installation to use to run your script. To specify your R installation settings, choose File >
Options and settings > Options , then select R scripting . Under R script options , the Detected R home
directories dropdown list shows your current R installation choices. If the R installation you want isn't listed, pick
Other , and then browse to or enter your preferred R installation folder in Set an R home director y .
Refresh
You can refresh an R script in Power BI Desktop. When you refresh an R script, Power BI Desktop runs the R script
again in the Power BI Desktop environment.
Next steps
Take a look at the following additional information about R in Power BI.
Create Power BI visuals using R
Use an external R IDE with Power BI
Use R in Power Query Editor
9/9/2020 • 4 minutes to read • Edit Online
The R language is a powerful programming language that many statisticians, data scientists, and data analysts use.
You can use R in Power BI Desktop's Power Query Editor to:
Prepare data models.
Create reports.
Do data cleansing, advanced data shaping, and dataset analytics, which include missing data completion,
predictions, clustering, and more.
Install R
You can download R for free from the Revolution R Open download page and the CRAN Repository.
Install mice
As a prerequisite, you must install the mice library in your R environment. Without mice, the sample script code
won't work properly. The mice package implements a method to deal with missing data.
To install the mice library:
1. Launch the R.exe program (for example, C:\Program Files\Microsoft\R Open\R-3.5.3\bin\R.exe).
2. Run the install command from the R prompt:
install.packages('mice')
4. Select Load to load the data from the file. After Power BI has loaded the data, the new table appears in the
Fields pane.
5. To open Power Query Editor, from the Home ribbon select Edit Queries .
6. From the Transform tab, select Run R script . The Run R script editor appears. Rows 15 and 20 have
missing data, as do other rows you can't see in the image. The following steps show how R completes those
rows for you.
7. For this example, enter the following script code in the Script box of the Run R script window. Replace
<Your File Path> with the path to EuStockMarkets_NA.csv on your local file system, for example,
C:/Users/John Doe/Documents/Microsoft/EuStockMarkets_NA.csv.
dataset <- read.csv(file="<Your File Path>/EuStockMarkets_NA.csv", header=TRUE, sep=",")
library(mice)
tempData <- mice(dataset,m=1,maxit=50,meth='pmm',seed=100)
completedData <- complete(tempData,1)
output <- dataset
output$completedValues <- completedData$"SMI missing values"
NOTE
You might need to overwrite a variable named output to properly create the new dataset with the filters applied.
9. Inside the warning message, select Continue . In the Privacy levels dialog box that appears, set all data
sources to Public for the R scripts to work properly in the Power BI service.
For more information about privacy settings and their implications, see Power BI Desktop privacy levels.
10. Select Save to run the script.
Notice a new column in the Fields pane called completedValues . This column has a few missing data elements,
such as on row 15 and 18. Take a look at how R handles that in the next section.
With just five lines of R script, Power Query Editor filled in the missing values with a predictive model.
You can save all completed visuals in one Power BI Desktop .pbix file and use the data model and its R scripts in the
Power BI service.
NOTE
You can download a .pbix file with all these steps completed.
After you've uploaded the .pbix file to the Power BI service, you need to take additional steps to enable service data
refresh and updated visuals:
Enable scheduled refresh for the dataset : To enable scheduled refresh for the workbook containing
your dataset with R scripts, see Configuring scheduled refresh. This article also includes information about
personal gateways.
Install a personal gateway : You need a personal gateway installed on the machine where the file and R
are located. The Power BI service accesses that workbook and re-renders any updated visuals. For more
information, see Use personal gateways in Power BI.
Limitations
There are some limitations to queries that include R scripts created in Power Query Editor:
All R data source settings must be set to Public . All other steps in a Power Query Editor query must also be
public.
To get to the data source settings, in Power BI Desktop, select File > Options and settings > Data source
settings .
In the Data source settings dialog box, select one or more data sources, and then select Edit
Permissions . Set the Privacy Level to Public .
To schedule refresh of your R visuals or dataset, enable scheduled refresh and install a personal gateway on
the computer containing the workbook and R.
There are all sorts of things you can do with R and custom queries. Explore and shape your data just the way you
want it to appear.
Next Steps
Introduction to R
Run R scripts in Power BI Desktop
Use an external R IDE with Power BI
Create visuals by using R packages in the Power BI service
Use an external R IDE with Power BI
9/9/2020 • 4 minutes to read • Edit Online
With Power BI Desktop , you can use your external R IDE (Integrated Development Environment) to create and
refine R scripts, then use those scripts in Power BI.
If you have multiple R IDEs installed, you can specify which will be launched by selecting it from the Detected R
IDEs drop-down in the Options dialog.
By default, Power BI Desktop will launch R Studio as the external R IDE if it's installed on your local computer; if
R Studio is not installed and you have Visual Studio 2015 with R Tools for Visual Studio , that will be
launched instead. If neither of those R IDEs is installed, the application associated with .R files is launched.
And if no .R file association exists, it's possible to specify a path to a custom IDE in the Browse to your preferred R
IDE section of the Options dialog. You can also launch a different R IDE by selecting the Settings gear icon beside
the Launch R IDE arrow icon, in Power BI Desktop .
4. Now you can select the fields you want to use in your R script. When you select a field, the R script editor
field automatically creates script code based on the field or fields you select. You can either create (or paste)
your R script directly in the R script editor pane, or you can leave it empty.
NOTE
The default aggregation type for R visuals is do not summarize.
5. You can now launch your R IDE directly from Power BI Desktop . Select the Launch R IDE button, found
on the right side of the R script editor title bar, as shown below.
6. Your specified R IDE is launched by Power BI Desktop, as shown in the following image (in this image,
RStudio is the default R IDE).
NOTE
Power BI Desktop adds the first three lines of the script so it can import your data from Power BI Desktop once
you run the script.
7. Any script you created in the R script editor pane of Power BI Desktop appears starting in line 4 in your
R IDE. At this point, you can create your R script in the R IDE. Once your R script is complete in your R IDE,
you need to copy and paste it back into the R script editor pane in Power BI Desktop , excluding the first
three lines of the script that Power BI Desktop automatically generated. Do not copy the first three lines of
script back into Power BI Desktop , those lines were only used to import your data to your R IDE from
Power BI Desktop .
Known limitations
Launching an R IDE directly from Power BI Desktop has a few limitations:
Automatically exporting your script from your R IDE into Power BI Desktop is not supported.
R Client editor (RGui.exe) is not supported, because the editor itself does not support opening files.
Next steps
Take a look at the following additional information about R in Power BI.
Running R Scripts in Power BI Desktop
Create Power BI visuals using R
Create visuals by using R packages in the Power BI
service
9/9/2020 • 16 minutes to read • Edit Online
You can use the powerful R programming language to create visuals in the Power BI service. Many R packages are
supported in the Power BI service (and more are being supported all the time), and some packages are not.
The following sections provide an alphabetical table of which R packages are supported in Power BI, and which are
not. For more information about R in Power BI, see the R visuals article.
PA C K A GE VERSIO N L IN K
base 3.4.4 NA
BH 1.66.0-1 https://cran.r-
project.org/web/packages/BH/index.htm
l
compiler 3.4.4 NA
datasets 3.4.4 NA
deployrRserve 9.0.0 NA
DT 0.4 https://cran.r-
project.org/web/packages/DT/index.html
ez 4.4-0 https://cran.r-
project.org/web/packages/ez/index.html
graphics 3.4.4 NA
grDevices 3.4.4 NA
grid 3.4.4 NA
HH 3.1-34 https://cran.r-
project.org/web/packages/HH/index.ht
ml
HI 0.4 https://cran.r-
project.org/web/packages/HI/index.html
ks 1.11.0 https://cran.r-
project.org/web/packages/ks/index.html
methods 3.4.4 NA
mi 1.0 https://cran.r-
project.org/web/packages/mi/index.html
MicrosoftR 3.4.4.0105 NA
parallel 3.4.4 NA
R6 2.2.2 https://cran.r-
project.org/web/packages/R6/index.html
RevoIOQ 8.0.10 NA
RevoMods 11.0.0 NA
RevoUtils 10.0.9 NA
RevoUtilsMath 10.0.1 NA
sf 0.6-1 https://cran.r-
project.org/web/packages/sf/index.html
sm 2.2-5.4 https://cran.r-
project.org/web/packages/sm/index.htm
l
sp 1.2-7 https://cran.r-
project.org/web/packages/sp/index.html
splines 3.4.4 NA
stats 3.4.4 NA
stats4 3.4.4 NA
tcltk 3.4.4 NA
tm 0.7-3 https://cran.r-
project.org/web/packages/tm/index.htm
l
tools 3.4.4 NA
translations 3.4.4 NA
utils 3.4.4 NA
PA C K A GE VERSIO N L IN K
V8 2.2 https://cran.r-
project.org/web/packages/V8/index.htm
l
Next steps
For more information about R in Power BI, take a look at the following articles:
Creating R visuals in the Power BI service
Create Power BI visuals using R
Running R scripts in Power BI Desktop
Using R in Query Editor
Enter data directly into Power BI Desktop
9/9/2020 • 2 minutes to read • Edit Online
With Power BI Desktop, you can enter data directly and use that data in your reports and visualizations. For
example, you can copy portions of a workbook or web page, then paste it into Power BI Desktop.
To enter data directly into Power BI Desktop in the form of a new table, select Enter Data from the Home
ribbon.
Power BI Desktop may attempt to make minor transformations on the data, if appropriate, just like it does when
you load data from any source. For example, in the following case it promoted the first row of data to headers.
If you want to shape the data you entered or pasted, select Edit to open Quer y Editor . You can shape and
transform the data before bringing it into Power BI Desktop. Select Load to import the data as it appears.
When you select Load , Power BI Desktop creates a new table from your data, and makes it available in the
Fields pane. In the following image, Power BI Desktop shows my new table, called Table1, and the two fields
within that table that were created.
And that’s it. It's that easy to enter data into Power BI Desktop.
You're now ready to use the data in Power BI Desktop. You can create visuals, reports, or interact with any other
data you might want to connect with and import, such as Excel workbooks, databases, or any other data source.
Next steps
There are all sorts of data you can connect to using Power BI Desktop. For more information on data sources,
check out the following resources:
What is Power BI Desktop?
Data sources in Power BI Desktop
Shape and combine data with Power BI Desktop
Connect to Excel workbooks in Power BI Desktop
Connect to CSV files in Power BI Desktop
Connect to Excel workbooks in Power BI Desktop
9/9/2020 • 2 minutes to read • Edit Online
Connecting to an Excel workbook from Power BI Desktop is straightforward, and this article walks you through
the steps.
In Power BI Desktop, select Get Data > Excel from the Home ribbon.
You can select the Load button to import the data, or if you want to edit the data using Quer y Editor before
bringing it into Power BI Desktop, select the Edit button.
When you load the data, Power BI Desktop displays the Load window and displays the activity associated with
loading the data.
When complete, Power BI Desktop displays the tables and fields it imported from your Excel workbook in the
Fields pane, on the right side of the Desktop.
And that’s it!
You’re now ready to use the imported data from your Excel workbook in Power BI Desktop to create visuals,
reports, or interact with any other data you might want to connect with and import, such as other Excel
workbooks, databases, or any other data source.
Next steps
There are all sorts of data you can connect to using Power BI Desktop. For more information on data sources,
check out the following resources:
What is Power BI Desktop?
Data Sources in Power BI Desktop
Shape and Combine Data with Power BI Desktop
Connect to CSV files in Power BI Desktop
Enter data directly into Power BI Desktop
Connect to SSAS multidimensional models in Power
BI Desktop
9/9/2020 • 4 minutes to read • Edit Online
With Power BI Desktop, you can access SSAS multidimensional models, commonly referred to as SSAS MD.
To connect to an SSAS MD database, select Get Data , choose Database > SQL Ser ver Analysis Ser vices
database , and then select Connect :
The Power BI service and Power BI Desktop both support SSAS multidimensional models in live connection mode.
You can publish and upload reports that use SSAS Multidimensional models in live mode to the Power BI
service.
Cube Model
B ISM - M ULT IDIM EN T IO N A L O B JEC T TA B UL A R M ETA DATA
Measure Measure
Perspective Perspective
KPI KPI
Troubleshooting
The following list describes all known issues when connecting to SQL Server Analysis Services (SSAS).
Error : Couldn't load model schema - This error usually occurs when the user connecting to Analysis
Services doesn't have access to database/cube.
Connect to CSV files in Power BI Desktop
9/9/2020 • 2 minutes to read • Edit Online
Connecting to a comma-separated value (CSV) file from Power BI Desktop is a lot like connecting to an Excel
workbook. Both are easy, and this article steps you through how to connect to any CSV file to which you have
access.
To start with, from Power BI Desktop select Get Data > CSV from the Home ribbon.
Select your CSV file from the Open dialog that appears.
When you select Open , Power BI Desktop accesses the file and determines certain file attributes, such as the file
origin, delimiter type, and how many rows should be used to detect the data types in the file.
These file attributes and options are shown in the drop-down selections at the top of the CSV impor t dialog
window, shown below. You can change any of these detected settings manually, by choosing another option from
any of the drop-down selectors.
When you’re satisfied with the selections, you can select Load to import the file into Power BI Desktop, or you can
select Edit to open Quer y Editor and further shape or transform the data before importing it.
Once you load the data into Power BI Desktop, you see the table and its columns (which are presented as Fields in
Power BI Desktop) in the Fields pane, along the right of the Report view in Power BI Desktop.
That’s all you have to do – the data from your CSV file is now in Power BI Desktop.
You can use that data in Power BI Desktop to create visuals, reports, or interact with any other data you might want
to connect with and import, such as Excel workbooks, databases, or any other data source.
IMPORTANT
When you import a CSV file, Power BI Desktop generates a columns=x (where x is the number of columns in the CSV file
during initial import) as a step in Power Query Editor. If you subsequently add more columns and the data source is set to
refresh, any columns beyond the initial x count of columns are not refreshed.
Next steps
There are all sorts of data you can connect to using Power BI Desktop. For more information on data sources,
check out the following resources:
What is Power BI Desktop?
Data Sources in Power BI Desktop
Shape and Combine Data with Power BI Desktop
Connect to Excel workbooks in Power BI Desktop
Enter data directly into Power BI Desktop
Connect to a Google BigQuery database in Power BI
Desktop
9/9/2020 • 2 minutes to read • Edit Online
In Power BI Desktop, you can connect to a Google BigQuer y database and use the underlying data just like any
other data source in Power BI Desktop.
In the Google BigQuer y window that appears, sign in to your Google BigQuery account and select Connect .
When you're signed in, you see the following window indicated you've been authenticated.
Once you successfully connect, a Navigator window appears and displays the data available on the server, from
which you can select one or multiple elements to import and use in Power BI Desktop .
Considerations and Limitations
There are a few limits and considerations to keep in mind with the Google BigQuer y connector:
The Google BigQuery connector is available in Power BI Desktop and in the Power BI service. In the Power BI
service, the connector can be accessed using the Cloud-to-Cloud connection from Power BI to Google BigQuery.
You can use Power BI with the Google BigQuery Billing Project . By default, Power BI uses the first project from the
list returned for the user. To customize the behavior of the Billing Project when using it with Power BI, take the
following steps:
Specifying the following option in the underlying M in the Source step, which can be customized by using
Power Quer y Editor in Power BI Desktop:
Source = GoogleBigQuery.Database([BillingProject="Include-Billing-Project-Id-Here"])
Next steps
There are all sorts of data you can connect to using Power BI Desktop. For more information on data sources, check
out the following resources:
What is Power BI Desktop?
Data Sources in Power BI Desktop
Shape and Combine Data with Power BI Desktop
Connect to Excel workbooks in Power BI Desktop
Enter data directly into Power BI Desktop
Connect to an Impala database in Power BI Desktop
9/9/2020 • 2 minutes to read • Edit Online
In Power BI Desktop, you can connect to an Impala database and use the underlying data just like you can with any
other data source in Power BI Desktop.
3. In the Impala window that appears, type or paste the name of your Impala server into the box. Then select
OK . You can Impor t data directly into Power BI or you can use DirectQuer y . Learn more about using
DirectQuery.
4. When prompted, enter your credentials or connect anonymously. The Impala connector supports
Anonymous, Basic (user name + password), and Windows authentication.
NOTE
After you put in your user name and password for a particular Impala server, Power BI Desktop uses those same
credentials in subsequent connection attempts. You can modify those credentials by going to File > Options and
settings > Data source settings .
5. After you connect, a Navigator window appears and displays the data that's available on the server. Choose
elements from this data to import and use in Power BI Desktop .
Considerations and limitations
There are a few limitations and considerations to keep in mind with the Impala connector:
The Impala connector is supported on the on-premises data gateway, using any of the three supported
authentication mechanisms.
Next steps
There are many different data sources that you can connect to by using Power BI Desktop. For more information
about data sources, check out the following resources:
What is Power BI Desktop?
Data sources in Power BI Desktop
Shape and combine data with Power BI Desktop
Connect to Excel workbooks in Power BI Desktop
Enter data directly into Power BI Desktop
Connect to OData feeds in Power BI Desktop
9/9/2020 • 2 minutes to read • Edit Online
In Power BI Desktop, you can connect to an OData feed and use the underlying data just like any other data source
in Power BI Desktop.
To connect to an OData feed, select Get Data > OData Feed from the Home ribbon in Power BI Desktop.
In the OData Feed window that appears, type or paste your OData feed URL into the box, and select OK .
Power BI Desktop connects to the OData feed, and displays the available tables and other data elements in the
Navigator window. When you select an element, the right pane of the Navigator window displays a preview of
the data. You can select as many tables as you want to import. The Navigator window shows a preview of the
currently selected table.
You can choose the Edit button, which launches Quer y Editor , where you can shape and transform the data from
the OData feed before importing it into Power BI Desktop. Or you can select the Load button, and import all of the
data elements you selected in the left pane.
When we select Load , Power BI Desktop imports the selected items, and displays a Load window of the import
progress.
Once complete, Power BI Desktop makes the selected tables and other data elements available in the Fields pane,
found on the right side of the Reports view in Power BI Desktop.
And that’s it!
You’re now ready to use the imported data from the OData feed in Power BI Desktop to create visuals, reports, or
interact with any other data you might want to connect with and import, such as other Excel workbooks, databases,
or any other data source.
Next steps
There are all sorts of data you can connect to using Power BI Desktop. For more information on data sources, check
out the following resources:
What is Power BI Desktop?
Data Sources in Power BI Desktop
Shape and Combine Data with Power BI Desktop
Connect to Excel workbooks in Power BI Desktop
Enter data directly into Power BI Desktop
Connect to an Amazon Redshift database in Power BI
Desktop
9/9/2020 • 2 minutes to read • Edit Online
In Power BI Desktop , you can connect to an Amazon Redshift database and use the underlying data just like any
other data source in Power BI Desktop.
In the Amazon Redshift window that appears, type or paste the name of your Amazon Redshift server and
database into the box. As part of the Server field, users can specify a port in the following format: ServerURL:Port
When prompted, put in your username and password. You should use the server name that precisely matches the
SSL certificate to avoid errors.
Once you successfully connect, a Navigator window appears and displays the data available on the server, from
which you can select one or multiple elements to import and use in Power BI Desktop .
Once you make selections from the Navigator window, you can either Load or Edit the data.
If you choose to Load data, you'll be prompted to use either Import or DirectQuery mode to load the data. For
more information, check out this article that explains DirectQuery.
If you select to Edit the data, Quer y Editor appears where you can apply all sorts of transformations and filters
to the data, many of which are applied to the underlying Amazon Redshift database itself (if supported).
Next steps
There are all sorts of data you can connect to using Power BI Desktop. For more information on data sources, check
out the following resources:
What is Power BI Desktop?
Data Sources in Power BI Desktop
Shape and Combine Data with Power BI Desktop
Connect to Excel workbooks in Power BI Desktop
Enter data directly into Power BI Desktop
Connect to webpages from Power BI Desktop
9/9/2020 • 2 minutes to read • Edit Online
You can connect to a webpage and import its data into Power BI Desktop, to use in your visuals and in your data
models.
In Power BI Desktop, select Get Data > Web from the Home ribbon.
A dialog appears, asking for the URL of the web page from which you want to import data.
Once you’ve typed in (or pasted) the URL, select OK . Power BI Desktop connects to that page, then presents the
page’s available data in the Navigator window. When you select one of the available data elements, such as a table
of the entire page, the Navigator window displays a preview of that data on the right side of the window.
You can choose the Edit button, which launches Quer y Editor , where you can shape and transform the data on
that Web page before importing it into Power BI Desktop. Or you can select the Load button, and import all of the
data elements you selected in the left pane.
When we select Load , Power BI Desktop imports the selected items, and makes them available in the Fields pane,
found on the right side of the Reports view in Power BI Desktop.
That’s all there is to connecting to a web page and bringing its data into Power BI Desktop.
From there, you can drag those fields onto the Report canvas and create all the visualizations you want. You can
also use the data from that Web page just like you would any other data – you can shape it, you can create
relationships between it and other data sources in your model, and otherwise do what you’d like to create the
Power BI report you want.
To see connecting to a Web page in more depth and action, take a look at the Power BI Desktop Getting Started
Guide.
Next steps
There are all sorts of data you can connect to using Power BI Desktop. For more information on data sources, check
out the following resources:
Data Sources in Power BI Desktop
Shape and Combine Data with Power BI Desktop
Connect to Excel workbooks in Power BI Desktop
Connect to CSV files in Power BI Desktop
Enter data directly into Power BI Desktop
Connect to a Snowflake computing warehouse in
Power BI Desktop
9/9/2020 • 2 minutes to read • Edit Online
In Power BI Desktop, you can connect to a Snowflake computing warehouse and use the underlying data just like
any other data source in Power BI Desktop.
In the Snowflake window that appears, type or paste the name of your Snowflake computing warehouse into the
box and select OK . Note that you can choose to Impor t data directly into Power BI, or you can use DirectQuer y .
You can learn more about using DirectQuery. Please note that AAD SSO only supports DirectQuery.
When prompted, put in your username and password.
NOTE
Once you put in your username and password for a particular Snowflake server, Power BI Desktop uses those same
credentials in subsequent connection attempts. You can modify those credentials by going to File > Options and settings
> Data source settings .
If you want to use the Microsoft account option, the Snowflake AAD integration must be configured on the
Snowflake side. To do this, read the Getting Started section of the Snowflake documentation on the topic.
Once you successfully connect, a Navigator window appears and displays the data available on the server, from
which you can select one or multiple elements to import and use in Power BI Desktop .
You can Load the selected table, which brings the entire table into Power BI Desktop , or you can Edit the query,
which opens Quer y Editor so you can filter and refine the set of data you want to use, and then load that refined
set of data into Power BI Desktop .
Next steps
There are all sorts of data you can connect to using Power BI Desktop. For more information on data sources, check
out the following resources:
What is Power BI Desktop?
Data Sources in Power BI Desktop
Shape and Combine Data with Power BI Desktop
Connect to Excel workbooks in Power BI Desktop
Enter data directly into Power BI Desktop
Connect to Snowflake in Power BI Service
9/9/2020 • 3 minutes to read • Edit Online
Introduction
Connecting to Snowflake in the Power BI service differs from other connectors in only one way. Snowflake has an
additional capability for Azure Active Directory (AAD), with an option for SSO. Parts of the integration require
different administrative roles across Snowflake, Power BI, and Azure. You can also choose to enable AAD
authentication without using SSO. Basic authentication works similarly to other connectors in the service.
To configure AAD integration and optionally enable SSO, follow the steps in this article:
If you're the Snowflake admin, read the Power BI SSO to Snowflake - Getting Started article in the Snowflake
documentation.
If you're a Power BI admin, reference Power BI Service configuration - Admin Portal to learn how to enable SSO.
If you're a Power BI dataset creator, reference Power BI Service configuration - Configuring a dataset with AAD to
learn how to enable SSO.
3. Select Data source credentials and sign in. The dataset can be signed into Snowflake with Basic or
OAuth2 (AAD) credentials. if you use AAD, you can enable SSO in the next step.
4. Select the option End users use their own OAuth2 credentials when accessing this data source via
DirectQuer y . This setting will enable AAD SSO. Whether the first user signs in with Basic authentication or
OAuth2 (AAD), the AAD credentials are what will be sent for SSO.
After these steps are done, users should automatically use their AAD authentication to connect to data from that
Snowflake dataset.
If you choose not to enable SSO, then users refreshing the report will use the credentials of the user who signed in,
like most other Power BI reports.
Troubleshooting
If you run into any issues with the integration, refer to the Snowflake troubleshooting guide.
Next steps
Data sources for the Power BI service
Connect to datasets in the Power BI service from Power BI desktop
Connect to a Snowflake computing warehouse
Create visuals and reports with the Azure Cost
Management connector in Power BI Desktop
9/9/2020 • 3 minutes to read • Edit Online
You can use the Azure Cost Management connector for Power BI Desktop to make powerful, customized
visualizations and reports that help you better understand your Azure spend. The Azure Cost Management
connector currently supports customers with a Microsoft Customer Agreement or an Enterprise Agreement (EA).
The Azure Cost Management connector uses OAuth 2.0 for authentication with Azure and identifies users who are
going to use the connector. Tokens generated in this process are valid for a specific period. Power BI preserves the
token for the next login. OAuth 2.0, is a standard for the process that goes on behind the scenes to ensure the
secure handling of these permissions. To connect, you must use an Enterprise Administrator account for Enterprise
Agreements, or a Billing account owner for Microsoft Customer Agreements.
NOTE
This connector replaces the previously available Azure Consumption Insights and Azure Cost Management (Beta) connectors.
Any reports created with the previous connector must be recreated using this connector.
6. When prompted, sign in with your Azure user account and password.
TA B L E DESC RIP T IO N
Billing events Event log of new invoices, credit purchases, etc. Microsoft
Customer Agreement only.
TA B L E DESC RIP T IO N
Credit lots Azure credit lot purchase details for the provided billing
profile. Microsoft Customer Agreement only.
RI usage details Consumption details for your existing Reserved Instances over
the last month.
You can select a table to see a preview dialog. You can select one or more tables by selecting the boxes beside their
name and then select Load .
When you select Load , the data is loaded into Power BI Desktop.
When the data you selected is loaded, the data tables and fields are shown in the Fields pane.
Next steps
You can connect to many different data sources using Power BI Desktop. For more information, see the following
articles:
What is Power BI Desktop?
Data Sources in Power BI Desktop
Shape and Combine Data with Power BI Desktop
Connect to Excel workbooks in Power BI Desktop
Enter data directly into Power BI Desktop
Connect to Azure Consumption Insights data in
Power BI Desktop
9/9/2020 • 7 minutes to read • Edit Online
You can use Power BI desktop to connect to Azure and get in-depth data about your organization's Azure service
usage. With this data, you can create custom reports and measures to better understand and analyze your Azure
spend.
NOTE
There is limited support for the Microsoft Azure Consumption Insights (Beta). For new functionality, use the Azure Cost
Management connector for Power BI.
You can get your enrollment number from the Azure Enterprise Portal, in the location shown in the
following image:
This connector version only supports enterprise enrollments from https://ea.azure.com. China enrollments aren't
currently supported.
Next, provide your Access key to connect.
Your Access key for enrollment can be found on the Azure Enterprise Portal.
Once you provide your Access key and select Connect , a Navigator window appears and shows nine available
tables:
TA B L E DESC RIP T IO N
You can select a checkbox beside any table to see a preview. You can select one or more tables by checking the box
beside their name, then select Load .
NOTE
The Summary and PriceSheet tables are only available for the enrollment-level API Key. Also, the data in these tables has, by
default, the current month's data for Usage and PriceSheet. The Summary and MarketPlace tables are not constrained to the
current month.
When you select Load , the data is loaded into Power BI Desktop .
Once the data you selected is loaded, the tables and fields you selected can be seen in the Fields pane.
Using Azure Consumption Insights
To use the Azure Consumption Insights connector, you access to the Azure portal Enterprise features.
Once you successfully load data using the Azure Consumption Insights connector, you can create your own
custom measures and columns using Quer y Editor . You can also create visuals, reports, and dashboards for
sharing in the Power BI ser vice .
With a blank query, you can retrieve a sample Azure custom queries collection. There are two ways you can do this
retrieval:
In Power BI Desktop :
1. Select the Home ribbon
2. Select Get Data > Blank Quer y
Or, in Quer y Editor :
1. Right-click in the left Queries pane
2. Select New Quer y > Blank Quer y from the menu that appears
In the Formula bar , type:
= MicrosoftAzureConsumptionInsights.Contents
let
enrollmentNumber = "100",
optionalParameters = [ numberOfMonth = 6, dataType="DetailCharges" ],
data = MicrosoftAzureConsumptionInsights.Contents(enrollmentNumber, optionalParameters)
in
data
You'll need to replace the enrollmentNumber value with your enrollment number. You can get your number from
the Azure Enterprise Portal. The numberOfMonth parameter is how many months of data you want going back,
from the current dat. Use zero (0) for the current month.
Once you select Done in the Advanced Editor window, the preview refreshes and data from the specified month
range appears in the table. Select Close & Apply and return.
Step 3: Move measures and custom columns to the new report
Next, you'll need to move any custom columns or measures you created into the new details table. Here are the
steps.
1. Open Notepad (or another text editor).
2. Select the measure you want to move, copy the text from the Formula field, and place it in Notepad.
A C I C O N N EC TO R /
C O N T EN T PA C K O B SO L ET E / P RESEN T F O R
C O L UM N N A M E A C I A P I C O L UM N N A M E EA C O L UM N N A M E B A C K WA RD C O M PAT IB IL IT Y
AdditionalInfold Yes
Day Day No
Instance ID Yes
Location Yes
Meter ID Yes
Month Month No
ResourceGroupId Yes
A C I C O N N EC TO R /
C O N T EN T PA C K O B SO L ET E / P RESEN T F O R
C O L UM N N A M E A C I A P I C O L UM N N A M E EA C O L UM N N A M E B A C K WA RD C O M PAT IB IL IT Y
ServiceInfo1Id Yes
ServiceInfo2Id Yes
StoreServiceIdentifierId Yes
TagsId Yes
Year Year No
Next steps
You can connect to many different data sources using Power BI Desktop. For more information, see the following
articles:
Connect to Azure cost management data in Power BI desktop
What is Power BI Desktop?
Data Sources in Power BI Desktop
Shape and Combine Data with Power BI Desktop
Connect to Excel workbooks in Power BI Desktop
Enter data directly into Power BI Desktop
Connect to SAP HANA databases in Power BI
9/9/2020 • 3 minutes to read • Edit Online
With Power BI Desktop, you can now access SAP HANA databases. To use SAP HANA, you must have the SAP HANA
ODBC driver installed on the local client computer for the Power BI Desktop's SAP HANA data connection to work
properly. You can download the SAP HANA Client tools from SAP Development Tools, which contains the necessary
ODBC driver. Or you can get it from the SAP Software Download Center. In the Software portal, search for the SAP
HANA CLIENT for Windows computers. Since the SAP Software Download Center changes its structure frequently,
more specific guidance for navigating that site isn't available.
To connect to a SAP HANA database, select Get Data , choose Database > SAP HANA Database , and then select
Connect :
When you connect to a SAP HANA database, specify the server name. Then from the dropdown and input box,
specify the port.
In this release, SAP HANA in DirectQuery mode is supported in Power BI Desktop and the Power BI service. You can
publish and upload reports that use SAP HANA in DirectQuery mode to the Power BI service. You can also publish
and upload reports to the Power BI Service when not using SAP HANA in DirectQuery mode.
Next steps
For more information about DirectQuery and SAP HANA, see the following resources:
DirectQuery and SAP HANA
Use DirectQuery in Power BI
Power BI data sources
Enable encryption for SAP HANA
Enable encryption for SAP HANA
9/9/2020 • 3 minutes to read • Edit Online
We recommend that you encrypt connections to an SAP HANA server from Power BI Desktop and the Power BI
service. You can enable HANA encryption using both OpenSSL and SAP's proprietary CommonCryptoLib (formerly
known as sapcrypto) library. SAP recommends using CommonCryptoLib, but basic encryption features are
available using either library.
This article provides an overview of enabling encryption using OpenSSL and references some specific areas of the
SAP documentation. We update content and links periodically, but for comprehensive instructions and support,
always refer to the official SAP documentation. If you want to set up encryption using CommonCryptoLib instead
of OpenSSL, see How to Configure TLS/SSL in SAP HANA 2.0 For steps on how to migrate from OpenSSL to
CommonCryptoLib, see SAP Note 2093286 (s-user required).
NOTE
The setup steps for encryption detailed in this article overlap with the setup and configuration steps for SAML SSO. Whether
you choose OpenSSL or CommonCryptoLib as your HANA server's encryption provider, make sure that your choice is
consistent across SAML and encryption configurations.
There are four phases to enabling encryption for SAP HANA using OpenSSL. We cover these phases next. For more
information, see Securing the Communication between SAP HANA Studio and SAP HANA Server through SSL.
Use OpenSSL
Ensure your HANA server is configured to use OpenSSL as its cryptographic provider. Replace the missing path
information below with the server ID (sid) of your HANA server.
openssl req -newkey rsa:2048 -days 365 -sha256 -keyout Server\_Key.pem -out Server\_Req.pem -nodes
This command creates a certificate signing request and private key. Once signed, the certificate is valid for a year
(see the -days parameter). When prompted for the common name (CN), enter the fully qualified domain name
(FQDN) of the computer the HANA server is installed on.
openssl x509 -req -days 365 -in Server\_Req.pem -sha256 -extfile /etc/ssl/openssl.cnf -extensions
usr\_cert -CA CA\_Cert.pem -CAkey CA\_Key.pem -CAcreateserial -out Server\_Cert.pem
If you don't already have a CA you can use, you can create a root CA yourself by following the steps outlined
in Securing the Communication between SAP HANA Studio and SAP HANA Server through SSL.
2. Create the HANA server certificate chain by combining the server certificate, key, and the CA's certificate
(the key.pem name is the convention for SAP HANA):
3. Create a copy of CA_Cert.pem named trust.pem (the trust.pem name is the convention for SAP HANA):
cp CA\_Cert.pem trust.pem
You must first convert trust.pem into a .crt file before you can import the certificate into the Trusted Root
Certification Authorities folder, for example by executing the following OpenSSL command:
Power BI service
2. Verify that you can successfully establish an encrypted connection to the server with the Validate ser ver
cer tificate option enabled, by loading data in Power BI Desktop or refreshing a published report in Power
BI service.
Connect to Analysis Services tabular data in Power BI
Desktop
9/9/2020 • 5 minutes to read • Edit Online
With Power BI Desktop, there are two ways you can connect to and get data from your SQL Server Analysis
Services tabular models: Explore by using a live connection or select items and import them into Power BI Desktop.
Let’s take a closer look.
Explore by using a live connection : When using a live connection, items in your tabular model or perspective,
like tables, columns, and measures appear in your Power BI Desktop Fields pane list. You can use Power BI
Desktop’s advanced visualization and report tools to explore your tabular model in new, highly interactive ways.
When connecting live, no data from the tabular model is imported into Power BI Desktop. Each time you interact
with a visualization, Power BI Desktop queries the tabular model and calculates the results you see. You’re always
looking at the latest data that is available in the tabular model, either from the last processing time, or from
DirectQuery tables available in the tabular model.
Keep in mind that tabular models are highly secure. Items that appear in Power BI Desktop depend on your
permissions for the tabular model you’re connected to.
When you’ve created dynamic reports in Power BI Desktop, you can share them by publishing to your Power BI site.
When you publish a Power BI Desktop file with a live connection to a tabular model to your Power BI site, an on-
premises data gateway must be installed and configured by an administrator. To learn more, see On-premises data
gateway.
Select items and impor t into Power BI Desktop : When you connect with this option, you can select items like
tables, columns, and measures in your tabular model or perspective and load them into a Power BI Desktop model.
Use Power BI Desktop’s Power Query Editor to further shape what you want and its modeling features to further
model the data. Because no live connection between Power BI Desktop and the tabular model is maintained, you
can then explore your Power BI Desktop model offline or publish to your Power BI site.
4. This step in the Navigator window depends on the connection mode you selected:
If you’re connecting live, select a tabular model or perspective.
If you chose to select items and get data, select a tabular model or perspective, and then select a
particular table or column to load. To shape your data before loading, select Edit Queries to open
Power Query Editor. When you’re ready, select Load to import the data into Power BI Desktop.
Troubleshooting
The following list describes all known issues when connecting to SQL Server Analysis Services (SSAS) or Azure
Analysis Services:
Error : Couldn't load model schema : This error usually occurs when the user connecting to Analysis Services
doesn't have access to the database/model.
Use DirectQuery in Power BI Desktop
9/9/2020 • 6 minutes to read • Edit Online
With Power BI Desktop, when you connect to your data source, it's always possible to import a copy of the data
into the Power BI Desktop. For some data sources, an alternative approach is available: connect directly to the
data source using DirectQuery.
Limitations of DirectQuery
There are currently a few limitations to using DirectQuery:
If the Quer y Editor query is overly complex, an error occurs. To remedy the error, either delete the
problematic step in Quer y Editor , or import the data instead of using DirectQuery. For multi-dimensional
sources like SAP Business Warehouse, there's no Quer y Editor .
Time intelligence capabilities are unavailable in DirectQuery. For example, special treatment of date
columns (such as year, quarter, month, or day) isn't supported in DirectQuery mode.
Calculated tables and calculated columns that reference a DirectQuery table from a data source with Single
Sign-on (SSO) authentication are not supported in the Power BI Service.
Limitations are placed on DAX expressions allowed in measures to ensure that queries sent to the
underlying data source have acceptable performance.
There's a one-million-row limit for cloud sources, with on-premises sources limited to a defined payload of
about 4 MB per row (depending on proprietary compression algorithm) or 16MB data size for the entire
visual. Certain limits may be raised when using Premium capacity. The limit doesn't affect aggregations or
calculations used to create the dataset returned using DirectQuery. It only affects the rows returned.
Premium capacities can set maximum row limits, as described in this post.
For example, you can aggregate 10 million rows with your query that runs on the data source. The query
accurately returns the results of that aggregation to Power BI using DirectQuery if the returned Power BI
data is less than 1 million rows. If over 1 million rows are returned from DirectQuery, Power BI returns an
error (unless in Premium capacity, and the row count is under the admin-set limit).
This situation can occur with a simple chart that includes a very high cardinality column, with the
aggregation option set to Don’t Summarize . The visual needs to only have columns with a cardinality
below 1 million, or it must apply the appropriate filters.
Security : By default, all users who consume a published report connect to the back-end data source using
the credentials entered after publication to the Power BI service. This process is the same for data that's
imported: all users see the same data, regardless of any security rules defined in the backend source.
Customers who want per-user security implemented with DirectQuery sources should either use RLS or
configure Kerberos-constrained authentication against the source. Kerberos isn't available for all sources.
Learn more about RLS. Learn more about Kerberos in DirectQuery.
Suppor ted features : Some features in Power BI Desktop are unsupported in DirectQuery mode, or they
have limitations. Also, some capabilities in the Power BI service (such as Quick Insights) aren't available for
datasets using DirectQuery. When determining whether to use DirectQuery, you should consider these
feature limitations.
NOTE
When using DirectQuery with an Azure SQL Database and a private IP address, an on-premises gateway is required.
Next steps
For more information about DirectQuery, check out the following resources:
Using DirectQuery in Power BI
Data sources supported by DirectQuery
DirectQuery and SAP Business Warehouse (BW)
DirectQuery and SAP HANA
What is an on-premises data gateway?
Connect to SAP Business Warehouse by using
DirectQuery in Power BI
9/9/2020 • 9 minutes to read • Edit Online
You can connect to SAP Business Warehouse (BW) data sources directly using DirectQuer y . Given the
OLAP/multidimensional nature of SAP BW, there are many important differences between DirectQuery over SAP
BW versus relational sources like SQL Server. These differences are summarized as follows:
In DirectQuer y over relational sources there are a set of queries (as defined in the Get Data or Quer y
Editor dialog) that logically define the data that is available in the field list. This is not the case when
connecting to an OLAP source such as SAP BW. Instead, when connecting to the SAP server using Get Data ,
just the Infocube or BEx Query is selected. Then all the Key Figures and dimensions of the selected
Infocube/BEx Query will be available in the field list.
Similarly, there is no Quer y Editor when connecting to SAP BW. The data source settings (for example, server
name) can be changed by selecting Edit Queries > Data source settings . The settings for any Parameters
can be changed by selecting Edit Queries > Manage Parameters .
Given the unique nature of OLAP sources, there are additional restrictions (for both modeling and
visualizations) that apply, in addition to the normal restrictions imposed for DirectQuery. These restrictions are
described later in this article.
In addition, it is extremely important to understand that there are many features of SAP BW that are not
supported in Power BI, and that because of the nature of the public interface to SAP BW, there are important
cases where the results seen through Power BI will not match those seen when using an SAP tool. These
limitations are described later in this article. These limitations and behavior differences should be carefully
reviewed, to ensure that the results seen through Power BI, as returned by the SAP public interface, are
interpreted correctly.
NOTE
The ability to use DirectQuery over SAP BW was in preview until the March 2018 update to Power BI Desktop. During the
preview, feedback and suggested improvements prompted a change that impacts reports that were created using that
preview version. Now that General Availability (GA) of DirectQuery over SAP BW has released, you must discard any
existing (preview-based) reports using DirectQuery over SAP BW that were created with the pre-GA version. In reports
created with the pre-GA version of DirectQuery over SAP BW, errors will occur with those pre-GA reports upon invoking
Refresh, as a result of attempting to refresh the metadata with any changes to the underlying SAP BW cube. Please re-
create those reports from a blank report, using the GA version of DirectQuery over SAP BW.
Local calculations Local calculations defined in a BEx Query will change the
numbers as displayed through tools like BEx Analyzer.
However, they are not reflected in the numbers returned
from SAP, through the public MDX interface.
Currency formatting Any currency formatting (for example, $2,300 or 4000 AUD)
is not reflected in Power BI.
Units of measure Units of measure (for example, 230 KG) are not reflected in
Power BI.
Key versus text (short, medium, long) For an SAP BW characteristic like CostCenter, the field list will
show a single column Cost Center. Using that column will
display the default text. By showing hidden fields, it will also
be possible to see the unique name column (that returns the
unique name assigned by SAP BW, and is the basis of
uniqueness).
Multiple hierarchies of a characteristic In SAP , a characteristic can have multiple hierarchies. Then in
tools like BEx Analyzer, when a characteristic is included in a
query, the user can select the hierarchy to use.
Scaling factor/reverse sign In SAP, a key figure can have a scaling factor (for example,
1000) defined as a formatting option, meaning that all
display will be scaled by that factor.
Hierarchies where levels appear/disappear dynamically Initially when connecting to SAP BW, the information on the
levels of a hierarchy will be retrieved, resulting in a set of
fields in the field list. This is cached, and if the set of levels
changes, then the set of fields do not change until Refresh is
invoked.
Default filter A BEx query can include Default Filters, which will be applied
automatically by SAP BEx Analyzer. These are not exposed,
and hence the equivalent usage in Power BI will not apply the
same filters by default.
Hidden Key figures A BEx query can control visibility of Key Figures, and those
that are hidden will not appear in SAP BEx Analyzer. This is
not reflected through the public API, and hence such hidden
key figures will still appear in the field list. However, they can
then be hidden within Power BI.
Time dependent hierarchies When using Power BI, time dependent hierarchies are
evaluated at the current date.
Sort Order The sort order (by Text, or by Key) for a characteristic can be
defined in SAP. This sort order is not reflected in Power BI. For
example, months might appear as “April”, “Aug”, and so on.
End user language setting The locale used to connect to SAP BW is set as part of the
connection details, and does not reflect the locale of the final
report consumer.
Customer Exit Variables Customer Exit variables are not exposed by the public API,
and are therefore not supported by Power BI.
Next steps
For more information about DirectQuery, check out the following resources:
DirectQuery in Power BI
Data Sources supported by DirectQuery
DirectQuery and SAP HANA
Connect to SAP HANA data sources by using
DirectQuery in Power BI
9/9/2020 • 12 minutes to read • Edit Online
You can connect to SAP HANA data sources directly using DirectQuer y . There are two options when
connecting to SAP HANA:
Treat SAP HANA as a multi-dimensional source (default): In this case, the behavior will be similar
to when Power BI connects to other multi-dimensional sources like SAP Business Warehouse, or Analysis
Services. When connecting to SAP HANA using this setting, a single analytic or calculation view is selected
and all the measures, hierarchies and attributes of that view will be available in the field list. As visuals are
created, the aggregate data will always be retrieved from SAP HANA. This is the recommended approach,
and is the default for new DirectQuery reports over SAP HANA.
Treat SAP HANA as a relational source: In this case, Power BI treats SAP HANA as a relational source.
This offers greater flexibility. Care must be taken with this approach to ensure that measures are
aggregated as expected, and to avoid performance issues.
The connection approach is determined by a global tool option, which is set by selecting File > Options and
settings and then Options > DirectQuer y , then selecting the option Treat SAP HANA as a relational
source , as shown in the following image.
The option to treat SAP HANA as a relational source controls the approach used for any new report using
DirectQuery over SAP HANA. It has no effect on any existing SAP HANA connections in the current report, nor on
connections in any other reports that are opened. So if the option is currently unchecked, then upon adding a
new connection to SAP HANA using Get Data , that connection will be made treating SAP HANA as a multi-
dimensional source. However, if a different report is opened that also connects to SAP HANA, then that report
will continue to behave according to the option that was set at the time it was created, which means that any
reports connecting to SAP HANA that were created prior to February 2018 will continue to treat SAP HANA as a
relational source.
The two approaches constitute different behavior, and it's not possible to switch an existing report from one
approach to the other.
Let's look at more detail about each of these two approaches, in turn.
Because of this behavior, we recommend the items selected in Get Data or Quer y Editor be limited to those
items that are needed, while still resulting in a reasonable query for SAP HANA.
Best practices
For both approaches to connecting to SAP HANA, recommendations for using DirectQuery also apply to SAP
HANA, particularly those related to ensuring good performance. These recommendations are described in detail
in the article using DirectQuery in Power BI.
Limitations
The following list describes all SAP HANA features that are not fully supported, or features that behave
differently when using Power BI.
Parent Child Hierarchies - Parent child hierarchies will not be visible in Power BI. This is because Power BI
accesses SAP HANA using the SQL interface, and parent child hierarchies cannot be fully accessed via SQL.
Other hierarchy metadata - The basic structure of hierarchies is displayed in Power BI, however some
hierarchy metadata (such as controlling the behavior of ragged hierarchies) will have no effect. Again, this is
due to the limitations imposed by the SQL interface.
Connection using SSL - You can connect using Import and multi-dimensional with SSL, buy cannot connect
to SAP HANA instances configured to use SSL for the relational connector.
Suppor t for Attribute views - Power BI can connect to Analytic and Calculation views, but cannot connect
directly to Attribute views.
Suppor t for Catalog objects - Power BI cannot connect to Catalog objects.
Change to Variables after publish - You cannot change the values for any SAP HANA variables directly in
the Power BI service, after the report is published.
Known issues
The following list describes all known issues when connecting to SAP HANA (DirectQuery) using Power BI.
SAP HANA issue when quer y for Counters, and other measures - Incorrect data is returned from
SAP HANA if connecting to an Analytical View, and a Counter measure and some other ratio measure, are
included in the same visual. This is covered by SAP Note 2128928 (Unexpected results when query a
Calculated Column and a Counter). The ratio measure will be incorrect in this case.
Multiple Power BI columns from single SAP HANA column - For some calculation views, where a
SAP HANA column is used in more than one hierarchy, SAP HANA exposes this as two separate attributes.
This results in two columns being created in Power BI. Those columns are hidden by default, however, and
all queries involving the hierarchies, or the columns directly, behave correctly.
Next steps
For more information about DirectQuery, check out the following resources:
DirectQuery in Power BI
Data sources supported by DirectQuery
DirectQuery and SAP BW
On-premises data gateway
Apply the Assume Referential Integrity setting in
Power BI Desktop
9/9/2020 • 2 minutes to read • Edit Online
When connecting to a data source using DirectQuer y , you can use the Assume Referential Integrity selection
to enable running more efficient queries against your data source. This feature has a few requirements of the
underlying data, and it is only available when using DirectQuer y .
Setting Assume referential integrity enables queries on the data source to use INNER JOIN statements rather
than OUTER JOIN , which improves query efficiency.
2. In the next image, notice that no referential integrity exists between Orders[DepotID] and
Depots[DepotID] , because the DepotID is Null for some Orders. As such, Assume Referential Integrity
should not be set.
Next steps
Learn more about DirectQuery
Get more information about Relationships in Power BI
Learn more about Relationship View in Power BI Desktop.
Use the SAP Business Warehouse connector in Power
BI Desktop
9/9/2020 • 10 minutes to read • Edit Online
With Power BI Desktop, you can access SAP Business Warehouse (BW) data.
For information about how SAP customers can benefit from connecting Power BI to their existing SAP BW systems,
see the Power BI and SAP BW whitepaper. For details about using DirectQuery with SAP BW, see DirectQuery and
SAP Business Warehouse (BW).
Starting with the June 2018 release of Power BI Desktop and generally available in October 2018, you can use the
SAP BW connector with an implementation that has significant improvements in performance and capabilities.
Microsoft developed SAP BW connector Implementation 2.0. Select either version 1 of the SAP BW Connector, or
the Implementation 2.0 SAP Connector. The following sections describe the installation of each version, in turn. You
can choose one or the other connector when connecting to SAP BW from Power BI Desktop.
We suggest you use the Implementation 2.0 SAP Connector whenever possible.
You can also specify two additional Advanced options : Language code , and a custom MDX statement to run
against the specified server.
If you don't specify an MDX statement, the connection setting displays the list of cubes available in the server. You
can drill down and select items from the available cubes, including dimensions and measures. Power BI exposes
queries and cubes exposed by the Open Analysis Interfaces.
When you select one or more items from the server, the Navigator dialog creates a preview of the output table.
After selecting all necessary objects, you can decide what to do next by selecting one of the following options:
Select Load to load the entire set of rows for the output table into the Power BI Desktop data model. The
Repor t view opens. You can begin visualizing the data or making further modifications using the Data or
Relationships views.
Select Edit to open Quer y Editor . Specify additional data transformation and filtering steps before the entire
set of rows is brought into the Power BI Desktop data model.
In addition to importing data from SAP BW cubes, you can also import data from a wide range of other data
sources in Power BI Desktop, and then you can combine them into a single report. This ability presents all sorts of
interesting scenarios for reporting and analytics on top of SAP BW data.
SapBusinessWarehouseExecutionMode.BasXmlGzip
SapBusinessWarehouseExecutionMode.DataStream
If so, add the Implementation 2.0 option, and remove the ScaleMeasures option, if present, as shown:
If the query doesn't already include an options record, just add it. For the following option:
Just change it to:
Every effort has been made to make Implementation 2.0 of the SAP BW Connector compatible with version 1.
However, there may be some differences because of the different SAP BW MDX execution modes being used. To
resolve any discrepancies, try switching between execution modes.
Troubleshooting
This section provides troubleshooting situations (and solutions) for working with the SAP BW connector.
1. Numeric data from SAP BW returns decimal points instead of commas. For example, 1,000,000 is returned
as 1.000.000.
SAP BW returns decimal data with either a , (comma) or a . (dot) as the decimal separator. To specify
which of those SAP BW should use for the decimal separator, the driver used by Power BI Desktop makes a
call to BAPI_USER_GET_DETAIL . This call returns a structure called DEFAULTS , which has a field called DCPFM
that stores Decimal Format Notation. The field takes one of the following values:
' ' (space) = Decimal point is comma: N.NNN,NN
'X' = Decimal point is period: N,NNN.NN
'Y' = Decimal point is N NNN NNN,NN
Customers who have reported this issue found that the call to BAPI_USER_GET_DETAIL is failing for a
particular user, who is showing the incorrect data, with an error message similar to the following message:
To solve this error, users must ask their SAP admin to grant the SAPBW user being used in Power BI the right
to execute BAPI_USER_GET_DETAIL . It’s also worth verifying that the user has the required DCPFM value, as
described earlier in this troubleshooting solution.
2. Connectivity for SAP BEx queries
You can perform BEx queries in Power BI Desktop by enabling a specific property, as shown in the following
image:
3. The Navigator window doesn't display a data preview and instead provides an object reference not set to
an instance of an object error message.
SAP users need access to specific BAPI function modules to get metadata and retrieve data from SAP BW's
InfoProviders. These modules include:
BAPI_MDPROVIDER_GET_CATALOGS
BAPI_MDPROVIDER_GET_CUBES
BAPI_MDPROVIDER_GET_DIMENSIONS
BAPI_MDPROVIDER_GET_HIERARCHYS
BAPI_MDPROVIDER_GET_LEVELS
BAPI_MDPROVIDER_GET_MEASURES
BAPI_MDPROVIDER_GET_MEMBERS
BAPI_MDPROVIDER_GET_VARIABLES
BAPI_IOBJ_GETDETAIL
To solve this issue, verify that the user has access to the various MDPROVIDER modules and
BAPI_IOBJ_GETDETAIL . To further troubleshoot this or similar issues, you can enable tracing. Select File >
Options and settings > Options . In Options , select Diagnostics , then select Enable tracing . Attempt to
retrieve data from SAP BW while tracing is active, and examine the trace file for more detail.
Many people have Excel workbooks stored in OneDrive for Business that would be great for use with Power BI
Desktop. With Power BI Desktop, you can use online links for Excel files stored in OneDrive for Business to create
reports and visuals. You can use a OneDrive for Business group account or your individual OneDrive for Business
account.
Getting an online link from OneDrive for Business requires a few specific steps. The following sections explain
those steps, which let you share the file link among groups, across different machines, and with your coworkers.
NOTE
Your browser interface might not look exactly like the following image. There are many ways to select Open in Excel
for files in your OneDrive for Business browser interface. You can use any option that allows you to open the file in
Excel.
2. In Excel, select File > Info , and then select the Copy path button, as shown in the following image.
Use the link in Power BI Desktop
In Power BI Desktop, you can use the link you just copied to the clipboard. Take the following steps:
1. In Power BI Desktop, select Get Data > Web .
2. With the Basic option selected, paste the link into the From Web dialog box.
3. Remove the ?web=1 string at the end of the link so that Power BI Desktop can properly navigate to your file,
and then select OK .
4. If Power BI Desktop prompts you for credentials, choose either Windows (for on-premises SharePoint sites)
or Organizational Account (for Microsoft 365 or OneDrive for Business sites).
A Navigator dialog box appears, allowing you to select from the list of tables, sheets, and ranges found in
the Excel workbook. From there, you can use the OneDrive for Business file just like any other Excel file. You
can create reports and use it in datasets like you would with any other data source.
NOTE
To use a OneDrive for Business file as a data source in the Power BI service, with Ser vice Refresh enabled for that file, make
sure you select OAuth2 as the Authentication method when configuring your refresh settings. Otherwise, you may
encounter an error (such as, Failed to update data source credentials) when you attempt to connect or to refresh. Selecting
OAuth2 as the authentication method remedies that credentials error.
Use the Facebook connector for Power BI Desktop
9/9/2020 • 2 minutes to read • Edit Online
The Facebook connector in Power BI Desktop relies on the Facebook Graph API. As such, features and availability
may vary over time.
You can see a tutorial about the Facebook Connector for Power BI Desktop.
IMPORTANT
Deprecation of Facebook data connector notice: Import and refresh data from Facebook in Excel will no longer work
properly beginning in April, 2020. You can use the Facebook Get & Transform (Power Query) connector until then. After that
date, you will not be able to connect to Facebook, and will receive an error message. We recommend revising or removing
any existing Get & Transform (Power Query) queries that use the Facebook connector as soon as possible to avoid
unexpected results.
Facebook expired v1.0 of its Graph API on April 30 2015. Power BI uses the Graph API behind the scenes for the
Facebook connector, allowing you to connect to your data and analyze it.
Queries that were built before April 30 2015 may no longer work or return less data. Subsequent to April 30 2015,
Power BI leverages v2.8 in all calls to the Facebook API. If your query was built prior to April 30, 2015 and you have
not used it since, you’ll likely need to authenticate again, to approve the new set of permissions that we’ll ask for.
Although we attempt to release updates in accordance with any changes, the API may change in a way that affects
the results of the queries we generate. In some cases, certain queries may no longer be supported. Due to this
dependency, we cannot guarantee the results of your queries when using this connector.
More details on the change in the Facebook API are available here.
Use the Google Analytics connector for Power BI
Desktop
9/9/2020 • 2 minutes to read • Edit Online
NOTE
The Google Analytics content pack and the connector in Power BI Desktop rely on the Google Analytics Core Reporting API.
As such, features and availability may vary over time.
You can connect to Google Analytics data using the Google Analytics connector. To connect, follow these steps:
1. In Power BI Desktop , select Get Data from the Home ribbon tab.
2. In the Get Data window, select Online Ser vices from the categories in the left pane.
3. Select Google Analytics from the selections in the right pane.
4. At the bottom of the window, select Connect .
You're prompted with a dialog that explains that the connector is a Third-Party Service, and warns about how
features and availability may change over time, and other clarifications.
Select Connect , and your Google Analytics data is connected to Power BI Desktop , and loads the data.
5. Power BI Desktop will prompt you to authenticate with your work or school account. Select Organizational
account and then enter your credentials.
The account you use to connect to the OData feed must have at least Portfolio Viewer access to the Project Web
App site.
From here, you can choose which tables you would like to connect to and build a query. Want an idea of how to get
started? The following blog post shows how to build a burn down chart from your Project Online data. The blog
post refers to using Power Query to connect to Project Online, but this applies to Power BI Desktop as well.
Creating burn down charts for Project using Power Pivot and Power Query
Get data from files for Power BI
9/9/2020 • 3 minutes to read • Edit Online
In Power BI, you can connect to or import data and reports from three types of files.
Microsoft Excel (.xlsx or .xlsm)
Power BI Desktop (.pbix)
Comma Separated Value (.csv)
NOTE
Data in Excel workbooks must be in a table, or in the data model, to be imported by Power BI.
Microsoft Excel is one of the most widely used business applications around. It’s also one of the most common
ways to get your data into Power BI.
NOTE
Workbooks with data models cannot be shared across Power BI tenants. For example, a user who logs in to Power BI using a
contoso.com account cannot share an Excel workbook with a user who logs in using a Power BI login account from
woodgrovebank.com.
Data types
Power BI supports the following data types: Whole Number, Decimal Number, Currency, Date, True/False, Text.
Marking data as specific data types in Excel will improve the Power BI experience.
4. If your workbook file is on OneDrive or SharePoint - Team Sites, choose Impor t or Connect .
Once the workbook is ready, you can find it in the Repor ts section of Power BI.
Publish from Excel 2016 to your Power BI site
Using the Publish to Power BI feature in Excel 2016 is effectively the same as using Get Data in Power BI to
import or connect to your file. We won't go into the details here, but you can see Publish to Power BI from Excel
2016 to learn more.
Troubleshooting
Workbook file too big? Check out Reduce the size of an Excel workbook to view it in Power BI.
Currently, when you choose Import, Power BI only imports data that is part of a named table or a data model. As a
result, if the workbook contains no named tables, Power View sheets, or Excel data models, you might see this
error: "We couldn't find any data in your Excel workbook" . This article explains how to fix your workbook
and re-import it.
Next steps
Explore your data - Once you get data and reports from your file into Power BI, it's time to explore. Just right-
click the new dataset and then click Explore. If you chose to connect to a workbook file on OneDrive in step 4, your
workbook will appear in Reports. When you click on it, it will open in Power BI, just as it would if it were in Excel
Online.
Schedule refresh - If your Excel workbook file connects to external data sources, or you imported from a local
drive, you can setup scheduled refresh to make sure your dataset or report is always up-to-date. In most cases,
setting up scheduled refresh is quite easy to do, but going into the details is outside the scope of this article. See
Data refresh in Power BI to learn more.
Publish to Power BI from Excel 2016
Data refresh in Power BI
Get data from Power BI Desktop files
9/9/2020 • 3 minutes to read • Edit Online
Power BI Desktop makes business intelligence and reporting easy. Whether you're connecting to a many
different data sources, querying and transforming data, modeling your data, and creating powerful and dynamic
reports, Power BI Desktop makes business intelligence tasks intuitive and fast. If you're not familiar with Power
BI Desktop , check out Getting started with Power BI Desktop.
Once you bring data into Power BI Desktop and create a few reports, it’s time to get your saved file into the
Power BI ser vice .
2. Sign in to Power BI. You'll only need to do this the first time.
When complete, you'll get a link to open your report in your Power BI site.
Next steps
Explore your data - Once you get data and reports from your file into Power BI, it's time to explore. If your file
already has reports in it, they'll appear in the navigator pane in Repor ts . If your file just had data, you can create
new reports; just right-click the new dataset and then click Explore .
Refresh external data sources - If your Power BI Desktop file connects to external data sources, you can setup
scheduled refresh to make sure your dataset is always up-to-date. In most cases, setting up scheduled refresh is
quite easy to do, but going into the details is outside the scope of this article. See Data refresh in Power BI to learn
more.
Edit parameter settings in the Power BI service
9/9/2020 • 2 minutes to read • Edit Online
Report creators add query parameters to reports in Power BI Desktop. Parameters allow them to make parts of
reports depend on one or more parameter values. For example, a report creator may create a parameter that
restricts the data to a single country/region, or a parameter that defines acceptable formats for fields like dates,
time, and text.
3. Expand Parameters . If the selected dataset has no parameters, you see a message with a link to Learn more
about query parameters. If the dataset does have parameters, expand the Parameters heading to reveal
those parameters.
Review the parameter settings and make changes if needed. Grayed-out fields aren't editable.
Next steps
An ad-hoc way to add simple parameters is by modifying the URL.
Get data from Comma Separated Value (.CSV) files
9/9/2020 • 2 minutes to read • Edit Online
Comma separated value files, often known as a .CSV, are simple text files with rows of data where each value is
separated by a comma. These types of files can contain very large amounts of data within a relatively small file size,
making them an ideal data source for Power BI. You can download a sample .CSV file here.
If you have a .CSV, it’s time to get it into your Power BI site as a dataset where you can begin exploring your data,
create some dashboards, and share your insights with others.
TIP
Many organizations output a .CSV with updated data each day. To make sure your dataset in Power BI stays in-sync with
your updated file, be sure the file is saved to OneDrive with the same name.
Next steps
Explore your data - Once you get data from your file into Power BI, it's time to explore. Just right-click the new
dataset and then click Explore .
Schedule refresh - If your file is saved to a local drive, you can setup scheduled refresh so your dataset and
reports in Power BI stay up-to-date. To learn more, see Data refresh in Power BI. If your file is saved to OneDrive,
Power BI will automatically synchronize with it about every hour.
Real-time streaming in Power BI
9/9/2020 • 14 minutes to read • Edit Online
Power BI with real-time streaming lets you stream data and update dashboards in real time. Any visual or
dashboard created in Power BI can display and update real-time data and visuals. The devices and sources of
streaming data can be factory sensors, social media sources, service usage metrics, or many other time-sensitive
data collectors or transmitters.
This article shows you how to set up real-time streaming dataset in Power BI. First, it's important to understand the
types of real-time datasets that are designed to display in tiles (and dashboards), and how those datasets differ.
NOTE
When using datasets with the defaultMode flag set to pushStreaming, if a request exceeds the 15Kb size restriction for a
streaming dataset, but is less than the 16MB size restriction of a push dataset, the request will succeed and the data will be
updated in the push dataset. However, any streaming tiles will temporarily fail.
Once a dataset is created, use the REST APIs to push data using the PostRows API.
All requests to REST APIs are secured using Azure AD OAuth .
Using the Streaming Dataset UI to push data
In the Power BI service, you can create a dataset by selecting the API approach as shown in the following image.
When creating the new streaming dataset, you can select to enable Historic data analysis as shown below, which
has a significant impact.
When Historic data analysis is disabled, and it is by default, you create a streaming dataset as described
earlier in this article. When Historic data analysis is enabled, the dataset created becomes both a streaming
dataset and a push dataset . This is equivalent to using the Power BI REST APIs to create a dataset with its
defaultMode set to pushStreaming, as described earlier in this article.
NOTE
For streaming datasets created using the Power BI service UI, as described in the previous paragraph, Azure AD
authentication is not required. In such datasets, the dataset owner receives a URL with a rowkey, which authorizes the
requestor to push data into the dataset with out using an Azure AD OAuth bearer token. Take now, however, that the Azure
AD (AAD) approach still works to push data into the dataset.
If your Azure Stream Analytics query results in very rapid output to Power BI (for example, once or twice per
second), Azure Stream Analytics will begin batching those outputs into a single request. This may cause the request
size to exceed the streaming tile limit. In that case, as mentioned in previous sections, streaming tiles will fail to
render. In such cases, the best practice is to slow the rate of data output to Power BI; for example, instead of a
maximum value every second, set it to a maximum over 10 seconds.
If you don't have streaming data set up yet, don't worry - you can select manage data to get started.
On this page, you can input the endpoint of your streaming dataset if you already have one created (into the text
box). If you don't have a streaming dataset yet, select the plus icon ( + ) in the upper right corner to see the
available options to create a streaming dataset.
Create your streaming dataset with the option you like best
There are two ways to create a real-time streaming data feed that can be consumed and visualized by Power BI:
Power BI REST API using a real-time streaming endpoint
PubNub
The next sections look at each option in turn.
Using the POWER BI REST API
Power BI REST API - Recent improvements to the Power BI REST API are designed to make real-time streaming
easier for developers. When you select API from the New streaming dataset window, you're presented with
entries to provide that enable Power BI to connect to and use your endpoint:
If you want Power BI to store the data that's sent through this data stream, enable Historic data analysis and you'll
be able to do reporting and analysis on the collected data stream. You can also learn more about the API.
Once you successfully create your data stream, you're provided with a REST API URL endpoint, which your
application can call using POST requests to push your data to Power BI streaming data dataset you created.
When making POST requests, you should ensure the request body matches the sample JSON provided by the
Power BI user interface. For example, wrap your JSON objects in an array.
Using PubNub
With the integration of PubNub streaming with Power BI, you can use your low-latency PubNub data streams (or
create new ones) and use them in Power BI. When you select PubNub and then select Next , you see the following
window:
WARNING
PubNub channels can be secured by using a PubNub Access Manager (PAM) authentication key. This key will be shared with
all users who have access to the dashboard. You can learn more about PubNub access control.
PubNub data streams are often high volume, and are not always suitable in their original form for storage and
historical analysis. To use Power BI for historical analysis of PubNub data, you'll have to aggregate the raw PubNub
stream and send it to Power BI. One way to do that is with Azure Stream Analytics.
sub-c-5f1b7c8e-fbee-11e3-aa40-02ee2ddab7fe
Channel:
pubnub-sensor-network
4. In the following window, just select the defaults (which are automatically populated), then select Create .
5. Back in your Power BI workspace, create a new dashboard and then add a tile (see above for steps, if you
need them). This time when you create a tile and select Custom Streaming Data , you have a streaming
data set to work with. Go ahead and play around with it. Adding the number fields to line charts, and then
adding other tiles, you can get a real time dashboard that looks like the following:
Give it a try, and play around with the sample dataset. Then go create your own datasets, and stream live data to
Power BI.
Next steps
Here are a few links you might find useful when working with real-time streaming in Power BI:
Overview of the Power BI REST API with real-time data
Azure Stream Analytics
Publish to Power BI from Microsoft Excel
9/9/2020 • 4 minutes to read • Edit Online
With Microsoft Excel 2016 and later, you can publish your Excel workbooks directly to your Power BI workspace,
where you can create highly interactive reports and dashboards based on your workbook’s data. You can then
share your insights with others in your organization.
When publishing a workbook to Power BI, there are few things to consider:
The account you use to sign in to Office, OneDrive for Business (if using workbooks saved there), and Power BI
must be the same account.
You cannot publish an empty workbook, or a workbook that doesn’t have any Power BI supported content.
You cannot publish encrypted or password protected workbooks, or workbooks with Information Protection
Management.
Publishing to Power BI requires modern authentication be enabled (default). If disabled, the Publish option is
not available from the File menu.
IMPORTANT
You can only publish local files if you're using Excel 2016 (or later) with a Microsoft 365 subscription. Excel 2016 standalone
installations can Publish to Power BI, but only when the workbook is saved to OneDrive for Business or SharePoint Online.
When you select Publish , you can select the workspace to which you want to publish. If your Excel file resides on
OneDrive for Business, you can only publish to your My Workspace. If your Excel file resides on a local drive, you
can publish to My Workspace or a shared workspace to which you have access.
Once published, the workbook content you publish is imported into Power BI, separate from the local file. If you
want to update the file in Power BI, you must publish the updated version again, or you can refresh the data by
configuring a scheduled refresh, on the workbook, or on the dataset in Power BI.
Publishing from a standalone Excel installation
When publishing from a standalone Excel installation, the workbook must be saved to OneDrive for Business.
Select Save to Cloud and choose a location in OneDrive for Business.
Once your workbook is saved to OneDrive for Business, when you select Publish , you have two options to get
your workbook into Power BI, Upload or Expor t :
Publishing
When you choose either option, Excel signs in to Power BI with your current account, then publishes your
workbook to your Power BI workspace. You can monitor the status bar in Excel to see how the publish process is
progressing.
Next steps
Excel data in Power BI
More questions? Try the Power BI Community
Reduce the size of an Excel workbook to view it in
Power BI
9/9/2020 • 2 minutes to read • Edit Online
You can upload any Excel workbook smaller than 1 GB to Power BI. An Excel workbook can have two parts: a Data
Model, and the rest of the report—the core worksheet contents. If the report meets the following size limits, you
can save it to OneDrive for Business , connect to it from Power BI, and view it in Excel Online:
The workbook as a whole can be up to 1 GB.
The core worksheet contents can be up to 30 MB.
Related info
Create a memory-efficient Data Model
Use OneDrive for Business links in Power BI Desktop
Intro to datasets across workspaces
9/9/2020 • 4 minutes to read • Edit Online
Business intelligence is a collaborative activity. It's important to establish standardized datasets that can be the
'one source of truth.' Then discovering and reusing those standardized datasets is key. When expert data modelers
in your organization create and share optimized datasets, report creators can start with those datasets to build
accurate reports. Then your organization has consistent data for making decisions, and a healthy data culture.
In Power BI, dataset creators can control who has access to their data by using the Build permission. Dataset
creators can also certify or promote datasets so others can discover them. That way, report authors know which
datasets are high quality and official, and they can use those datasets wherever they author in Power BI. Tenant
administrators have a new tenant setting to govern the use of datasets across workspaces.
Discover datasets
When building a report on top of an existing dataset, the first step is to connect to the dataset, either in the Power
BI service or Power BI Desktop. Read about discovering datasets from different workspaces
Copy a report
When you find a report you like, in a workspace or an app, you can make a copy of it, and then modify it to fit your
needs. You don't have to worry about creating the data model. That's already created for you. And it's much easier
to modify an existing report than it is to start from scratch. Read more about copying reports.
Licensing
The specific features and experiences built on shared dataset capabilities are licensed according to their existing
scenarios. For example:
In general, discovering and connecting to shared datasets is available to anyone – it is not a feature restricted to
Premium.
Users without a Pro license can only use datasets across workspaces for report authoring if those datasets
reside in the users' personal My Workspace or in a Premium-backed workspace. The same licensing restriction
applies whether they author reports in Power BI Desktop or in the Power BI service.
Copying reports between workspaces requires a Pro license.
Copying reports from an app requires a Pro license, as was required for organizational content packs.
Promoting and certifying datasets requires a Pro license.
Next steps
Promote datasets
Certify datasets
Govern the use of datasets across workspaces
Questions? Try asking the Power BI Community
Share a dataset
9/9/2020 • 2 minutes to read • Edit Online
As a creator of data models in Power BI Desktop, you're creating datasets that you can distribute in the Power BI
service. Then other report creators can use your datasets as a basis for their own reports. In this article, you learn
how to share your datasets. To learn how to give and remove access to your shared datasets, read about the Build
permission.
NOTE
If you select Entire organization , then no one in the organization will have Build permission. This issue is already
known. Instead, specify email addresses in Specific individuals or groups . If you want your entire organization to
have Build permission, specify an email alias for the entire organization.
2. The Related content dialog box shows all related items. In this list, you see the related items in this
workspace and in Other workspaces .
Next steps
Use datasets across workspaces
Questions? Try asking the Power BI Community
Build permission for shared datasets
9/9/2020 • 3 minutes to read • Edit Online
When you create a report in Power BI Desktop, the data in that report is stored in a data model. When you publish
your reports to the Power BI service, you're also publishing the data as a dataset. You can give others Build
permission for that report, so they can discover and reuse the dataset you've shared. This article explains how you
control access to the data by using the Build permission.
Build permission applies to datasets. When you give users Build permission, they can build new content on your
dataset, such as reports, dashboards, pinned tiles from Q&A, and Insights Discovery.
Users also need Build permissions to work with the data outside Power BI:
To export the underlying data.
To build new content on the dataset such as with Analyze in Excel.
To access the data via the XMLA endpoint.
That opens the Permission center for that dataset, where you can set and change permissions.
An admin or member of the workspace where the dataset resides can decide during app publishing that
users with permission for the app also get Build permission for the underlying datasets. See Share a
dataset for details.
Say you have Reshare and Build permission on a dataset. When you share a report or dashboard built on
that dataset, you can specify that the recipients also get Build permission for the underlying dataset.
You can remove a person's Build permission for a dataset. If you do, they can still see the report built on the
shared dataset, but they can no longer edit it. See the next section for details.
They can still see the report built on the shared dataset, but they can no longer edit it.
Remove Build permission for a dataset in an app
Say you've distributed an app from a workspace to a group of people. Later, you decide to remove access to the
app for some people. Removing their access to the app doesn't automatically remove their build and reshare
permissions. That's an extra step.
1. In a workspace list page, select Update app .
2. On the Permissions tab, select the X to delete the person or group.
7. Select More options (...) next to their name > Remove build .
They can still see the report built on the shared dataset, but they can no longer edit it.
Next steps
Use datasets across workspaces
Questions? Try asking the Power BI Community
Create reports based on datasets from different
workspaces
9/9/2020 • 2 minutes to read • Edit Online
Learn how you can create reports in your own workspaces based on datasets in other workspaces. To build a
report on top of an existing dataset, you can start from Power BI Desktop or from the Power BI service, in your My
Workspace or in a new workspace experience.
In the Power BI service: Get data > Published datasets .
In Power BI Desktop: Get data > Power BI datasets .
In both cases, the dataset discovery experience starts in this dialog box, Select a dataset to create a repor t . You
see all the datasets you have access to, regardless of where they are:
You notice the first one is labeled Promoted . We'll get to that in Find an endorsed dataset, later in this article.
The datasets you see in this list meet at least one of the following conditions:
The dataset is in one of the new workspace experience workspaces, and you're a member of that workspace. See
Considerations and limitations.
You have Build permission for the dataset, which is in a new workspace experience workspace.
The dataset is in your My Workspace.
NOTE
If you're a free user, you only see datasets in your My Workspace, or datasets for which you have Build permission that are in
Premium-capacity workspaces.
When you click Create , you create a live connection to the dataset, and the report creation experience opens with
the full dataset available. You haven't made a copy of the dataset. The dataset still resides in its original location. You
can use all tables and measures in the dataset to build your own reports. Row-level security (RLS) restrictions on
the dataset are in effect, so you only see data you have permissions to see based on your RLS role.
You can save the report to the current workspace in the Power BI service, or publish the report to a workspace from
Power BI Desktop. Power BI automatically creates an entry in the list of datasets if the report is based on a dataset
outside of the workspace. The icon for this dataset is different from the icon for datasets in the workspace:
That way, members of the workspace can tell which reports and dashboards use datasets that are outside the
workspace. The entry shows information about the dataset, and a few select actions.
Next steps
Use datasets across workspaces
Questions? Try asking the Power BI Community
Copy reports from other workspaces
9/9/2020 • 3 minutes to read • Edit Online
When you find a report you like in a workspace or an app, you can make a copy of it and save it to a different
workspace. Then you can modify your copy of the report, adding or deleting visuals and other elements. You don't
have to worry about creating the data model. It's already created for you. And it's much easier to modify an existing
report than it is to start from scratch. However, when you make an app from your workspace, sometimes you can't
publish your copy of the report in the app. See Considerations and limitations in the article "Use datasets across
workspaces" for details.
NOTE
To make a copy, you need a Pro license, even if the original report is in a workspace in a Premium capacity.
You only see the Save a copy icon if the report is in a new experience workspace, and you have Build
permission. Even if you have access to the workspace, you have to have Build permission for the dataset.
3. In Save a copy of this repor t , give the report a name and select the destination workspace.
You can save the report to the current workspace or a different one in the Power BI service. You only see
workspaces that are new experience workspaces, in which you're a member.
4. Select Save .
Power BI automatically creates a copy of the report, and an entry in the list of datasets if the report is based
on a dataset outside of the workspace. The icon for this dataset is different from the icon for datasets in the
workspace:
That way, members of the workspace can tell which reports and dashboards use datasets that are outside
the workspace. The entry shows information about the dataset, and a few select actions.
See Your copy of the report in this article for more about the report and related dataset.
2. The Related content dialog box shows all related items. In this list, the dataset looks like any other. You
can't tell it resides in a different workspace. This issue is known.
2. In the list of datasets, you see the shared datasets don't have Delete icons. Refresh the page, or go to a
different page and return. The dataset will be gone. If not, check View related . It may be related to another
table in your workspace.
NOTE
Deleting the shared dataset in this workspace doesn't delete the dataset. It just deletes the reference to it.
Next steps
Use datasets across workspaces
Questions? Try asking the Power BI Community
Control the use of datasets across workspaces
9/9/2020 • 2 minutes to read • Edit Online
Using datasets across workspaces is a powerful way to drive data culture and data democratization within an
organization. Still, if you're a Power BI admin, sometimes you want to restrict the flow of information within your
Power BI tenant. With the tenant setting Use datasets across workspaces , you can restrict dataset reuse either
completely or partially per security groups.
If you turn off this setting, here are the effects on report creators:
The button to copy reports across workspaces isn't available.
In a report based on a shared dataset, the Edit repor t button isn't available.
In the Power BI service, the discovery experience only shows datasets in the current workspace.
In Power BI Desktop, the discovery experience only shows datasets from workspaces where you're a member.
In Power BI Desktop, if users open a .pbix file with a live connection to a dataset outside any workspaces they
are a member of, they see an error message asking them to connect to a different dataset.
Your Power BI report creators may now have access to many different datasets, so enterprises need to guide them
to the reliable, high-quality datasets. Power BI provides two ways to endorse datasets:
Promotion : As a dataset owner, you can promote your own datasets when they're ready for wide-spread
usage. Any workspace member with Write permissions can promote a dataset. There are no restrictions on who
can promote a dataset. Promotion supports the collaborative spread of datasets within organizations. This
article is about promoting your dataset.
Cer tification : You can request certification for a promoted dataset. A select group of users defined in the
Dataset Cer tification tenant admin setting decides which datasets to certify. See Certify datasets for details.
Promote a dataset
Your dataset needs to be in a new workspace experience workspace in the Power BI service when you're ready to
promote it.
1. Go to the list of datasets in the workspace.
2. Select More options (...), then select Settings .
Next steps
Read about Using datasets across workspaces
Questions? Try asking the Power BI Community
Certify datasets - Power BI
9/9/2020 • 2 minutes to read • Edit Online
Your organization can certify datasets that are the authoritative source for critical information. These datasets are
featured prominently when report designers start creating a report and looking for reliable data. Certification can
be a highly selective process, with only the most valuable datasets getting certified. Power BI tenant admins have a
new setting, so they can tightly control who can certify datasets. Thus, admins can ensure that dataset certification
results in truly reliable and authoritative datasets designed for use across the organization.
Power BI users may now have access to many different datasets, so enterprises need to guide them to the reliable,
high-quality datasets. Power BI provides two ways to endorse datasets:
Promotion : Dataset owners and others in a workspace can promote their datasets when they're ready for
wide-spread usage. See Promote your dataset for details.
Cer tification : Dataset owners can request certification of a promoted dataset. A select group of users defined
in the Dataset Cer tification tenant admin setting decides which datasets to certify. The name of the person
who certified a dataset is displayed in a tooltip during the dataset discovery experience; hover over the
Cer tified label and you see it.
Certify a dataset
Your tenant admin can provide a URL for the Learn more link on the Endorsement setting page. They can link
to documentation about your certification process. If they don't provide a destination for the Learn more link, by
default it points to this article.
Being named someone who can certify datasets is clearly a big responsibility. When a dataset creator contacts you
about certifying a dataset, that's the beginning of your vetting process. When you're satisfied that a dataset merits
certification, here are your last steps.
1. The dataset owner needs to give you member permissions for the workspace where the dataset resides.
2. If your tenant admin has named you as someone who can certify datasets, the Cer tified option in the
Endorsement section of Settings for the dataset is available. Select Cer tified .
3. Select Apply .
Read more about how tenant admins control the use of datasets across workspaces.
Next steps
Read about Using datasets across workspaces
Questions? Try asking the Power BI Community
Azure and Power BI
9/9/2020 • 3 minutes to read • Edit Online
With Azure services and Power BI , you can turn your data processing efforts into analytics and reports that
provide real-time insights into your business. Whether your data processing is cloud-based or on-premises,
straightforward, or complex, single-sourced or massively scaled, warehoused, or real-time, Azure and Power BI
have the built-in connectivity and integration to bring your business intelligence efforts to life.
Power BI has a multitude of Azure connections available, and the business intelligence solutions you can create
with those services are as unique as your business. You can connect as few as one Azure data source, or a handful,
then shape and refine your data to build customized reports.
There's plenty more information for you to learn about Azure SQL Database.
When using Power BI with Azure data sources, you can avoid Azure egress charges by making sure your Power BI
tenant is in the same region as your Azure data sources.
When your Power BI tenant is deployed in the same Azure region as you deploy your data sources, you do not incur
egress charges for scheduled refresh and DirectQuery interactions.
Next steps
For more information about Power BI Premium or Multi-Geo, take a look at the following resources:
What is Microsoft Power BI Premium?
How to purchase Power BI Premium
Multi-Geo support for Power BI Premium (Preview)
Where is my Power BI tenant located?
Power BI Premium FAQ
Azure SQL Data Warehouse with DirectQuery
9/9/2020 • 3 minutes to read • Edit Online
Azure SQL Data Warehouse with DirectQuery allows you to create dynamic reports based on data and metrics you
already have in Azure SQL Data Warehouse. With DirectQuery, queries are sent back to your Azure SQL Data
Warehouse in real time as you explore the data. Real-time queries, combined with the scale of SQL Data Warehouse
enables users to create dynamic reports in minutes against terabytes of data. In addition, the Build dashboards +
repor ts link allows users to create Power BI reports using their SQL Data Warehouse.
When using the SQL Data Warehouse connector:
Specify the fully qualified server name when connecting (see below for details)
Ensure firewall rules for the server are configured to "Allow access to Azure services"
Every action such as selecting a column or adding a filter will directly query the data warehouse
Tiles are set to refresh approximately every 15 minutes and refresh does not need to be scheduled. Refresh can
be adjusted in the Advanced settings when you connect.
Q&A isn't available for DirectQuery datasets
Schema changes aren't picked up automatically
These restrictions and notes may change as we continue to improve the experience. The steps to connect are
detailed below.
The easiest way to move between your SQL Data Warehouse and Power BI is to create reports in Power BI Desktop.
You can use the Build dashboards + repor ts button within the Azure portal.
1. To get started, download and install Power BI Desktop. See the get Power BI Desktop article for information
about downloading and installing, or go directly to the next step.
2. You can also click the Build dashboards + repor ts link to download Power BI Desktop.
Connecting through Power BI Desktop
You can connect to a SQL Data Warehouse using the Get Data button in Power BI Desktop.
1. Select the Get Data button from the Home menu.
2. Select More... to see all available data sources. From the window that appears, select Azure from the left
pane, then select Azure SQL Data Warehouse from the list of available connectors in the right pane.
3. In the window that appears, input your Server and optionally state the Database to which you want to
connect. You can also select your data connectivity mode: Import or DirectQuery. For real-time access to
information in your Azure SQL Data Warehouse, use DirectQuery.
4. For advanced options for the Azure SQL Data Warehouse connection, select the down arrow beside
Advanced options to display additional options for your connection.
The next section describes how to find parameter values for your connection.
NOTE
If your Power BI tenant is in the same region as the Azure SQL Data Warehouse there will be no egress charges. You can find
where your Power BI tenant is located using these instructions.
Single sign-on
After you publish an Azure SQL DirectQuery dataset to the service, you can enable single sign-on (SSO) using
Azure Active Directory (Azure AD) OAuth2 for your end users.
To enable SSO, go to settings for the dataset, open the Data Sources tab, and check the SSO box.
When the SSO option is enabled and your users access reports built atop the data source, Power BI sends their
authenticated Azure AD credentials in the queries to the Azure SQL database or data warehouse. This option
enables Power BI to respect the security settings that are configured at the data source level.
The SSO option takes affect across all datasets that use this data source. It does not affect the authentication
method used for import scenarios.
Next steps
About using DirectQuery in Power BI
What is Power BI?
Get Data for Power BI
Azure SQL Data Warehouse
More questions? Try the Power BI Community
Azure SQL Database with DirectQuery
9/9/2020 • 2 minutes to read • Edit Online
Learn how you can connect directly to Azure SQL Database and create reports that use live data. You can keep your
data at the source and not in Power BI.
With DirectQuery, queries are sent back to your Azure SQL Database as you explore the data in the report view.
This experience is suggested for users who are familiar with the databases and entities they connect to.
IMPORTANT
This description assumes that Azure SQL database is not behind a VNET or has private link endpoint enabled.
Notes:
Specify the fully qualified server name when connecting (see below for more details).
Ensure firewall rules for the database are configured to "Allow access to Azure services."
Every action such as selecting a column or adding a filter will send a query back to the database.
Tiles are refreshed every hour (refresh does not need to be scheduled). You can adjust how often to refresh in
the Advanced settings when you connect.
Q&A is not available for DirectQuery datasets.
Schema changes are not picked up automatically.
These restrictions and notes may change as we continue to improve the experiences. The steps to connect are
detailed below.
IMPORTANT
We have been improving our connectivity to Azure SQL Database. For the best experience to connect to your Azure SQL
Database data source, use Power BI Desktop. Once you've built your model and report, you can publish it to the Power BI
service. The direct connector for Azure SQL Database in the Power BI service is now deprecated.
When the SSO option is enabled and your users access reports built atop the data source, Power BI sends their
authenticated Azure AD credentials in the queries to the Azure SQL database or data warehouse. This option
enables Power BI to respect the security settings that are configured at the data source level.
The SSO option takes affect across all datasets that use this data source. It does not affect the authentication
method used for import scenarios.
Next steps
Use DirectQuery in Power BI Desktop
What is Power BI?
Get data for Power BI
More questions? Try the Power BI community
SQL Server Analysis Services live data in Power BI
9/9/2020 • 2 minutes to read • Edit Online
In Power BI, there are two ways you can connect to a live SQL Server Analysis Services server. In Get data , you can
connect to a SQL Server Analysis Services server, or you can connect to a Power BI Desktop file, or Excel workbook,
that already connects to an Analysis Services server. As a best practice, Microsoft strongly recommends using
Power BI Desktop because of the richness of the toolset and the ability to maintain a backup copy of the Power BI
Desktop file locally.
IMPORTANT
In order to connect to a live Analysis Services server, an On-premises data gateway must be installed and configured by
an administrator. For more information, see On-premises data gateway.
When you use the gateway, your data remains on-premises. The reports you create based on that data are saved in the
Power BI service.
Q&A natural language querying is in preview for Analysis Services live connections.
Dashboard tiles
If you pin visuals from a report to the dashboard, the pinned tiles are automatically refreshed every 10 minutes. If
the data in your on-premises Analysis Services server is updated, the tiles will get auto-updated after 10 minutes.
Common Issues
Cannot load the model schema error - This error occurs when the user connecting to SSAS does not have
access to the SSAS database, cube and model.
Next steps
On-premises data gateway
Manage Analysis Services data sources
Troubleshooting the On-premises data gateway
More questions? Try the Power BI Community
Data refresh in Power BI
9/9/2020 • 26 minutes to read • Edit Online
Power BI enables you to go from data to insight to action quickly, yet you must make sure the data in your
Power BI reports and dashboards is recent. Knowing how to refresh the data is often critical in delivering
accurate results.
This article describes the data refresh features of Power BI and their dependencies at a conceptual level. It also
provides best practices and tips to avoid common refresh issues. The content lays a foundation to help you
understand how data refresh works. For targeted step-by-step instructions to configure data refresh, refer to the
tutorials and how-to guides listed in the Next steps section at the end of this article.
A4 or P1 3 GB
A5 or P2 6 GB
A6 or P3 10 GB
NOTE
The Scheduled cache refresh section of the Datasets tab is not available for datasets in import mode. These datasets
don't require a separate tile refresh because Power BI refreshes the tiles automatically during each scheduled or on-
demand data refresh.
Push datasets
Push datasets don't contain a formal definition of a data source, so they don't require you to perform a data
refresh in Power BI. You refresh them by pushing your data into the dataset through an external service or
process, such as Azure Stream Analytics. This is a common approach for real-time analytics with Power BI. Power
BI still performs cache refreshes for any tiles used on top of a push dataset. For a detailed walkthrough, see
Tutorial: Stream Analytics and Power BI: A real-time analytics dashboard for streaming data.
NOTE
Push Mode has several limitations as documented in Power BI REST API limitations.
O N EDRIVE
STO RA GE M O DE DATA REF RESH REF RESH Q UERY C A C H ES T IL E REF RESH REP O RT VISUA L S
Data refresh
For Power BI users, refreshing data typically means importing data from the original data sources into a dataset,
either based on a refresh schedule or on-demand. You can perform multiple dataset refreshes daily, which might
be necessary if the underlying source data changes frequently. Power BI limits datasets on shared capacity to
eight daily refreshes. If the dataset resides on a Premium capacity, you can schedule up to 48 refreshes per day
in the dataset settings. For more information, see Configure scheduled refresh later in this article. Datasets on a
Premium capacity with the XMLA endpoint enabled for read-write support unlimited refresh operations when
configured programmatically with TMSL or PowerShell.
It is also important to call out that the shared-capacity limitation for daily refreshes applies to both scheduled
refreshes and API refreshes combined. You can also trigger an on-demand refresh by selecting Refresh Now in
the dataset menu, as the following screenshot depicts. On-demand refreshes are not included in the refresh
limitation. Also note that datasets on a Premium capacity don't impose limitations for API refreshes. If you are
interested in building your own refresh solution by using the Power BI REST API, see Datasets - Refresh Dataset.
NOTE
Data refreshes must complete in less than 2 hours on shared capacity. If your datasets require longer refresh operations,
consider moving the dataset onto a Premium capacity. On Premium, the maximum refresh duration is 5 hours.
OneDrive refresh
If you created your datasets and reports based on a Power BI Desktop file, Excel workbook, or comma separated
value (.csv) file on OneDrive or SharePoint Online, Power BI performs another type of refresh, known as
OneDrive refresh. For more information, see Get data from files for Power BI.
Unlike a dataset refresh during which Power BI imports data from a data source into a dataset, OneDrive refresh
synchronizes datasets and reports with their source files. By default, Power BI checks about every hour if a
dataset connected to a file on OneDrive or SharePoint Online requires synchronization.
Power BI performs refresh based on an item ID in OneDrive, so be thoughtful when considering updates versus
replacement. When you set a OneDrive file as the data source, Power BI references the item ID of the file when it
performs the refresh. Consider the following scenario: you have a master file A and a production copy of that file
B, and you configure OneDrive refresh for file B. If you then copy file A over file B, the copy operation deletes the
old file B and creates a new file B with a different item ID, which breaks OneDrive refresh. To avoid that situation,
you can instead upload and replace file B, which keeps its same item ID.
You can move the file to another location (using drag and drop, for example) and refresh will continue to work
because Power BI still knows the file ID. However, if you copy that file to another location, a new instance of the
file and a new fileID is created. Therefore, your Power BI file reference is no longer valid and refresh will fail.
NOTE
It can take Power BI up to 60 minutes to refresh a dataset, even once the sync has completed on your local machine and
after you've used Refresh now in the Power BI service.
To review past synchronization cycles, check the OneDrive tab in the refresh history. The following screenshot
shows a completed synchronization cycle for a sample dataset.
As the above screenshot shows, Power BI identified this OneDrive refresh as a Scheduled refresh, but it is not
possible to configure the refresh interval. You can only deactivate OneDrive refresh in the dataset's settings.
Deactivating refresh is useful if you don't want your datasets and reports in Power BI to pick up any changes
from the source files automatically.
Note that the dataset settings page only shows the OneDrive Credentials and OneDrive refresh sections if
the dataset is connected to a file in OneDrive or SharePoint Online, as in the following screenshot. Datasets that
are not connected to sources file in OneDrive or SharePoint Online don't show these sections.
If you disable OneDrive refresh for a dataset, you can still synchronize your dataset on-demand by selecting
Refresh Now in the dataset menu. As part of the on-demand refresh, Power BI checks if the source file on
OneDrive or SharePoint Online is newer than the dataset in Power BI and synchronizes the dataset if this is the
case. The Refresh histor y lists these activities as on-demand refreshes on the OneDrive tab.
Keep in mind that OneDrive refresh does not pull data from the original data sources. OneDrive refresh simply
updates the resources in Power BI with the metadata and data from the .pbix, .xlsx, or .csv file, as the following
diagram illustrates. To ensure that the dataset has the most recent data from the data sources, Power BI also
triggers a data refresh as part of an on-demand refresh. You can verify this in the Refresh histor y if you switch
to the Scheduled tab.
If you keep OneDrive refresh enabled for a OneDrive or SharePoint Online-connected dataset and you want to
perform data refresh on a scheduled basis, make sure you configure the schedule so that Power BI performs the
data refresh after the OneDrive refresh. For example, if you created your own service or process to update the
source file in OneDrive or SharePoint Online every night at 1 am, you could configure scheduled refresh for 2:30
am to give Power BI enough time to complete the OneDrive refresh before starting the data refresh.
Refresh of query caches
If your dataset resides on a Premium capacity, you might be able to improve the performance of any associated
reports and dashboards by enabling query caching, as in the following screenshot. Query caching instructs the
Premium capacity to use its local caching service to maintain query results, avoiding having the underlying data
source compute those results. For more information, see Query caching in Power BI Premium.
Following a data refresh, however, previously cached query results are no longer valid. Power BI discards these
cached results and must rebuild them. For this reason, query caching might not be as beneficial for reports and
dashboards associated with datasets that you refresh very often, such as 48 times per day.
Tile refresh
Power BI maintains a cache for every tile visual on your dashboards and proactively updates the tile caches
when data changes. In other words, tile refresh happens automatically following a data refresh. This is true for
both, scheduled and on-demand refresh operations. You can also force a tile refresh by selecting More options
(...) in the upper right of a dashboard and selecting Refresh dashboard tiles .
Because it happens automatically, you can consider tile refresh an intrinsic part of data refresh. Among other
things, you might notice that the refresh duration increases with the number of tiles. The tile refresh overhead
can be significant.
By default, Power BI maintains a single cache for every tile, but if you use dynamic security to restrict data access
based on user roles, as covered in the article row-level security (RLS) with Power BI, then Power BI must
maintain a cache for every role and every tile. The number of tile caches multiplies by the number of roles.
The situation can get even more involved if your dataset uses a live connection to an Analysis Services data
model with RLS, as highlighted in the tutorial Dynamic row level security with Analysis services tabular model.
In this situation, Power BI must maintain and refresh a cache for every tile and every user who ever viewed the
dashboard. It is not uncommon that the tile refresh portion of such a data refresh operation far exceeds the time
it takes to fetch the data from the source. For more details around tile refresh, see Troubleshooting tile errors.
Refresh of report visuals
This refresh process is less important because it is only relevant for live connections to Analysis Services. For
these connections, Power BI caches the last state of the report visuals so that when you view the report again,
Power BI does not have to query the Analysis Services tabular model. When you interact with the report, such as
by changing a report filter, Power BI queries the tabular model and updates the report visuals automatically. If
you suspect that a report is showing stale data, you can also select the Refresh button of the report to trigger a
refresh of all report visuals, as the following screenshot illustrates.
NOTE
You can find a list of data source types that require a data gateway in the article Manage your data source -
Import/Scheduled Refresh.
NOTE
Only gateway admins can add data sources to a gateway. Also make sure your gateway admin adds your user account to
the list of users with permissions to use the data source. The dataset settings page only lets you select an enterprise
gateway with a matching data source that you have permission to use.
Make sure you map the correct data source definition to your data source. As the above screenshot illustrates,
gateway admins can create multiple definitions on a single gateway connecting to the same data source, each
with different credentials. In the example shown, a dataset owner in the Sales department would choose the
AdventureWorksProducts-Sales data source definition while a dataset owner in the Support department would
map the dataset to the AdventureWorksProducts-Support data source definition. If the names of the data source
definition aren't intuitive, contact your gateway admin to clarify which definition to pick.
NOTE
A dataset can only use a single gateway connection. In other words, it is not possible to access on-premises data sources
across multiple gateway connections. Accordingly, you must add all required data source definitions to the same gateway.
Deploying a personal data gateway
If you have no access to an enterprise data gateway and you're the only person who manages datasets so you
don't need to share data sources with others, you can deploy a data gateway in personal mode. In the Gateway
connection section, under You have no personal gateways installed , select Install now . The personal
data gateway has several limitations as documented in On-premises data gateway (personal mode).
Unlike for an enterprise data gateway, you don't need to add data source definitions to a personal gateway.
Instead, you manage the data source configuration by using the Data source credentials section in the
dataset settings, as the following screenshot illustrates.
Power BI datasets rely on Power Query to access and retrieve source data. The following mashup listing shows a
basic example of a query that merges data from an on-premises source and a cloud source.
Let
TableData1 = OnPremSource{[Schema="Sales",Item="Customer"]}[Data],
in
MergedData
There are two options to configure a data gateway to support merging or appending data from on-premises
and cloud sources:
Add a data source definition for the cloud source to the data gateway in addition to the on-premises data
sources.
Enable the checkbox Allow user's cloud data sources to refresh through this gateway cluster .
If you enable the checkbox Allow user's cloud data sources to refresh through this gateway cluster in
the gateway configuration , as in the screenshot above, Power BI can use the configuration that the user
defined for the cloud source under Data source credentials in the dataset settings. This can help to lower the
gateway configuration overhead. On the other hand, if you want to have greater control over the connections
that your gateway establishes, you should not enable this checkbox. In this case, you must add an explicit data
source definition for every cloud source that you want to support to your gateway. It is also possible to enable
the checkbox and add explicit data source definitions for your cloud sources to a gateway. In this case, the
gateway uses the data source definitions for all matching sources.
Configuring query parameters
The mashup or M queries you create by using Power Query can vary in complexity from trivial steps to
parameterized constructs. The following listing shows a small sample mashup query that uses two parameters
called SchemaName and TableName to access a given table in an AdventureWorks database.
let
TableData = Source{[Schema=SchemaName,Item=TableName]}[Data]
in
TableData
NOTE
Query parameters are only supported for Import mode datasets. DirectQuery/LiveConnect mode does not support
query parameter definitions.
To ensure that a parameterized dataset accesses the correct data, you must configure the mashup query
parameters in the dataset settings. You can also update the parameters programmatically by using the Power BI
REST API. The following screenshot shows the user interface to configure the query parameters for a dataset
that uses the above mashup query.
If that warning is present in the Data Source Settings dialog that appears, then a dynamic data source that
cannot be refreshed in the Power BI service is present.
NOTE
Power BI deactivates your refresh schedule after four consecutive failures or when the service detects an unrecoverable
error that requires a configuration update, such as invalid or expired credentials. It is not possible to change the
consecutive failures threshold.
To resume scheduled refresh, visit a report or dashboard built using this dataset or manually refresh the dataset
using the Refresh Now option.
Checking refresh status and history
In addition to failure notifications, it is a good idea to check your datasets periodically for refresh errors. A quick
way is to view the list of datasets in a workspace. Datasets with errors show a small warning icon. Select the
warning icon to obtain additional information, as in the following screenshot. For more information about
troubleshooting specific refresh errors, see Troubleshooting refresh scenarios.
The warning icon helps to indicate current dataset issues, but it is also a good idea to check the refresh history
occasionally. As the name implies, the refresh history enables you to review the success or failure status of past
synchronization cycles. For example, a gateway administrator might have updated an expired set of database
credentials. As you can see in the following screenshot, the refresh history shows when an affected refresh
started working again.
NOTE
You can find a link to display the refresh history in the dataset settings. You can also retrieve the refresh history
programmatically by using the Power BI REST API. By using a custom solution, you can monitor the refresh history of
multiple datasets in a centralized way.
Best practices
Checking the refresh history of your datasets regularly is one of the most important best practices you can
adopt to ensure that your reports and dashboards use current data. If you discover issues, address them
promptly and follow up with data source owners and gateway administrators if necessary.
In addition, consider the following recommendations to establish and maintain reliable data refresh processes
for your datasets:
Schedule your refreshes for less busy times, especially if your datasets are on Power BI Premium. If you
distribute the refresh cycles for your datasets across a broader time window, you can help to avoid peaks that
might otherwise overtax available resources. Delays starting a refresh cycle are an indicator of resource
overload. If a Premium capacity is completely exhausted, Power BI might even skip a refresh cycle.
Keep refresh limits in mind. If the source data changes frequently or the data volume is substantial, consider
using DirectQuery/LiveConnect mode instead of Import mode if the increased load at the source and the
impact on query performance are acceptable. Avoid constantly refreshing an Import mode dataset. However,
DirectQuery/LiveConnect mode has several limitations, such as a one-million-row limit for returning data
and a 225 seconds response time limit for running queries, as documented in Use DirectQuery in Power BI
Desktop. These limitations might require you to use Import mode nonetheless. For very large data volumes,
consider the use of aggregations in Power BI.
Verify that your dataset refresh time does not exceed the maximum refresh duration. Use Power BI Desktop
to check the refresh duration. If it takes more than 2 hours, consider moving your dataset to Power BI
Premium. Your dataset might not be refreshable on shared capacity. Also consider using incremental refresh
in Power BI Premium for datasets that are larger than 1GB or take several hours to refresh.
Optimize your datasets to include only those tables and columns that your reports and dashboards use.
Optimize your mashup queries and, if possible, avoid dynamic data source definitions and expensive DAX
calculations. Specifically avoid DAX functions that test every row in a table because of the high memory
consumption and processing overhead.
Apply the same privacy settings as in Power BI Desktop to ensure that Power BI can generate efficient source
queries. Keep in mind that Power BI Desktop does not publish privacy settings. You must manually reapply
the settings in the data source definitions after publishing your dataset.
Limit the number of visuals on your dashboards, especially if you use row-level security (RLS). As explained
earlier in this article, an excessive number of dashboard tiles can significantly increase the refresh duration.
Use a reliable enterprise data gateway deployment to connect your datasets to on-premises data sources. If
you notice gateway-related refresh failures, such as gateway unavailable or overloaded, follow up with
gateway administrators to either add additional gateways to an existing cluster or deploy a new cluster (scale
up versus scale out).
Use separate data gateways for Import datasets and DirectQuery/LiveConnect datasets so that the data
imports during scheduled refresh don't impact the performance of reports and dashboards on top of
DirectQuery/LiveConnect datasets, which query the data sources with each user interaction.
Ensure that Power BI can send refresh failure notifications to your mailbox. Spam filters might block the email
messages or move them into a separate folder where you might not notice them immediately.
Next steps
Configuring scheduled refresh
Tools for troubleshooting refresh issues
Troubleshooting refresh scenarios
More questions? Try asking the Power BI Community
Configure scheduled refresh
9/9/2020 • 4 minutes to read • Edit Online
NOTE
After two months of inactivity, scheduled refresh on your dataset is paused. For more information, see Scheduled refresh
later in this article.
This article describes the options available for scheduled refresh for the On-premises data gateway (personal
mode) and the On-premises data gateway. You specify refresh options in the following areas of the Power BI
service: Gateway connection , Data source credentials , and Scheduled refresh . We'll look at each in turn.
For more information about data refresh, including limitations on refresh schedules, see Data refresh.
To get to the Scheduled refresh screen:
1. In the navigation pane, under Datasets , select More options (...) next to a dataset listed .
2. Select Schedule Refresh .
Gateway connection
You see different options here depending on whether you have a personal, or enterprise, gateway online and
available.
If no gateway is available, you see Gateway connection disabled. You also see a message indicating how to
install the personal gateway.
If you have a personal gateway configured and it's online, it's available to select. It shows offline if it's not
available.
You can also select the enterprise gateway if one is available for you. You only see an enterprise gateway
available if your account is listed in the Users tab of the data source configured for a given gateway.
You're only required to sign in to a data source the first time you use refresh on that dataset. Once entered, those
credentials are retained with the dataset.
NOTE
For some authentication methods, if the password you use to sign into a data source expires or is changed, you need to
change it for the data source in Data source credentials too.
When things go wrong, the problem usually has something to do with either the gateway being offline because
it couldn't sign in to Windows and start the service, or Power BI couldn't sign in to the data sources to query for
updated data. If refresh fails, check the dataset settings. If the gateway service is offline, Status is where you see
the error. If Power BI can't sign into the data sources, you see an error in Data Source Credentials.
On-premises data gateway
If you are using the On-premises data gateway to refresh data, you do not need to supply credentials, as they
are defined for the data source by the gateway administrator.
NOTE
When connecting to on-premises SharePoint for data refresh, Power BI supports only Anonymous, Basic, and Windows
(NTLM/Kerberos) authentication mechanisms. Power BI does not support ADFS or any Forms-Based Authentication
mechanisms for data refresh of on-premises SharePoint data sources.
Scheduled refresh
The Scheduled refresh section is where you define the frequency and time slots to refresh the dataset. Some
data sources do not require a gateway to be configurable for refresh; other data sources require a gateway.
Set the Keep your data up to date slider to On to configure the settings.
NOTE
The target is to initiate the refresh within 15 minutes of the scheduled time slot, but a delay of up to one hour can occur if
the service can't allocate the required resources sooner.
NOTE
After two months of inactivity, scheduled refresh on your dataset is paused. A dataset is considered inactive when no user
has visited any dashboard or report built on the dataset. At that time, the dataset owner is sent an email indicating the
scheduled refresh is paused. The refresh schedule for the dataset is then displayed as disabled . To resume scheduled
refresh, simply revisit any dashboard or report built on the dataset.
What's supported?
NOTE
Scheduled refresh will also get disabled automatically after four consecutive errors.
Certain datasets are supported against different gateways for scheduled refresh. Here is a reference to
understand what is available.
Power BI Gateway - Personal
Power BI Desktop
All online data sources shown in Power BI Desktop's Get Data and Query Editor.
All on-premises data sources shown in Power BI Desktop's Get Data and Query Editor except for Hadoop file
(HDFS) and Microsoft Exchange.
Excel
All online data sources shown in Power Query.
All on-premises data sources shown in Power Query except for Hadoop file (HDFS) and Microsoft Exchange.
All online data sources shown in Power Pivot.
All on-premises data sources shown in Power Pivot except for Hadoop file (HDFS) and Microsoft Exchange.
NOTE
In Excel 2016 and later, Power Query is listed on the Data section of the ribbon, under Get & Transform Data .
Power BI Gateway
For information about supported data sources, see Power BI data sources.
Troubleshooting
Sometimes refreshing data may not go as expected. Typically this will be an issue connected with a gateway.
Take a look at the gateway troubleshooting articles for tools and known issues.
Troubleshooting the On-premises data gateway
Troubleshooting the Power BI Gateway - Personal
Next steps
Data refresh in Power BI
Power BI Gateway - Personal
On-premises data gateway (personal mode)
Troubleshooting the On-premises data gateway
Troubleshooting the Power BI Gateway - Personal
More questions? Try asking the Power BI Community
Refresh summaries for Power BI
9/9/2020 • 4 minutes to read • Edit Online
The Power BI refresh summaries page, found in the Power BI Admin portal, provides control and insight into your
refresh schedules, capacities, and potential refresh schedule overlaps. You can use the refresh summaries page to
determine whether you should adjust refresh schedules, learn error codes associated with refresh issues, and
properly manage your data refresh scheduling.
The refresh summaries page has two views:
Histor y - displays the refresh summary history for Power BI Premium capacities for which you are an
administrator.
Schedule - shows the schedule view for scheduled refresh, which also can uncover issues with time slots
that are oversubscribed.
You can also export information about a refresh event to a .CSV file, which can provide significant information and
insight into refresh events or errors that can be impacting the performance or completion of scheduled refresh
events.
The following sections look at each of these views in turn.
Refresh history
You can select the Histor y view by clicking on Histor y in the refresh summaries page.
The History provides an overview of the outcomes of recently scheduled refreshes on the capacities for which you
have admin privilege. You can sort the view by any column by clicking the column. You can choose to sort the view
by the column selected by ascending order, descending, or by using text filters.
In history view, the data associated with a given refresh is based on up 60 most recent records for each scheduled
refresh.
You can also export information for any scheduled refresh to a .CSV file, which includes detailed information
including error messages for each refresh event. Exporting to a .CSV file lets you sort the file based on any of the
columns, search for words, sort based on error codes or owners, and so on. The following image shows an example
exported .CSV file.
With the information in the exported file, you can review the capacity, duration, and any error messages recorded
for the instance of refresh.
Refresh schedule
You can select the Schedule view by clicking on Schedule in refresh summaries. The Schedule view displays
scheduling information for the week, broken down into 30-minute time slots.
The Schedule view is very useful in determining whether the refresh events scheduled are properly spaced,
allowing for all refreshes to complete without overlap, or whether you have scheduled refresh events that are
taking too long and creating resource contention. If you find such resource contention, you should adjust your
refresh schedules to avoid the conflicts or overlap, so your scheduled refreshes can complete successfully.
The Refresh time booked (minutes) column is a calculation of the average of up to 60 records for each associated
dataset. The numeric value for each 30-minute time slot is the sum of minutes calculated for all scheduled refreshes
scheduled to start on the time slot and any scheduled refreshes set to start on the previous time slot, but whose
average duration overflows into the time slot that's selected.
The Refresh time available (minutes) column is a calculation of the minutes available for refresh in each time slot,
minus whatever refresh is already scheduled for that timeslot. For example, if your P2 subscription provides 12
concurrently running refreshes, you have 12 30-minute slots, so 12 refreshes x 30 minutes each = 360 minutes
available for refresh in that time slot. If you have one refresh booked in that slot that takes 20 minutes, your Refresh
time available (minutes) in that slot is 340 minutes (360 total minutes available, minus 20 minutes already booked
= 340 minutes still available).
You can select a time slot and then select the associated details button to see which scheduled refresh events
contribute to the refresh time booked, their owners, and how long they take to complete.
Let's look at an example, to see how this works. The following dialog is displayed when we select the 8:30 PM time
slot for Sunday, and click details .
There are three scheduled refresh events occurring in this time slot.
Scheduled refresh #1 and #3 are both scheduled for this 8:30 PM time slot, which we can determine by looking at
the value in the Scheduled time slot column. Their average durations are 4:39 and six seconds (0:06) respectively.
All is good there.
However, scheduled refresh #2 is scheduled for the 8:00 PM time slot, but because it takes an average of over 48
minutes to complete (seen in the Average duration column), that refresh event overflows into the next 30-minute
time slot.
That's not good. The admin in this case should contact the owners of that scheduled refresh instance and suggest
they find a different time slot for that scheduled refresh, or reschedule the other refreshes so there's no overlap, or
find some other solution to prevent such overlap.
Next steps
Data refresh in Power BI
Power BI Gateway - Personal
On-premises data gateway (personal mode)
Troubleshooting the On-premises data gateway
Troubleshooting the Power BI Gateway - Personal
More questions? Try asking the Power BI Community
Incremental refresh in Power BI
9/9/2020 • 13 minutes to read • Edit Online
Incremental refresh enables very large datasets in Power BI with the following benefits:
Refreshes are faster - Only data that has changed needs to be refreshed. For example, refresh only the last
five days of a ten-year dataset.
Refreshes are more reliable - It's no longer necessary to maintain long-running connections to volatile
source systems.
Resource consumption is reduced - Less data to refresh reduces overall consumption of memory and other
resources.
NOTE
Incremental refresh is now available for Power BI Pro, Premium, and shared subscriptions and datasets.
IMPORTANT
Verify queries have an equal to (=) on either RangeStar t or RangeEnd , but not both. If the equal to (=) exists on both
parameters, a row could satisfy the conditions for two partitions, which could lead to duplicate data in the model. For
example,
#"Filtered Rows" = Table.SelectRows(dbo_Fact, each [OrderDate] >= RangeStar t and [OrderDate] <= RangeEnd ) could
result in duplicate data.
TIP
While the data type of the parameters must be date/time, it's possible to convert them to match the requirements of the
datasource. For example, the following Power Query function converts a date/time value to resemble an integer surrogate
key of the form yyyymmdd, which is common for data warehouses. The function can be called by the filter step.
(x as datetime) => Date.Year(x)*10000 + Date.Month(x)*100 + Date.Day(x)
Select Close and Apply from the Power Query Editor. You should have a subset of the dataset in Power BI
Desktop.
Filter date column updates
The filter on the date column is used to dynamically partition the data into ranges in the Power BI service.
Incremental refresh isn't designed to support cases where the filtered date column is updated in the source system.
An update is interpreted as an insertion and a deletion, not an actual update. If the deletion occurs in the historical
range and not the incremental range, it won't get picked up. This can cause data refresh failures due to partition-
key conflicts.
Query folding
It's important the partition filters are pushed to the source system when queries are submitted for refresh
operations. To push filtering down means the datasource should support query folding. Most data sources that
support SQL queries support query folding. However, data sources like flat files, blobs, and web feeds typically do
not. In cases where the filter is not supported by the datasource back-end, it cannot be pushed down. In such cases,
the mashup engine compensates and applies the filter locally, which may require retrieving the full dataset from
the data source. This can cause incremental refresh to be very slow, and the process can run out of resources either
in the Power BI service or in the on-premises data gateway if used.
Given the various levels of query folding support for each datasource, it's recommended that verification is
performed to ensure the filter logic is included in the source queries. To make this easier, Power BI Desktop
attempts to perform this verification for you. If unable to verify, a warning is displayed in the incremental refresh
dialog when defining the incremental refresh policy. SQL based data sources such as SQL, Oracle, and Teradata can
rely on this warning. Other data sources may be unable to verify without tracing queries. If Power BI Desktop is
unable to confirm, the following warning is displayed. If you see this warning and want to check that the necessary
query folding is occurring, you can use the Query Diagnostics feature, or trace queries received by the source
database.
Current date
The current date is based on the system date at the time of refresh. If scheduled refresh is enabled for the dataset in
the Power BI service, the specified time zone will be taken into account when determining the current date. Both
manually invoked and scheduled refreshes through the Power BI service observe the time zone if available. For
example, a refresh that occurs at 8 PM Pacific Time (US and Canada) with time zone specified will determine the
current date based on Pacific Time, not GMT (which would otherwise be the next day). Refresh operations not
invoked through the Power BI service, such as the TMSL refresh command, will not consider the scheduled refresh
time zone
NOTE
Definition of these ranges might be all you need, in which case you can go straight to the publishing step below. The
additional dropdowns are for advanced features.
Query timeouts
The troubleshooting refresh article explains that refresh operations in the Power BI service are subject to timeouts.
Queries can also be limited by the default timeout for the data source. Most relational sources allow overriding
timeouts in the M expression. For example, the expression below uses the SQL Server data-access function to set it
to 2 hours. Each period defined by the policy ranges submits a query observing the command timeout setting.
let
Source = Sql.Database("myserver.database.windows.net", "AdventureWorks", [CommandTimeout=#duration(0, 2,
0, 0)]),
dbo_Fact = Source{[Schema="dbo",Item="FactInternetSales"]}[Data],
#"Filtered Rows" = Table.SelectRows(dbo_Fact, each [OrderDate] >= RangeStart and [OrderDate] < RangeEnd)
in
#"Filtered Rows"
{
"refresh": {
"type": "full",
"applyRefreshPolicy": true,
"effectiveDate": "12/31/2013",
"objects": [
{
"database": "IR_AdventureWorks",
"table": "FactInternetSales"
}
]
}
}
To learn more about overriding default incremental refresh behavior with TMSL, see Refresh command.
Custom queries for detect data changes
You can use TMSL and/or TOM to override the detected data changes behavior. Not only can this be used to avoid
persisting the last-update column in the in-memory cache, it can enable scenarios where a
configuration/instruction table is prepared by ETL processes for the purpose of flagging only the partitions that
need to be refreshed. This can create a more efficient incremental refresh process where only the required periods
are refreshed, no matter how long ago data updates took place.
The pollingExpression is intended to be a lightweight M expression or name of another M query. It must return a
scalar value and will be executed for each partition. If the value returned is different to what it was the last time an
incremental refresh occurred, the partition is flagged for full processing.
The following example covers all 120 months in the historical range for backdated changes. Specifying 120 months
instead of 10 years means data compression may not be quite as efficient, but avoids having to refresh a whole
historical year, which would be more expensive when a month would suffice for a backdated change.
"refreshPolicy": {
"policyType": "basic",
"rollingWindowGranularity": "month",
"rollingWindowPeriods": 120,
"incrementalGranularity": "month",
"incrementalPeriods": 120,
"pollingExpression": "<M expression or name of custom polling query>",
"sourceExpression": [
"let ..."
]
}
Metadata-only deployment
When publishing a new version of a PBIX file from Power BI Desktop to a workspace in Power BI Premium, if a
dataset with the same name already exists, you are prompted to replace the existing dataset.
In some cases you may not want to replace the dataset, especially with incremental refresh. The dataset in Power BI
Desktop could be much smaller than the one in the service. If the dataset in the service has an incremental refresh
policy applied, it may have several years of historical data that will be lost if the dataset is replaced. Refreshing all
the historical data could take hours and result in system downtime for users.
Instead, it's better to perform a metadata-only deployment. This allows deployment of new objects without losing
the historical data. For example, if you have added a few measures, you can deploy only the new measures without
needing to refresh the data, saving a lot of time.
When configured for read-write, the XMLA endpoint provides compatibility with tools that make this happen. For
example, the ALM Toolkit is a schema diff tool for Power BI datasets and can be used to perform deployment of
metadata only.
Download and install the latest version of the ALM Toolkit from the Analysis Services Git repo. Documentation links
and information on supportability are available via the Help ribbon. To perform a metadata only deployment,
perform a comparison and select the running Power BI Desktop instance as the source, and the existing dataset in
the service as the target. Consider the differences displayed and skip the update of the table with incremental
refresh partitions, or use the Options dialog to retain partitions for table updates. Validate the selection to ensure
the integrity of the target model and then update.
See also
Dataset connectivity with the XMLA endpoint
Troubleshooting refresh scenarios
Refresh a dataset created from a Power BI Desktop
file on a local drive
9/9/2020 • 2 minutes to read • Edit Online
What’s supported?
In Power BI, Refresh Now and Schedule Refresh is supported for datasets created from Power BI Desktop files
imported from a local drive where Get Data/Query Editor is used to connect to and load data from any of the
following data sources:
Power BI Gateway - Personal
All online data sources shown in Power BI Desktop’s Get Data and Query Editor.
All on-premises data sources shown in Power BI Desktop’s Get Data and Query Editor except for Hadoop file
(HDFS) and Microsoft Exchange.
On-premises data gateway
Data source
Analysis Services Tabular
Analysis Services Multidimensional
SQL Server
SAP HANA
Oracle
Teradata
File
Folder
SharePoint list (on-premises)
Web
OData
IBM DB2
MySQL
Sybase
SAP BW
IBM Informix Database
ODBC
NOTE
A gateway must be installed and running in order for Power BI to connect to on-premises data sources and refresh the
dataset.
You can perform a one-time, manual refresh in Power BI Desktop by selecting Refresh on the Home ribbon. When
you select Refresh here, the data in the file’s model is refreshed with updated data from the original data source.
This kind of refresh, entirely from within the Power BI Desktop application itself, is different from manual or
scheduled refresh in Power BI, and it’s important to understand the distinction.
When you import your Power BI Desktop file from a local drive, data, along with other information about the
model, is loaded into a dataset in the Power BI service. In the Power BI service, not Power BI Desktop, you want to
refresh data in the dataset because that is what your reports, in the Power BI service, are based on. Because the data
sources are external, you can manually refresh the dataset by using Refresh now or you can set up a refresh
schedule by using Schedule Refresh .
When you refresh the dataset, Power BI does not connect to the file on the local drive to query for updated data. It
uses information in the dataset to connect directly to the data sources to query for updated data it then loads into
the dataset.
NOTE
Refreshed data in the dataset is not synchronized back to the file on the local drive.
Troubleshooting
Sometimes refreshing data may not go as expected. Typically this is an issue connected with a gateway. Take a look
at the gateway troubleshooting articles for tools and known issues.
Troubleshooting the On-premises data gateway
Troubleshooting the Power BI Gateway - Personal
More questions? Try asking the Power BI Community
Refresh a dataset stored on OneDrive or SharePoint
Online
9/9/2020 • 4 minutes to read • Edit Online
Importing files from OneDrive or SharePoint Online into the Power BI service is a great way to make sure your
work in Power BI Desktop stays in sync with the Power BI service.
When you import your Power BI Desktop file from OneDrive or SharePoint Online, you load data and model
information into a dataset in Power BI. You'll want to refresh the dataset in the Power BI service because that's what
your reports are based on. Because the data sources are external, you can manually refresh the dataset by using
Refresh now or you can set up a refresh schedule by using Schedule Refresh .
When you refresh the dataset, Power BI doesn't connect to the file on OneDrive or SharePoint Online to query for
updated data. It uses information in the dataset to connect directly to the data sources and query for updated data.
Then, it loads that data into the dataset. This refreshed data in the dataset isn't synchronized back to the file on
OneDrive or SharePoint Online.
What’s supported?
Power BI supports Refresh and Schedule Refresh for datasets created from Power PI Desktop files imported
from a local drive where you use Get Data or Quer y Editor to connect to and load data from the following data
sources.
NOTE
Onedrive refresh for live connection datasets is supported. However, changing the live connection dataset, from one dataset
to another in an already published report, is not supported in the OneDrive refresh scenario.
NOTE
A gateway must be installed and running in order for Power BI to connect to on-premises data sources and refresh the
dataset.
If you've changed your Microsoft credentials, you can't synchronize changes between your file on OneDrive and the
dataset in Power BI. You need to connect to and import your file again from OneDrive.
Troubleshooting
Sometimes refreshing data may not go as expected. You'll typically run into data refresh issues when you're
connected with a gateway. Take a look at the gateway troubleshooting articles for tools and known issues.
Troubleshooting the On-premises data gateway
Troubleshooting the Power BI Gateway - Personal
More questions? Try asking the Power BI Community.
Refresh a dataset created from an Excel workbook on
a local drive
9/9/2020 • 3 minutes to read • Edit Online
What’s supported?
In Power BI, Refresh Now and Schedule Refresh is supported for datasets created from Excel workbooks imported
from a local drive where Power Query (Get & Transform data in Excel 2016) or Power Pivot is used to connect to
any of the following data sources and load data into the Excel data model:
Power BI Gateway - Personal
All online data sources shown in Power Query.
All on-premises data sources shown in Power Query except for Hadoop file (HDFS) and Microsoft Exchange.
All online data sources shown in Power Pivot.*
All on-premises data sources shown in Power Pivot except for Hadoop file (HDFS) and Microsoft Exchange.
On-premises data gateway
Data source
Analysis Services Tabular
Analysis Services Multidimensional
SQL Server
SAP HANA
Oracle
Teradata
File
Folder
SharePoint list (on-premises)
Web
OData
IBM DB2
MySQL
Sybase
SAP BW
IBM Informix Database
ODBC
Notes:
A gateway must be installed and running in order for Power BI to connect to on-premises data sources and
refresh the dataset.
When using Excel 2013, make sure you’ve updated Power Query to the latest version.
Refresh is not supported for Excel workbooks imported from a local drive where data exists only in
worksheets or linked tables. Refresh is supported for worksheet data if it is stored and imported from
OneDrive. To learn more, see Refresh a dataset created from an Excel workbook on OneDrive, or SharePoint
Online.
When you refresh a dataset created from an Excel workbook imported from a local drive, only the data
queried from data sources is refreshed. If you change the structure of the data model in Excel or Power Pivot;
for example, create a new measure or change the name of a column, those changes will not be copied to the
dataset. If you make such changes, you’ll need to re-upload or re-publish the workbook. If you expect to
make regular changes to the structure of your workbook and you want those to be reflected in the dataset in
Power BI without having to re-upload, consider putting your workbook on OneDrive. Power BI automatically
refreshes both the structure and worksheet data from workbooks stored and imported from OneDrive.
NOTE
The images here show Excel 2016.
Or, If you click Edit in Navigator, you’ll open the Query Editor. There you can click Close & Load To….
Then in Load To , make sure you select Add this data to the Data Model .
IMPORTANT
Refresh is not supported for OData feeds connected to and queried from Power Pivot. When using an OData feed as a data
source, use Power Query.
Troubleshooting
Sometimes refreshing data may not go as expected. Typically this will be an issue connected with a gateway. Take a
look at the gateway troubleshooting articles for tools and known issues.
Troubleshooting the On-premises data gateway
Troubleshooting the Power BI Gateway - Personal
Next steps
More questions? Try the Power BI Community
Refresh a dataset created from an Excel workbook on
OneDrive, or SharePoint Online
9/9/2020 • 6 minutes to read • Edit Online
You can import Excel workbooks that are stored on your local machine, or in cloud storage such as OneDrive for
Business or SharePoint Online. We will look at the advantages of using cloud storage for your Excel files. For more
information on how to import Excel files into Power BI, see Get data from Excel workbook files.
What’s supported?
In Power BI, Refresh Now and Schedule Refresh are supported for datasets created from Power BI Desktop files
imported from a local drive where Get Data/Query Editor is used to connect to and load data from any of the
following data sources:
Power BI Gateway - Personal
All online data sources shown in Power BI Desktop’s Get Data and Query Editor.
All on-premises data sources shown in Power BI Desktop’s Get Data and Query Editor except for Hadoop file
(HDFS) and Microsoft Exchange.
On-premises data gateway
Data source
Analysis Services Tabular
Analysis Services Multidimensional
SQL Server
SAP HANA
Oracle
Teradata
File
Folder
SharePoint list (on-premises)
Web
OData
IBM DB2
MySQL
Sybase
SAP BW
IBM Informix Database
ODBC
NOTE
A gateway must be installed and running in order for Power BI to connect to on-premises data sources and refresh the
dataset.
If you make changes to your file on OneDrive that cannot be synchronized with the dataset or reports in Power BI,
because your Microsoft account credentials might have changed, you’ll need to connect to and import your file
again from your personal OneDrive.
NOTE
The images here show Excel 2016.
Or, If you click Edit in Navigator , you’ll open the Query Editor. There you can click Close & Load To….
Then in Load To , make sure you select Add this data to the Data Model .
Important notes
Refresh is not supported for OData feeds connected to and queried from Power Pivot. When using an OData feed
as a data source, use Power Query.
Troubleshooting
Sometimes refreshing data may not go as expected. Typically this is an issue connected with a gateway. Take a look
at the gateway troubleshooting articles for tools and known issues:
Troubleshooting the On-premises data gateway
Troubleshooting the Power BI Gateway - Personal
More questions? Try the Power BI Community
Refresh a dataset created from a .CSV file on
OneDrive or SharePoint Online
9/9/2020 • 2 minutes to read • Edit Online
What’s supported?
Comma separated value files are simple text files, so connections to external data sources and reports are not
supported. You cannot schedule refresh on a dataset created from a comma delimited file. However, when the file is
on OneDrive, or SharePoint Online, Power BI will synchronize any changes to the file with the dataset automatically
about every hour.
Next steps
Tools for troubleshooting refresh issues Troubleshooting refresh scenarios
More questions? Try asking the Power BI Community
Query caching in Power BI Premium/Embedded
9/9/2020 • 2 minutes to read • Edit Online
Organizations with Power BI Premium or Power BI Embedded can take advantage of query caching to speed up
reports associated with a dataset. Query caching instructs the Premium/Embedded capacity to use its local caching
service to maintain query results, avoiding having the underlying data source compute those results.
IMPORTANT
Query caching is only available on Power BI Premium or Power BI Embedded. It is not applicable to LiveConnect datasets
leveraging Azure Analysis Services or SQL Server Analysis Services.
Cached query results are specific to user and dataset context and always respect security rules. At present the
service only does query caching for the initial page that you land on. In other words, queries aren't cached when
you interact with the report. The query cache respects personal bookmarks and persistent filters, so queries
generated by a personalized report will be cached. Dashboard tiles that are powered by the same queries also
benefit once the query is cached. Performance especially benefits when a dataset is accessed frequently and doesn't
need to be refreshed often. Query caching can also reduce load on your Premium/Embedded capacity by reducing
the overall number of queries.
You control query caching behavior on the Settings page for the dataset in the Power BI service. It has three
possible settings:
Capacity default : Query caching Off
Off : Don't use query caching for this dataset.
On : Use query caching for this dataset.
The new Power BI template apps enable Power BI partners to build Power BI apps with little or no coding, and
deploy them to any Power BI customer. This article is an overview of the Power BI template app program.
As a Power BI partner, you create a set of out-of-the-box content for your customers and publish it yourself.
You build template apps that allow your customers to connect and instantiate within their own accounts. As
domain experts, they can unlock the data in a way that's easy for their business users to consume.
You submit a template apps to the Partner center. The apps then become publicly available in the Power BI Apps
marketplace and on Microsoft AppSource. Here's a high-level look at the public template app creation experience.
Process
The general process to develop and submit a template app involves several stages. Some stages can include more
than one activity at the same time.
P O W ER B I P O W ER B I PA RT N ER
STA GE DESK TO P SERVIC E C EN T ER
High-level steps
Here are the high-level steps.
1. Review the requirements to make sure you meet them.
2. Build a report in Power BI Desktop. Use parameters so you can save it as a file other people can use.
3. Create a workspace for your template app in your tenant on the Power BI service (app.powerbi.com).
4. Import your .pbix file and add content such as a dashboard to your app.
5. Create a test package to test the template app yourself within your organization.
6. Promote the test app to pre-production to submit the app for validation in AppSource, and to test outside
your own tenant.
7. Submitthe content to Partner center for publishing.
8. Make your offer go 'Live' in AppSource, and move your app to production in Power BI.
9. Now you can start developing the next version in the same workspace, in preproduction.
Requirements
To create the template app, you need permissions to create one. See the Power BI admin portal, Template app
settings for details.
To publish a template app to the Power BI service and AppSource, you must meet the requirements for becoming
a Partner Center publisher.
NOTE
Template apps submissions are managed in Partner Center. Use the same Microsoft Developer Center registration account
to sign in. You should have only one Microsoft account for your AppSource offerings. Accounts shouldn't be specific to
individual services or offers.
Tips
Make sure your app includes sample data to get everyone started in a click.
Carefully examine your application by installing it in your tenant and in a secondary tenant. Make sure
customers only see what you want them to see.
Use AppSource as your online store to host your application. This way everyone using Power BI can find your
app.
Consider offering more than one template app for separate unique scenarios.
Enable data customization; for example, support custom connection and parameters configuration by the
installer.
See Tips for authoring template apps in Power BI for more suggestions.
Known limitations
F EAT URE K N O W N L IM ITAT IO N
Contents: Datasets Exactly one dataset should be present. Only datasets built in
Power BI Desktop (.pbix files) are allowed.
Not supported: Datasets from other template apps, cross-
workspace datasets, paginated reports (.rdl files), Excel
workbooks
Contents: Dashboards Real-time tiles aren't allowed (in other words, no support for
push or streaming datasets)
Data sources Data sources supported for cloud Scheduled Data refresh are
allowed.
Not supported:
DirectQuery
Live connections (no Azure AS)
On-premises data sources (personal and enterprise
gateways aren't supported)
Real time (no support for push dataset)
Composite models
Support
For support during development, use https://powerbi.microsoft.com/support. We actively monitor and manage
this site. Customer incidents quickly find their way to the appropriate team.
Next steps
Create a template app
Create a template app in Power BI
9/9/2020 • 6 minutes to read • Edit Online
The new Power BI template apps enable Power BI partners to build Power BI apps with little or no coding, and
deploy them to any Power BI customer. This article contains step-by-step instructions to create a Power BI template
app.
If you can create Power BI reports and dashboards, you can become a template app builder and builds and
packages analytical content into an app. You may deploy your app to other Power BI tenants through any available
platform, such as AppSource, or by using it in your own web service. As a builder you have the possibility to create
a protected analytics package for distribution.
Power BI tenant admins govern and control who in their organization can create template apps, and who can
install them. Those users who are authorized can install your template app, then modify it and distribute it to the
Power BI consumers in their organization.
Prerequisites
Here are the requirements for building a template app:
A Power BI pro license
An installation of Power BI Desktop (optional)
Familiarity with the basic concepts of Power BI
Permissions to share a template app publicly (for more information, see Power BI admin portal, Template app
settings
NOTE
You need permissions from your Power BI admin to promote template apps.
App name
Description
Support site (link is presented under app info after redistributing template app as org app)
App logo (45K file size limit, 1:1 aspect ratio, .png .jpg .jpeg formats)
App theme color
Navigation
Activate the New navigation builder where you can define the nav pane of the app (See Design the
navigation experience in this article for details).
App landing page: If you decide to opt out of the navigation builder, you have the option to select the app
landing page. Define a report or dashboard to be the landing page of your app. Use a landing page that
gives the right impression.
Control
Set limits and restrictions that your application users will have with the content of your application. You can
use this control to protect intellectual property in your app.
NOTE
Exporting to .pbix format is always blocked for users installing the app.
Parameters
Use this category to manage parameter behavior when connecting to data sources. Learn more about
creating query parameters.
You've also done the first step of the release management process, which follows.
NOTE
When the app is promoted it becomes publicly available outside your organization.
If you don't see that option, contact your Power BI admin to grant you permissions for template app
development in the admin portal.
11. Select Promote to confirm your choice.
12. Copy this new URL to share outside your tenant for testing. This link is also the one you submit to begin the
process of distributing your app on AppSource by creating a new Partner center offer. Submit only pre-
production links to the Partner center. Only after the app is approved and you get notification that it is
published in AppSource, then you can promote this package to production in Power BI.
13. When your app is ready for production or sharing via AppSource, go back to the Release Management
pane and select Promote app next to Pre-production .
14. Select Promote to confirm your choice.
Now your app is in production, and ready for distribution.
To make your app widely available to thousands of Power BI users in the world, we encourage you to submit it to
AppSource. See the Power BI Application offer for details.
Next steps
See how your customers interact with your template app in Install, customize, and distribute template apps in your
organization.
See the Power BI Application offer for details on distributing your app.
Tips for authoring template apps in Power BI
9/9/2020 • 6 minutes to read • Edit Online
When you're authoring your template app in Power BI, part of it is the logistics of creating the workspace, testing it,
and production. But the other important part is obviously authoring the report and the dashboard. We can break
down the authoring process into four main components. Working on these components helps you create the best
possible template app:
With queries , you connect and transform the data, and define parameters.
In the data model , you create relationships, measures, and Q&A improvements.
Repor t pages include visuals and filters to provide insights into your data.
Dashboards and tiles offer an overview of the insights included.
Sample data makes your app discoverable immediately after installation.
You may be familiar with each piece as existing Power BI features. When building a template app, there are
additional things to consider for each piece. See each section below for more details.
Queries
For template apps, queries developed in Power BI Desktop are used to connect to your data source and import
data. These queries are required to return a consistent schema and are supported for Scheduled Data refresh
(DirectQuery isn't supported).
Connect to your API
To get started, you need to connect to your API from Power BI Desktop to start building your queries.
You can use the Data Connectors that are available in Power BI Desktop to connect to your API. You can use the
Web Data Connector (Get Data -> Web) to connect to your Rest API or the OData connector (Get Data -> OData
feed) to connect to your OData feed.
NOTE
Currently template apps do not support custom connectors, it is recommended to explore using Odatafeed Auth 2.0 as a
mitigation for some of the connection use-cases or to submit your connector for certification. For details on how to develop
a connector and certify it check the Data Connectors documentation.
NOTE
Template apps support all parameters except Any and Binary.
Data models
A well-defined data model ensures your customers can easily and intuitively interact with the template app. Create
the data model in Power BI Desktop.
NOTE
You should do much of the basic modeling (typing, column names) in the queries.
Q&A
The modeling also affects how well Q&A can provide results for your customers. Ensure you add synonyms to
commonly used columns and you've properly named your columns in the queries.
Additional data model tips
Make sure you've:
Applied formatting to all value columns. Apply types in the query.
Applied formatting to all measures.
Set default summarization. Especially "Do Not Summarize", when applicable (for unique values, for example).
Set data category, when applicable.
Set relationships, as necessary.
Reports
The report pages offer additional insight into the data included in your template app. Use the pages of the reports
to answer the key business questions your template app is trying to address. Create the report using Power BI
Desktop.
Additional report tips
Use more than one visual per page for cross-filtering.
Align the visuals carefully (no overlapping).
Page is set to "4:3" or "16:9" mode for layout.
All of the aggregations presented make numeric sense (averages, unique values).
Slicing produces rational results.
Logo is present on at least the top report.
Elements are in the client's color scheme to the extent possible.
Dashboards
The dashboard is the main point of interaction with your template app for your customers. It should include an
overview of the content included, especially the important metrics for your business scenario.
To create a dashboard for your template app, just upload your PBIX through Get Data > Files or publish directly
from Power BI Desktop.
Additional dashboard tips
Maintain the same theme when pinning so that the tiles on your dashboard are consistent.
Pin a logo to the theme so consumers know where the pack is from.
Suggested layout to work with most screen resolutions is 5-6 small tiles wide.
All dashboard tiles should have appropriate titles/subtitles.
Consider groupings in the dashboard for different scenarios, either vertically or horizontally.
Sample data
Template apps, as part of the app creation stage, wraps the cache data in the workspace as part of the app:
Allows the installer to understand the functionality and purpose of the app before connecting data.
Creates an experience that drives the installer to further explore app capabilities, which leads to connecting the
app dataset.
We recommend having quality sample data before creating the app. ensure the app report and dashboards are
populated with data.
Publishing on AppSource
Template apps can be published on AppSource, follow these guidelines before submitting your app to AppSource:
Make sure you create a template app with engaging sample data that can help the installer understand what the
app can do (empty report & dashboard aren't approved). Template apps support sample data only apps, make
sure to check the static app checkbox. Learn more
Have instruction for the validation team to follow which includes credentials and parameters that are required
to connect to data.
Application must include an App icon in Power BI and on your CPP offer. Learn more
Landing page configured. Learn more
Make sure to follow the documentation on Partner center -> Power BI App offer.
In case a dashboard is part of your app, make sure it's not empty.
Install the app using the app link before submitting it, make sure you can connect the dataset and the app
experience is as you planned.
Before uploading pbix into the template workspace, make sure to unload any unnecessary connections.
Follow Power BI Best design practices for reports and visuals to achieve maximum impact on your users and
getting approved for distribution.
Are you a Power BI analyst? If so, this article explains how you can install template apps to connect to many of the
services you use to run your business, such as Salesforce, Microsoft Dynamics, and Google Analytics. You can then
modify the template app's pre-built dashboard and reports to suit the needs of your organization, and distribute
them to your colleagues as apps.
If you're interested in creating template apps yourself for distribution outside your organization, see Create a
template app in Power BI. With little or no coding, Power BI partners can build Power BI apps and make them
available to Power BI customers.
Prerequisites
To install, customize, and distribute a template app, you need:
A Power BI pro license.
Permissions to install template apps on your tenant.
A valid installation link for the app, which you get either from AppSource or from the app creator.
A good familiarity with the basic concepts of Power BI .
3. When you find the template app you're looking for, click it. The template app offer will display. Click GET IT
NOW .
4. In the dialog box that appears, select Install .
The app is installed, along with a workspace of the same name that has all the artifacts needed for further
customization.
NOTE
If you use an installation link for an app that isn't listed on AppSource, a validation dialog box will ask you to confirm
your choice.
To be able to install a template app that is not listed on AppSource, you need to request the relevant permissions
from your admin. See the Template app settings in Power BI admin portal for details.
When the installation finishes successfully, a notification tells you that your new app is ready.
Connect to data
1. Select Go to app .
2. On the Get star ted with your new app window, select Explore .
Once you've finished filling out the connection dialogs, the connection process starts. A banner informs you
that the data is being refreshed, and that in the meantime you are viewing sample data.
Your report data will automatically refresh once a day, unless you disabled this during the sign-in process.
You can also set up your own refresh schedule to keep the report data up to date if you so desire.
To install the update, either click Get it on the notification banner or in the notification center, or find the app
again in AppSource and choose Get it now . If you got a direct link for the update from the Template app creator,
simply click the link.
You will be asked whether you wish to overwrite the current version, or to install the new version in a new
workspace. By default, "overwrite" is selected.
Over write an existing version: Overwrites the existing workspace with the updated version of the
template app. See details about overwriting.
Install to a new workspace: Installs a fresh version of the workspace and app that you need to
reconfigure (that is, connect to data, define navigation and permissions).
Overwrite behavior
Overwriting updates the reports, dashboards, and dataset inside the workspace, not the app. Overwriting
doesn't change app navigation, setup, and permissions.
After you update the workspace, you need to update the app to apply changes from the
workspace to the app .
Overwriting keeps configured parameters and authentication. After update, an automatic dataset refresh
starts. During this refresh, the app, repor ts, and dashboards present sample data .
Overwriting always presents sample data until the refresh is complete. If the template app author made
changes to the dataset or parameters, users of the workspace and app will not see the new data until the
refresh is complete. Rather, they will continue to see sample data during this time.
Overwriting never deletes new reports or dashboards you've added to the workspace. It only overwrites
the original reports and dashboards with changes from the original author.
IMPORTANT
Remember to update the app after overwriting to apply changes to the reports and dashboard for your organizational app
users.
Next steps
Create workspaces with your colleagues in Power BI
Update, delete, and extract template app
9/9/2020 • 3 minutes to read • Edit Online
Now that your app is in production, you can start over in the test phase, without disrupting the app in production.
Extract workspace
Rolling back to the previous version of a template app is now easier than ever with the extract capability. The
following steps will extract a specific app version from various release stages into a new workspace:
1. In the release management pane, press more (...) and then Extract .
2. In dialog box, enter the name for extracted workspace. a new workspace will be added.
Your new workspace versioning resets and you can continue to develop and distribute the template app from the
newly extracted workspace.
Next steps
See how your customers interact with your template app in Install, customize, and distribute template apps in your
organization.
See the Power BI Application offer for details on distributing your app.
Template apps samples
9/9/2020 • 2 minutes to read • Edit Online
The purpose of this document is sharing with Power BI users template apps samples. Use them for personal use or
for redistribution on AppSource. The Samples are in pbix file format and can be authored with Power BI desktop.
Next steps
What are Power BI template apps?
Troubleshooting refresh scenarios
9/9/2020 • 4 minutes to read • Edit Online
Here you can find information regarding different scenarios you may face when refreshing data within the Power
BI service.
NOTE
If you encounter a scenario that is not listed below, and it's causing you issues, you can ask for further assistance on the
community site, or you can create a support ticket.
You should always ensure that basic requirements for refresh are met and verified. These basic requirements
include:
Verify the gateway version is up to date
Verify the report has a gateway selected - if not, the datasource may have changed or might be missing
Once you've confirmed those requirements are met, take a look through the following sections for more
troubleshooting.
Email notifications
If you're coming to this article from an email notification, and you no longer want to receive emails about refresh
issues, contact your Power BI admin. Ask them to remove your email or an email list you're subscribed to from the
appropriate datasets in Power BI. They can do this from the following area in the Power BI admin portal.
Refresh fails when updating data from sources that use AAD OAuth
The Azure Active Directory (AAD ) OAuth token, used by many different data sources, expires in approximately
one hour. You can run into situations where loading data takes longer than the token expiration (more than one
hour), since the Power BI service waits for up to two hours when loading data. In that situation, the data loading
process can fail with a credentials error.
Data sources that use AAD OAuth include Microsoft Dynamics CRM Online , SharePoint Online (SPO), and
others. If you’re connecting to such data sources, and get a credentials failure when loading data takes more than
an hour, this may be the reason.
Microsoft is investigating a solution that allows the data loading process to refresh the token and continue.
However, if your Dynamics CRM Online or SharePoint Online instance (or other AAD OAuth data source) is so
large that it can run into the two-hour data-load threshold, you may experience a data load timeout from the
Power BI service as well.
Also note that, for refresh to work properly, when connecting to a SharePoint Online data source using AAD
OAuth, you must use the same account that you use to sign in to the Power BI ser vice .
Next steps
Data refresh in Power BI
Troubleshooting the On-premises data gateway
Troubleshooting the Power BI Gateway - Personal
More questions? Try asking the Microsoft Power BI Community
Troubleshooting unsupported data source for refresh
9/9/2020 • 2 minutes to read • Edit Online
You may see an error when trying to configured a dataset for scheduled refresh.
You cannot schedule refresh for this dataset because it gets data from sources that currently don’t
support refresh.
This happens when the data source you used, within Power BI Desktop, isn’t supported for refresh. You will need to
find the data source that you are using and compare that against the list of supported data sources at Refresh data
in Power BI.
5. Compare the provider with the list of supported data sources found in Power BI data sources.
NOTE
For refresh issues related to dynamic data sources, including data sources that include hand-authored queries, see refresh
and dynamic data sources.
Next steps
Data Refresh
Power BI Gateway - Personal
On-premises data gateway
Troubleshooting the On-premises data gateway
Troubleshooting the Power BI Gateway - Personal
More questions? Try asking the Power BI Community
Troubleshooting scheduled refresh for Azure SQL
Databases in Power BI
9/9/2020 • 2 minutes to read • Edit Online
For detailed information about refresh, see Refresh data in Power BI and Configure scheduled refresh.
While setting up scheduled refresh for Azure SQL database, if you get an error with error code 400 when editing
the credentials, try the following to set up the appropriate firewall rule:
1. Sign in to the Azure portal.
2. Go to the Azure SQL database for which you're configuring refresh.
3. At the top of the Over view blade, select Set ser ver firewall .
4. On the Firewall settings blade, make sure that Allow access to Azure ser vices is set to ON .
There may be times when using Analyze in Excel that you get an unexpected result, or the feature doesn't work as
you expected. This page provides solutions for common issues when using Analyze in Excel.
NOTE
There's a separate page dedicated to describing and enabling Analyze in Excel.
If you encounter a scenario that is not listed below, and it is causing you issues, you can ask for further assistance on the
community site, or you can create a support ticket.
Alternatively, if the new version you are installing is newer than the version on your computer, the following dialog
appears:
If you see the dialog prompting you to upgrade, you should continue with the installation to get the most recent
version of the OLE DB provider installed in your computer.
Forbidden error
Some users have more than one Power BI account, and when Excel attempts to connect to Power BI using existing
credentials, it may use credentials that do not have access to the dataset or report you want to access.
When this occurs, you may receive an error titled Forbidden , which means you may be signed into Power BI with
credentials that do not have permissions to the dataset. After encountering the forbidden error, when prompted to
enter your credentials, use the credentials that have permission to access the dataset you're trying to use.
If you still run into errors, log into Power BI with the account that has permission, and verify that you can view and
access the dataset in Power BI that you're attempting to access in Excel.
No data models
If you encounter an error that states Can't find OL AP cube model , then the dataset you're trying to access has
no data model, and therefore cannot be analyzed in Excel.
Next steps
Analyze in Excel
Tutorial: Create your own measures in Power BI Desktop
Measures in PowerPivot
Create a Measure in PowerPivot
Add worksheet data to a Data Model using a linked table
Error: We couldn't find any data in your Excel
workbook
9/9/2020 • 2 minutes to read • Edit Online
NOTE
This article applies to Excel 2007 and later.
When you import an Excel workbook into Power BI, you may see the following error:
Error: We couldn't find any data formatted as a table. To import from Excel into the Power BI service, you need to
format the data as a table. Select all the data you want in the table and press Ctrl+T.
Quick solution
1. Edit your workbook in Excel.
2. Select the range of cells that contain your data. The first row should contain your column headers (the column
names).
3. Press Ctrl + T to create a table.
4. Save your workbook.
5. Return to Power BI and import your workbook again, or if you're working in Excel 2016 and you've saved your
workbook to OneDrive for Business, in Excel, click File > Publish.
Details
Cause
In Excel, you can create a table out of a range of cells, which makes it easier to sort, filter, and format data.
When you import an Excel workbook, Power BI looks for these tables and imports them into a dataset; if it doesn't
find any tables, you'll see this error message.
Solution
1. Open your workbook in Excel.
NOTE
The pictures here are of Excel 2013. If you're using a different version, things may look a little different, but the steps
are the same.
2. Select the range of cells that contain your data. The first row should contain your column headers (the
column names):
3. In the ribbon on the INSERT tab, click Table . (Or, as a shortcut, press Ctrl + T .)
4. You'll see the following dialog. Make sure My table has headers is checked, and select OK :
9. Import your Excel workbook again. This time, the import should find the table and succeed.
If the import still fails, let us know by clicking **Community **in the help menu:
How to refresh your Xero content pack credentials if
refresh failed
9/9/2020 • 2 minutes to read • Edit Online
If you use the Xero Power BI content pack, you may have experienced some problems with the content pack’s daily
refresh due to a recent Power BI service incident.
You can see if your content pack refreshed successfully by checking the last refresh status for your Xero dataset as
shown in the screenshot below.
If you do see that refresh failed as shown above, please follow these steps to renew your content pack credentials.
1. Click More options (...) next to your Xero dataset, then click Schedule refresh . This opens the settings
page for the Xero content pack.
2. In the Settings for Xero page, select Data source credentials > Edit credentials .
3. Enter your organization’s name > Next .
6. You can also choose to refresh the dataset immediately. Click More options (...) next to your Xero dataset,
then click Refresh now .
If you are still having refresh issues, please don’t hesitate to reach out to us at https://support.powerbi.com
To learn more about the Xero content pack for Power BI, please visit the Xero content pack help page.
Next steps
More questions? Try the Power BI Community
Connect to the services you use with Power BI
9/9/2020 • 2 minutes to read • Edit Online
With Power BI, you can connect to many of the services you use to run your business, such as Salesforce, Microsoft
Dynamics, and Google Analytics. Power BI starts by using your credentials to connect to the service. It creates a
Power BI workspace with a dashboard and a set of Power BI reports that automatically show your data and provide
visual insights about your business.
IMPORTANT
Service content packs are being replaced by Template apps. As of September 25, 2019, a number of content packs have
already been deprecated. Any deprecated content pack that you have installed will remain in your account, but no
documentation or support will be provided for it, nor will it be possible to install it again.
Sign in to Power BI to view all of the services you can connect to.
After you install the app, you can view the dashboard and reports in the app and the workspace in the Power BI
service (https://app.powerbi.com). You can also view them in the Power BI mobile apps. In the workspace, you can
modify the dashboard and reports to meet the needs of your organization, and then distribute them to your
colleagues as an app.
Get started
1. Select Apps in the nav pane > select Get apps in the upper-right corner.
2. In AppSource, select the Apps tab, and search for the service you want.
2. You can ask a question by typing in the Q&A box, or click a tile to open the underlying report.
Change the dashboard and report to fit the needs of your organization. Then distribute your app to your
colleagues
What's included
After connecting to a service, you see a newly created app and workspace with a dashboard, reports, and dataset.
The data from the service is focused on a specific scenario and may not include all the information from the
service. The data is scheduled to refresh automatically once per day. You can control the schedule by selecting the
dataset.
You can also connect to many services in Power BI Desktop, such as Google Analytics, and create your own
customized dashboards and reports.
For more details on connecting to specific services, refer to the individual help pages.
Troubleshooting
Empty tiles
While Power BI is first connecting to the service, you may see an empty set of tiles on your dashboard. If you still
see an empty dashboard after 2 hours, it's likely the connection failed. If you didn't see an error message with
information on correcting the issue, file a support ticket.
Select the question mark icon (? ) in the upper-right corner > Get help .
Missing information
The dashboard and reports include content from the service focused on a specific scenario. If you're looking for a
specific metric in the app and don't see it, add an idea on the Power BI Support page.
Suggesting services
Do you use a service you'd like to suggest for a Power BI app? Go to the Power BI Support page and let us know.
If you're interested in creating template apps to distribute yourself, see Create a template app in Power BI. Power BI
partners can build Power BI apps with little or no coding, and deploy them to Power BI customers.
Next steps
Distribute apps to your colleagues
Create the new workspaces in Power BI
Questions? Try asking the Power BI Community
Connect to the COVID-19 US tracking report
9/9/2020 • 2 minutes to read • Edit Online
This article tells you how to install the template app for the COVID-19 tracking report, and how to connect to the
data sources.
For detailed information about the report itself, including disclaimers and information about the data, see COVID-
19 tracking sample for US state and local governments.
After you've installed the template app and connected to the data sources, you can customize the report as per your
needs. You can then distribute it as an app to colleagues in your organization.
3. When prompted , click Install . Once the app has installed, you will see it on your Apps page.
Connect to data sources
1. Click the icon on your Apps page to open the app.
2. On the splash screen that appears choose Connect .
3. Two sign-in dialogs will appear, one after another. On both, set the privacy level to Public.
The report will connect to the data sources and be populated with up-to-date data. During this time the
activity monitor will turn.
This Power BI app is the report/dashboard artifact in the Microsoft Power Platform solution for Crisis
Communication. It tracks worker location for Crisis Communication app users. The solution combines capabilities
of Power Apps, Power Automate, Teams, SharePoint and Power BI. It can be used on the web, mobile or in Teams.
The dashboard shows emergency managers aggregate data across their health system to help them to make
timely, correct decisions.
This article tells you how to install the app and how to connect to the data sources. For more information about the
Crisis Communication app, see Set up and learn about the Crisis Communication sample template in Power Apps
After you've installed the template app and connected to the data sources, you can customize the report as per your
needs. You can then distribute it as an app to colleagues in your organization.
Prerequisites
Before installing this template app, you must first install and set up the Crisis Communication sample. Installing this
solution creates the datasource references necessary to populate the app with data.
When installing the Crisis Communication sample, take note of the SharePoint list folder path of "CI_Employee
Status" and list ID.
4. Select Install .
Once the app has installed, you see it on your Apps page.
Connect to data sources
1. Select the icon on your Apps page to open the app.
2. On the splash screen, select Explore .
5. In the next dialog that appears, set the authentication method to OAuth2 . You don't have to do anything to
the privacy level setting.
Select Sign in .
2. In the left navigation pane, look for the Hospital Emergency Response Decision Support Dashboard
workspace under Workspaces , and follow the instruction described in the Configure scheduled refresh
article.
Next steps
Set up and learn about the Crisis Communication sample template in Power Apps
Questions? Try asking the Power BI Community
What are Power BI template apps?
Install and distribute template apps in your organization
Connect to GitHub with Power BI
9/9/2020 • 4 minutes to read • Edit Online
This article walks you through pulling your data from your GitHub account with a Power BI template app. The
template app generates a workspace with a dashboard, a set of reports, and a dataset to allow you to explore your
GitHub data. The GitHub app for Power BI shows you insights into your GitHub repository, also known as repo, with
data around contributions, issues, pull requests, and active users.
After you've installed the template app, you can change the dashboard and report. Then you can distribute it as an
app to colleagues in your organization.
Connect to the GitHub template app or read more about the GitHub integration with Power BI.
You can also try the GitHub tutorial. It installs real GitHub data about the public repo for the Power BI
documentation.
NOTE
This template app requires the GitHub account to have access to the repo. More details on requirements below.
This template app does not support GitHub Enterprise.
Once the app has installed, you see it on your Apps page.
4. In the dialog box that appears, enter the repository name and repository owner of the repo. See details on
finding these parameters below. When done, click Next .
5. In the next dialog that appears, make sure the authentication method is set to OAuth2 . You don't have to do
anything to the privacy setting. When you're ready, click Sign in .
6. Enter your GitHub credentials and follow the GitHub authentication process (this step might be skipped if
you're already signed in with your browser).
After you've signed in, the report connects to the data sources and is populated with up-to-date data. During this
time, the activity monitor turns.
Your report data will automatically refresh once a day, unless you disabled this during the sign-in process. You can
also set up your own refresh schedule to keep the report data up to date if you so desire.
TA B L E N A M E DESC RIP T IO N
Issues List all issues for the selected repo and it contains calculations
like total and average time to close an issue, Total open issues,
Total closed issues. This table will be empty when there are no
issues in the repo.
Pull requests This table contains all the Pull Requests for the repo and who
pulled the request. It also contains calculations around how
many open, closed, and total pull requests, how long it took to
pull the requests and how long the average pull request took.
This table will be empty when there are no pull requests in the
repo.
DateTable This table contains dates from today and for years in the past
that allow you to analyze your GitHub data by date.
ContributionPunchCard This table can be used as a contribution punch card for the
selected repo. It shows commits by day of week and hour of
day. This table is not connected to other tables in the model.
TA B L E N A M E DESC RIP T IO N
System requirements
The GitHub account that has access to the repo.
Permission granted to the Power BI for GitHub app during first login. See details below on revoking access.
Sufficient API calls available to pull and refresh the data.
NOTE
This template app does not support Github Enterprise.
De -authorize Power BI
To de-authorize Power BI from being connected to your GitHub repo, you can Revoke access in GitHub. See this
GitHub help topic for details.
Finding parameters
You can determine the owner and repository by looking at the repository in GitHub itself:
The first part "Azure" is the owner and the second part "azure-sdk-for-php" is the repository itself. You see these
same two items in the URL of the repository:
<https://github.com/Azure/azure-sdk-for-php> .
Troubleshooting
If necessary, you can verify your GitHub credentials.
1. In another browser window, go to the GitHub web site and sign in to GitHub. You can see you’re logged in, in the
upper-right corner of the GitHub site.
2. In GitHub, navigate to the URL of the repo you plan to access in Power BI. For example:
https://github.com/dotnet/corefx.
3. Back in Power BI, try connecting to GitHub. In the Configure GitHub dialog box, use the names of the repo and
repo owner for that same repo.
Next steps
Tutorial: Connect to a GitHub repo with Power BI
Create the new workspaces in Power BI
Install and use apps in Power BI
Connect to Power BI apps for external services
Questions? Try asking the Power BI Community
Connect to the Hospital Emergency Response
Decision Support Dashboard
9/9/2020 • 2 minutes to read • Edit Online
The Hospital Emergency Response Decision Support Dashboard template app is the reporting component of the
Microsoft Power Platform solution for healthcare emergency response. The dashboard shows emergency managers
aggregate data across their health system to help them to make timely, correct decisions.
This article tells you how to install the app and how to connect to the data sources. To learn how to use the report
that you will see with this app, see the Hospital Emergency Response Decision Support Dashboard documentation.
After you've installed the template app and connected to the data sources, you can customize the report as per your
needs. You can then distribute it as an app to colleagues in your organization.
Prerequisites
Before installing this template app, you must first install and set up the Hospital Emergency Response Power
Platform solution. Installing this solution creates the datasource references necessary to populate the app with data.
When installing Hospital Emergency Response Power Platform solution, take note of the URL of your Common
Data Service environment instance. You will need it to connect the template app to the data.
4. Select Install .
Once the app has installed, you see it on your Apps page.
Connect to data sources
1. Select the icon on your Apps page to open the app.
2. On the splash screen, select Explore .
5. In the next dialog that appears, set the authentication method to OAuth2 . You don't have to do anything to
the privacy level setting.
Select Sign in .
6. At the Microsoft sign-in screen, sign in to Power BI.
After you've signed in, the report connects to the data sources and is populated with up-to-date data. During
this time, the activity monitor turns.
Schedule report refresh
When the data refresh has completed, set up a refresh schedule to keep the report data up to date.
1. In the top header bar, select Power BI .
2. In the left navigation pane, look for the Hospital Emergency Response Decision Support Dashboard
workspace under Workspaces , and follow the instructions described in the Configure scheduled refresh
article.
Next steps
Understanding the Hospital Emergency Response report
Set up and learn about the Crisis Communication sample template in Power Apps
Questions? Try asking the Power BI Community
What are Power BI template apps?
Install and distribute template apps in your organization
Connect the Microsoft Sustainability Calculator
9/9/2020 • 2 minutes to read • Edit Online
Gain insights into the carbon emissions of your IT infrastructure to make more sustainable computing decisions
The Microsoft Sustainability Calculator provides new insight into carbon emissions data associated with Azure
services. Those responsible for reporting on and driving sustainability within their organizations now have the
ability to quantify the carbon impact of each Azure subscription, as well as see estimated carbon savings from
running those workloads in Azure versus on-premises datacenters. This data may be used for greenhouse gas
reporting of scope 3 emissions. Access to the Microsoft Sustainability Calculator will require your tenant ID and
access key, typically available through your organization’s Azure administrator.
To use this app, you will need information from the Azure Enterprise Portal. Your enterprise’s system administrators
may be able to help you obtain this information. Please review these instructions and obtain the required
information prior to installing the App.
This connector version only supports enterprise enrollments from https://ea.azure.com. China enrollments aren't
currently supported.
How to connect
1. Select Apps in the nav pane > select Get apps in the upper-right corner.
2. In AppSource, select the Apps tab, and search for the service you want.
1. Select Microsoft Sustainability Calculator > Get it now .
2. In Install this Power BI App? select Install .
3. In the Apps pane, select the Microsoft Sustainability Calculator tile.
4. In Get star ted with your new app , select Connect .
5. Enter the Company name, User enrollment number, and Number of months > Sign In. See details
on finding these parameters below.
6. For Authentication method , select Key , and for Privacy level , select Organizational .
7. For Key , enter your Access key > Sign In .
8. The import process begins automatically. When complete, a new dashboard, report, and model appear in the
Navigation Pane . Select the report to view your imported data.
Finding parameters
To find your company Enrollment ID and Access key , work with your Azure administrator to get the required
information. Your administrator will
1. Log into the Azure enterprise Portal, and click on Manage on the left-hand ribbon and obtain the Enrollment
Number as shown below
2. From the Azure Enterprise Portal, click on Repor ts and then API Access Key, as shown below to obtain the
Primary Enrollment Account Key
Analyzing your Office 365 outages and health performance data is easy with Power BI and the Office365Mon
template app. Power BI retrieves your data, including outages and health probes, then builds an out-of-box
dashboard and reports based on that data.
Connect to the Office365Mon template app for Power BI.
NOTE
An Office365Mon admin account is required to connect and load the Power BI template app.
How to connect
1. Select Get Data at the bottom of the nav pane.
5. After Power BI imports the data you will see a new dashboard, report, and dataset in the nav pane. New
items are marked with a yellow asterisk *, select the Office365Mon entry.
What now?
Try asking a question in the Q&A box at the top of the dashboard
Change the tiles in the dashboard.
Select a tile to open the underlying report.
While your dataset will be scheduled to refresh daily, you can change the refresh schedule or try refreshing it on
demand using Refresh Now
Troubleshooting
If you get a "login failed" error after using your Office365Mon subscription credentials to login, then the account
you are using doesn't have permissions to retrieve the Office365Mon data from your account. Verify it is an admin
account and try again.
Next steps
What is Power BI?
Get Data for Power BI
Connect to Power BI Premium Capacity Metrics
9/9/2020 • 2 minutes to read • Edit Online
Monitoring your capacities is essential to making informed decisions on how best to utilize your Premium capacity
resources. The Power BI Premium Capacity Metrics app provides the most in-depth information into how your
capacities are performing.
This article describes how to install the app and connect to data sources. For information about the contents of the
report and how to use it, see Monitor Premium capacities with the app, and the Premium Capacity Metrics app blog
post.
After you've installed the app and connected to the data sources, you can customize the report as per your needs.
You can then distribute it to colleagues in your organization.
NOTE
Installing template apps requires permissions. Contact you tenant admin if you find you don't have sufficient permissions.
NOTE
If you've installed the app previously, you will be asked whether you want to overwrite that installation or install to a
new workspace.
Once the app has installed, you see it on your Apps page.
Connect to data sources
1. Select the icon on your Apps page to open the app.
2. On the splash screen, select Explore .
Note:
The format for half hours should be decimal (for example, 5.5, 2.5, etc.).
5. In the next dialog that appears, you don't have to do anything. Just select Sign in .
6. At the Microsoft sign-in screen, sign in to Power BI.
After you've signed in, the report connects to the data sources and is populated with up-to-date data. During
this time, the activity monitor turns.
Your report data will automatically refresh once a day, unless you disabled this during the sign-in process.
You can also set up your own refresh schedule to keep the report data up to date if you so desire.
Next steps
Monitor Premium capacities with the app
Premium Capacity Metrics app blog post
What are Power BI template apps?
Install and distribute template apps in your organization
Questions? Try asking the Power BI Community
Connect to Project Web App with Power BI
9/9/2020 • 2 minutes to read • Edit Online
Microsoft Project Web App is a flexible online solution for project portfolio management (PPM) and everyday work.
Project Web App enables organizations to get started, prioritize project portfolio investments and deliver the
intended business value. The Project Web App Template App for Power BI allows you to unlock insight from Project
Web App to help manage projects, portfolios and resources.
Connect to the Project Web App Template App for Power BI.
How to connect
1. Select Apps in the nav pane > select Get apps in the upper right corner.
3. In AppSource, select the Apps tab, and search/select Microsoft Project Web App .
4. You will get a message saying - Install this Power BI App? select Install .
5. In the Apps pane, select the Microsoft Project Web App tile.
6. In Get star ted with your new app , select Connect data .
7. In the Project Web App URL text box, enter the URL for the Project Web App (PWA) you want to connect
to. Note this may differ from the example if you have a custom domain. In the PWA Site Language text
box, type the number that corresponds to your PWA site language. Type the single digit '1' for English, '2' for
French, '3' for German, '4' for Portuguese (Brazil), '5' for Portuguese (Portugal) and '6' for Spanish.
8. For Authentication Method, select oAuth2 > Sign In . When prompted, enter your Project Web App
credentials and follow the authentication process.
NOTE
You need to have Portfolio Viewer, Portfolio Manager, or Administrator permissions for the Project Web App you are
connecting to.
9. You’ll see a notification indicating your data is loading. Depending on the size of your account this may take
some time. After Power BI imports the data, you will see the contents of your new workspace. You may need
to refresh the dataset to get the latest updates.
After Power BI imports the data you will see the report with 13 pages and dataset in the nav pane.
10. Once your reports are ready, go ahead and start exploring your Project Web App data! The Template App
comes with 13 rich and detailed reports for the Portfolio Overview (6 report pages), Resource Overview (5
report pages) and Project Status (2 report pages).
What now?
While your dataset will be scheduled to refresh daily, you can change the refresh schedule or try refreshing it on
demand using Refresh Now .
Expand the Template App
Download the GitHub PBIT file to further customize and update the Content Pack.
Next steps
Get started in Power BI
Get data in Power BI
Connect to QuickBooks Online with Power BI
9/9/2020 • 2 minutes to read • Edit Online
When you connect to your QuickBooks Online data from Power BI you immediately get a Power BI dashboard and
Power BI reports that provide insights about your business cash flow, profitability, customers, and more. Use the
dashboard and reports as they are, or customize them to highlight the information you care most about. The data is
refreshed automatically once a day.
Connect to the QuickBooks Online template app for Power BI.
NOTE
To import your QuickBooks Online data into Power BI, you need to be an admin on your QuickBooks Online account and
sign in with your admin account credentials. You can't use this connector with QuickBooks Desktop software.
How to connect
1. Select Apps in the nav pane > select Get apps in the upper-right corner.
2. In AppSource, select the Apps tab, and search for the service you want.
NOTE
You need admin credentials for your QuickBooks Online account.
9. Select the company you would like to connect to Power BI in the next screen.
10. Select Authorize in the next screen to begin the import process. The process can take a few minutes
depending on the size of your company data.
11. After Power BI imports the data, you see the content list for your QuickBooks app: a new dashboard, report,
and dataset.
12. Select the QuickBooks dashboard to start the exploration process. Power BI created this dashboard
automatically to display your imported data.
What now?
Try asking a question in the Q&A box at the top of the dashboard
Change the tiles in the dashboard.
Select a tile to open the underlying report.
While your dataset will be scheduled to refresh daily, you can change the refresh schedule or try refreshing it on
demand using Refresh Now
Troubleshooting
"Oops! An error has occurred"
If you get this message after selecting Authorize :
“Oops! An error has occurred." Close this window and try again.
The application has already been subscribed to by another user for this company. Contact [admin email] to make
changes to this subscription.”
... this error means another admin in your company has already connected to your company data with Power BI.
Ask that admin to share the dashboard with you. Currently, only one admin user can connect a particular
QuickBooks Online company dataset to Power BI. After Power BI creates the dashboard, the admin can share it with
multiple colleagues on the same Power BI tenants.
"This app is not set up to allow connections from your countr y"
Currently Power BI only supports US editions of QuickBooks Online.
Next steps
What is Power BI?
Basic concepts for designers in the Power BI service
Connect to the Regional Emergency Response
Dashboard
9/9/2020 • 2 minutes to read • Edit Online
The Regional Emergency Response Dashboard is the reporting component of the Microsoft Power Platform
Regional Emergency Response solution. Regional organization admins can view the dashboard in their Power BI
tenant, enabling them to quickly view important data and metrics that will help them make efficient decisions.
This article tells you how to install the Regional Emergency Response app using the Regional Emergency Response
Dashboard template app, and how to connect to the data sources.
For detailed information about what is presented in the dashboard, see Get insights.
After you've installed the template app and connected to the data sources, you can customize the report as per your
needs. You can then distribute it as an app to colleagues in your organization.
Prerequisites
Before installing this template app, you must first install and set up the Regional Emergency Response solution.
Installing this solution creates the datasource references necessary to populate the app with data.
When installing Regional Emergency Response solution, take note of the URL of your Common Data Service
environment instance. You will need it to connect the template app to the data.
Once the app has installed, you see it on your Apps page.
4. In the dialog box that appears, type the URL of your Common Data Service environment instance. For
example: https://[myenv].crm.dynamics.com. When done, click Next .
5. In the next dialog that appears, set the authentication method to OAuth2 . You don't have to do anything to
the privacy level setting.
Select Sign in .
After you've signed in, the report connects to the data sources and is populated with up-to-date data. During
this time, the activity monitor turns.
Schedule report refresh
When the data refresh has completed, set up a refresh schedule to keep the report data up to date.
1. In the top header bar, select Power BI .
2. In the left navigation pane, look for the Regional Emergency Response Dashboard workspace under
Workspaces , and follow the instructions described in the Configure scheduled refresh article.
Next steps
Understanding the Regional Emergency Response dashboard
Set up and learn about the Crisis Communication sample template in Power Apps
Questions? Try asking the Power BI Community
What are Power BI template apps?
Install and distribute template apps in your organization
Connect to Salesforce with Power BI
9/9/2020 • 2 minutes to read • Edit Online
With Power BI, you can easily connect to your Salesforce.com account. With this connection, you can retrieve your
Salesforce data and have a dashboard and reports automatically provided.
Read more about the Salesforce integration with Power BI.
How to connect
1. In Power BI, select Get Data at the bottom of the nav pane.
6. Configure what you'd like to import into Power BI using the drop-down option:
Dashboard
Select a predefined dashboard based on a persona (such as Sales Manager ). These dashboards
retrieve a specific set of Salesforce standard data, which doesn't include custom fields.
Repor ts
Select one or more custom reports from your Salesforce account. These reports match your views in
Salesforce and can include data from custom fields or objects.
If you don't see any reports, add or create them in your Salesforce account and try connecting again.
7. Select Connect to begin the import process. During the import, you see a notification showing the import is
in progress. When the import is complete, you see a dashboard, report, and dataset for your Salesforce data
listed in the nav pane.
You can change the dashboard to display your data how you'd like. You can ask questions with Q&A or select a tile
to open the underlying report and edit or remove dashboard tiles.
What now?
Try asking a question in the Q&A box at the top of the dashboard
Edit or remove a tile in the dashboard
Select a tile to open the underlying report
While your dataset is scheduled to refresh daily, you can change the refresh schedule or try refreshing it on
demand using Refresh Now
Troubleshooting
If you come across any errors, review the requirements above.
Signing in to a custom or sandbox domain isn't currently supported.
"Unable to connect to the remote server" message
If you get an "Unable to connect to the remote server" message when trying to connect to your Salesforce account,
see this solution on the following forum: Salesforce Connector sign in Error Message: Unable to connect to the
remote server
Next steps
What is Power BI?
Data sources for the Power BI service
Connect to Smartsheet with Power BI
9/9/2020 • 2 minutes to read • Edit Online
This article walks you through pulling your data from your Smartsheet account with a Power BI template app.
Smartsheet offers an easy platform for collaboration and file sharing. The Smartsheet template app for Power BI
provides a dashboard, reports, and dataset that show an overview of your Smartsheet account. You can also use
Power BI Desktop to connect directly to individual sheets in your account.
After you've installed the template app, you can change the dashboard and report. Then you can distribute it as an
app to colleagues in your organization.
Connect to the Smartsheet template app for Power BI.
NOTE
A Smartsheet admin account is preferred for connecting and loading the Power BI template app as it has additional access.
How to connect
1. Select Apps in the nav pane > select Get apps in the upper-right corner.
2. In AppSource, select the Apps tab, and search for the service you want.
This view is the content list for the workspace. In the upper-right corner, you see Update app . When you're
ready to distribute your app to your colleagues, that's where you'll start.
2. Select Repor ts and Datasets to see the other elements in the workspace.
Read about distributing apps to your colleagues.
What's included
The Smartsheet template app for Power BI includes an overview of your Smartsheet account, such as the number
of workspaces, reports, and sheets you have, when they're modified etc. Admin users also see some information
around the users in their system, such as top sheet creators.
To connect directly to individual sheets in your account, you can use the Smartsheet connector in the Power BI
Desktop.
Next steps
Create the new workspaces in Power BI
Install and use apps in Power BI
COnnect to Power BI apps for external services
Questions? Try asking the Power BI Community
Connect to Xero with Power BI
9/9/2020 • 3 minutes to read • Edit Online
Xero is easy to use online accounting software that's designed specifically for small businesses. Create compelling
visualizations based on your Xero financials with this Power BI template app. Your default dashboard includes many
small business metrics like cash position, revenue vs. expenses, profit loss trend, debtor days, and return on
investment.
Connect to the Xero template app for Power BI or learn more about the Xero and Power BI integration.
How to connect
1. Select Apps in the nav pane > select Get apps in the upper-right corner.
2. In AppSource, select the Apps tab, and search for the service you want.
7. Enter a nickname for the organization associated with your Xero account. Anything will do, it's mostly to
help users with multiple Xero organizations keep them all straight. See details on finding parameters later in
this article.
8. For Authentication Method , select OAuth . When prompted sign into your Xero account and select the
organization to connect to. Once sign-in is complete, select Sign In to start the loading process.
9. After approving, the import process will begin automatically. When complete, a new dashboard, report, and
model will appear in the nav pane. Select the dashboard to view your imported data.
What now?
Try asking a question in the Q&A box at the top of the dashboard
Change the tiles in the dashboard.
Select a tile to open the underlying report.
While your dataset will be scheduled to refresh daily, you can change the refresh schedule or try refreshing it on
demand using Refresh Now
What's included
The template app dashboard includes tiles and metrics that cover a variety of areas, with corresponding reports to
learn more:
A REA DA SH B O A RD T IL ES REP O RT
Profit and loss Monthly profit and loss Profit and Loss
Net profit this fiscal year
Net profit this month
Top expense accounts
The dataset also includes the following tables to customize your reports and dashboards:
Addresses
Alerts
Bank Statement Daily Balance
Bank Statements
Contacts
Expense Claims
Invoice Line Items
Invoices
Items
Month End
Organization
Trial Balance
Xero Accounts
System requirements
The following roles are required to access the Xero template app: "Standard + Reports" or "Advisor".
Finding parameters
Provide a name for your organization to track in Power BI. A specific name allows you to connect to multiple
different organizations. You can't connect to the same organization multiple times, as it will affect the scheduled
refresh.
Troubleshooting
Xero users must have the following roles to access the Xero template app for Power BI: "Standard + Reports" or
"Advisor". The template app relies on the user-based permissions to access reporting data through Power BI.
During the load, the tiles on the dashboard are in a generic loading state. They stay that way until the full load
completes. If you receive a notification that your load completed but the tiles are still loading, try refreshing the
dashboard tiles using the ... in the top right of your dashboard.
If your template app fails to refresh, check if you have connected to the same organization more than once in
Power BI. Xero only allows a single active connection to an organization and you may see an error indicating
your credentials are invalid if you connect to the same one more than once.
For issues connecting the Xero template app for Power BI, like error messages or slow load times, first clear the
cache / cookies and restart the browser, then reconnect to Power BI.
For other issues, file a ticket at https://support.powerbi.com if the issue persists.
Next steps
Get started in Power BI
Get data in Power BI
Connect to Zendesk with Power BI
9/9/2020 • 3 minutes to read • Edit Online
This article walks you through pulling your data from your Zendesk account with a Power BI template app. The
Zendesk app offers a Power BI dashboard and a set of Power BI reports that provide insights about your ticket
volumes and agent performance. The data is refreshed automatically once a day.
After you've installed the template app, you can customize the dashboard and report to highlight the information
you care about most. Then you can distribute it as an app to colleagues in your organization.
Connect to the Zendesk template app or read more about the Zendesk integration with Power BI.
After you've installed the template app, you can change the dashboard and report. Then you can distribute it as an
app to colleagues in your organization.
NOTE
You need a Zendesk Admin account to connect. More details on requirements below.
WARNING
Before Oct 15, 2019, the Zendesk Support Search API allowed for a total of 200,000 results to be received through
pagination of large queries. To align search usage with its intended scope, Zendesk now limits the maximum number of
results returned to 1,000 total results, with a maximum of 100 results per page. However, the current Power BI Zendesk
connector can still create API calls that exceed these new limits, resulting in possibly misleading results.
How to connect
1. Select Apps in the nav pane > select Get apps in the upper-right corner.
2. In AppSource, select the Apps tab, and search for the service you want.
3. Select Zendesk > Get it now .
4. In Install this Power BI App? select Install .
5. In the Apps pane, select the Zendesk tile.
7. Provide the URL associated with your account. The URL has the form https://company.zendesk .com . See
details on finding these parameters below.
8. When prompted, enter your Zendesk credentials. Select oAuth 2 as the Authentication Mechanism and click
Sign In . Follow the Zendesk authentication flow. (If you're already signed in to Zendesk in your browser, you
may not be prompted for credentials.)
NOTE
This template app requires that you connect with a Zendesk Admin account.
This view is the content list for the workspace. In the upper-right corner, you see Update app . When you're
ready to distribute your app to your colleagues, that's where you'll start.
2. Select Repor ts and Datasets to see the other elements in the workspace.
Read about distributing apps to your colleagues.
System requirements
A Zendesk Administrator account is required to access the Zendesk template app. If you're an agent or an end user
and are interested in viewing your Zendesk data, add a suggestion and review the Zendesk connector in the Power
BI Desktop.
Finding parameters
Your Zendesk URL will be the same as the URL you use to sign into your Zendesk account. If you're not sure of your
Zendesk URL, you can use the Zendesk login help.
Troubleshooting
If you're having issues connecting, check your Zendesk URL and confirm you're using a Zendesk administrator
account.
Next steps
Create the new workspaces in Power BI
Install and use apps in Power BI
COnnect to Power BI apps for external services
Questions? Try asking the Power BI Community
On-premises data gateway in-depth
9/9/2020 • 2 minutes to read • Edit Online
NOTE
We recently revised the on-premises data gateway docs. We split them into content that's specific to Power BI and general
content that applies to all services that the gateway supports. You're currently in the Power BI content. To provide feedback
on this article, or the overall gateway docs experience, scroll to the bottom of the article.
We moved the information from this article to several articles across the Power BI and general docs. Follow the
links under each heading to find the relevant content.
Role-based security
See Role-based security.
Row-level security
See Row-level security.
What to do next?
See the articles on data sources:
Manage data sources Manage your data source - Analysis Services
Manage your data source - SAP HANA
Manage your data source - SQL Server
Manage your data source - Oracle
Manage your data source - Import/Scheduled refresh
Sign in account
See Sign in account.
Ports
See Ports.
Next steps
What is the on-premises data gateway?
More questions? Try the Power BI Community
Use personal gateways in Power BI
9/9/2020 • 3 minutes to read • Edit Online
NOTE
We recently revised the on-premises data gateway docs. We split them into content that's specific to Power BI and general
content that applies to all services that the gateway supports. You're currently in the Power BI content. To provide feedback
on this article, or the overall gateway docs experience, scroll to the bottom of the article.
The on-premises data gateway (personal mode) is a version of the on-premises data gateway that works only
with Power BI. You can use a personal gateway to install a gateway on your own computer and gain access to on-
premises data.
NOTE
You can have only one personal mode gateway running for each Power BI user. If you install another personal mode
gateway for the same user, even on a different computer, the most recent installation replaces the existing previous
installation.
The gateway files are installed in "%localappdata%\Microsoft\On-premises data gateway (personal mode). After
the installation finishes successfully and you sign in, you see the following screen.
Use Fast Combine with the personal gateway
Fast Combine on a personal gateway helps you ignore specified privacy levels while executing queries. To enable
Fast Combine to work with the on-premises data gateway (personal mode):
1. Using File Explorer, open the following file:
%localappdata%\Microsoft\On-premises data gateway (personal
mode)\Microsoft.PowerBI.DataMovement.Pipeline.GatewayCore.dll.config
3. After it finishes, the setting takes effect in approximately one minute. To check that it's working properly,
try an on-demand refresh in the Power BI service to confirm that Fast Combine is working.
Next steps
Configuring proxy settings for the on-premises data gateway
More questions? Try the Power BI Community.
Manage data sources
9/9/2020 • 5 minutes to read • Edit Online
NOTE
We recently revised the on-premises data gateway docs. We split them into content that's specific to Power BI and general
content that applies to all services that the gateway supports. You're currently in the Power BI content. To provide feedback
on this article, or the overall gateway docs experience, scroll to the bottom of the article.
Power BI supports many on-premises data sources, and each has its own requirements. A gateway can be used for
a single data source or multiple data sources. For this example, we show you how to add SQL Server as a data
source. The steps are similar for other data sources.
Most data sources management operations can be performed by using APIs as well. For more information, see
REST APIs (Gateways).
2. Select a gateway and then select Add data source . Or, go to Gateways > Add data source .
5. For SQL Server, you choose an Authentication Method of Windows or Basic (SQL Authentication). If you
choose Basic , enter the credentials for your data source.
NOTE
If the selected authentication method is OAuth, any query that runs longer than the OAuth token expiration policy
may fail.
6. Under Advanced settings , you could configure Single Sign-On(SSO) for your data source.
You could either configure Use SSO via Kerberos for DirectQuer y queries or Use SSO via Kerberos for
DirectQuer y And Impor t queries for DirectQuery based Reports and Use SSO via Kerberos for
DirectQuer y And Impor t queries for Refresh based Reports.
If you use the Use SSO via Kerberos for DirectQuer y queries and use this data source for a DirectQuery
based Report, it will use the user that's mapped to the (Azure) Active Directory user that signs in to the Power BI
service. For a Refresh based Report, it will use the credentials that you enter in the Username and Password
fields.
If you use the Use SSO via Kerberos for DirectQuer y And Impor t queries , you do not need to provide any
credentials. If this data source is used for DirectQuery based Report, it will use the user that's mapped to the
(Azure) Active Directory user that signs in to the Power BI service. For a Refresh based Report, it will use the
dataset owner's security context
NOTE
SSO for Import Queries is available only for the list of SSO data sources using Kerberos constrained delegation.
7. Under Advanced settings , optionally configure the privacy level for your data source (doesn't apply to
DirectQuery).
8. Select Add . You see Connection Successful if the process succeeds.
You can now use this data source to include data from SQL Server in your Power BI dashboards and reports.
NOTE
Server and database names must match between Power BI Desktop and the data source within the on-premises data
gateway.
The link between your dataset and the data source in the gateway is based on your server name and database
name. These names must match. For example, if you supply an IP address for the server name, in Power BI
Desktop, you must use the IP address for the data source in the gateway configuration. If you use
SERVER\INSTANCE in Power BI Desktop, you must use the same in the data source configured for the gateway.
If you're listed in the Users tab of the data source configured in the gateway, and the server and database name
match, you see the gateway as an option to use with scheduled refresh.
WARNING
If your dataset contains multiple data sources, each data source must be added in the gateway. If one or more data sources
aren't added to the gateway, you won't see the gateway as available for scheduled refresh.
Limitations
OAuth is a supported authentication scheme only for custom connectors with the on-premises data gateway. You
can't add other data sources that require OAuth. If your dataset has a data source that requires OAuth and this data
source isn't a custom connector, you won't be able to use the gateway for scheduled refresh.
Manage users
After you add a data source to a gateway, you give users and email-enabled security groups access to the specific
data source (not the entire gateway). The data source users list controls only who is allowed to publish reports that
include data from the data source. Report owners can create dashboards, content packs, and apps, and then share
those items with other users.
You can also give users and security groups administrative access to the gateway.
NOTE
Users with access to the data source can associate datasets to the data source, and connect, based on the security options
(either the stored credentials or Single Sign-On) selected while creating a data source.
Remember that you need to add users to each data source that you want to grant access to. Each data source has a
separate list of users. Add users to each data source separately.
Remove users from a data source
On the Users tab for the data source, you can remove users and security groups that use this data source.
Store encrypted credentials in the cloud
When you add a data source to the gateway, you must provide credentials for that data source. All queries to the
data source will run by using these credentials. The credentials are encrypted securely. They use symmetric
encryption so that they can't be decrypted in the cloud before they're stored in the cloud. The credentials are sent
to the machine that runs the gateway, on-premises, where they're decrypted when the data sources are accessed.
Next steps
Manage your data source - Analysis Services
Manage your data source - SAP HANA
Manage your data source - SQL Server
Manage your data source - Oracle
Manage your data source - Import/scheduled refresh
Guidance for deploying a data gateway
More questions? Try the Power BI Community.
Manage your data source - Analysis Services
9/9/2020 • 14 minutes to read • Edit Online
NOTE
We recently revised the on-premises data gateway docs. We split them into content that's specific to Power BI and general
content that applies to all services that the gateway supports. You're currently in the Power BI content. To provide feedback
on this article, or the overall gateway docs experience, scroll to the bottom of the article.
After you install the on-premises data gateway, you need to add data sources that can be used with the gateway.
This article looks at how to work with gateways and SQL Server Analysis Services (SSAS) data sources that are
used either for scheduled refresh or for live connections.
To learn more about how to set up a live connection to Analysis Services, watch this video.
NOTE
If you have an Analysis Services data source, you need to install the gateway on a computer joined to the same
forest/domain as your Analysis Services server.
Fill in the information for the data source, which includes Ser ver and Database . The information that you enter
for Username and Password is used by the gateway to connect to the Analysis Services instance.
NOTE
The Windows account you enter must be a member of the Server Administrator role on the Analysis Services instance
you're connecting to. If this account’s password is set to expire, users could get a connection error if the password isn’t
updated for the data source. To learn more about how credentials are stored, see Store encrypted credentials in the cloud.
After you fill in everything, select Add . You can now use this data source for scheduled refresh or live connections
against an Analysis Services instance that's on-premises. You see Connection Successful if it succeeded.
Advanced settings
Optionally, you can configure the privacy level for your data source. This setting controls how data can be
combined. It's only used for scheduled refresh. The privacy-level setting doesn't apply to live connections. To learn
more about privacy levels for your data source, see Privacy levels (Power Query).
User names with Analysis Services
https://www.youtube.com/embed/Qb5EEjkHoLg
Each time a user interacts with a report connected to Analysis Services, the effective user name is passed to the
gateway and then passed on to your on-premises Analysis Services server. The email address that you use to sign
in to Power BI is passed to Analysis Services as the effective user. It's passed in the connection property
EffectiveUserName.
The email address must match a defined user principal name (UPN) within the local Active Directory domain. The
UPN is a property of an Active Directory account. The Windows account must be present in an Analysis Services
role. If a match can't be found in Active Directory, the sign-in isn't successful. To learn more about Active Directory
and user naming, see User naming attributes.
You can also map your Power BI sign-in name with a local directory UPN.
You see options to add rules and test for a given user.
NOTE
You might change a user that you didn't intend to change. For example, if Replace (original value) is contoso.com and
With (New name) is @contoso.local, all users with a sign-in that contains @contoso.com are then replaced with
@contoso.local. Also, if Replace (Original name) is [email protected] and With (New name) is [email protected], a
user with the sign-in of [email protected] is sent as [email protected].
NOTE
Any manual UPN user mappings defined in the Power BI data source configuration are still applied before the user name
string is sent to the on-premises data gateway.
In the on-premises data gateway with configurable custom user mapping, follow these steps.
1. Find Active Directory to search. You can use automatic or configurable.
2. Look up the attribute of the Active Directory person, such as Email, from the Power BI service. The attribute is
based on an incoming UPN string like [email protected].
3. If the Active Directory lookup fails, it attempts to use the passed-along UPN as EffectiveUser to SSAS.
4. If the Active Directory lookup succeeds, it retrieves UserPrincipalName of that Active Directory person.
5. It passes the UserPrincipalName email as EffectiveUser to SSAS, such as [email protected].
To configure your gateway to perform the Active Directory lookup:
1. Download and install the latest gateway.
2. In the gateway, change the on-premises data gateway service to run with a domain account instead of a
local service account. Otherwise, the Active Directory lookup won’t work properly at runtime. Go to the on-
premises data gateway app on your machine, and then go to Ser vice settings > Change ser vice
account . Make sure you have the recovery key for this gateway because you need to restore it on the
same machine unless you want to create a new gateway instead. Restart the gateway service for the
change to take effect.
3. Go to the gateway’s installation folder, C:\Program Files\On-premises data gateway, as an administrator to
ensure that you have write permissions. Open the
Microsoft.PowerBI.DataMovement.Pipeline.GatewayCore.dll.config file.
4. Edit the following two configuration values according to your Active Directory attribute configurations for
your Active Directory users. The following configuration values are examples. Specify the values based on
your Active Directory configuration. These configurations are case sensitive, so make sure they match the
values in Active Directory.
If no value is provided for the ADServerPath configuration, the gateway uses the default global catalog. You
can also specify multiple values for the ADServerPath. Each value must be separated by a semicolon, as
shown in the following example:
The gateway parses the values for ADServerPath from left to right until it finds a match. If no match is
found, the original UPN is used. Make sure the account that runs the gateway service (PBIEgwService) has
query permissions to all Active Directory servers that you specify in ADServerPath.
The gateway supports two types of ADServerPath, as shown in the following examples:
WinNT
<value="WinNT://usa.domain.corp.contoso.com,computer"/>
GC
5. Restart the on-premises data gateway service for the configuration change to take effect.
Work with mapping rules
To create a mapping rule, enter a value for Original name and New name and then select Add .
Replace (Original name) The email address that you used to sign in to Power BI.
With (New name) The value you want to replace it with. The result of the
replacement is what is passed to the EffectiveUserName
property for the Analysis Services connection.
When you select an item in the list, you can choose to reorder it by using the chevron icons. Or, you can delete the
entry.
Use a wildcard
You can use a wildcard (*) for your Replace (Original name) string. It can only be used on its own and not with
any other string part. Use a wildcard if you want to take all users and pass a single value to the data source. This
approach is useful when you want all users in your organization to use the same user in your local environment.
Test a mapping rule
To validate what an original name is replaced with, enter a value for Original name . Select Test rule .
NOTE
Rules that are saved take a few minutes before the service starts to use them. The rule works immediately in the browser.
Role-based security
Models provide security based on user roles. Roles are defined for a particular model project during authoring in
SQL Server Data Tools – Business Intelligence or, after a model is deployed, by using SQL Server Management
Studio. Roles contain members by Windows user name or by Windows group. Roles define the permissions a user
has to query or perform actions on the model. Most users belong to a role with read permissions. Other roles are
meant for administrators with permissions to process items, manage database functions, and manage other roles.
Row-level security
Row-level security is specific to Analysis Services row-level security. Models can provide dynamic, row-level
security. Unlike having at least one role that users belong to, dynamic security isn't required for any tabular model.
At a high level, dynamic security defines a user’s read access to data right down to a particular row in a particular
table. Similar to roles, dynamic row-level security relies on a user’s Windows user name.
A user’s ability to query and view model data is determined by:
The roles that their Windows user account belong to as a member.
Dynamic row-level security, if it's configured.
Implementing role and dynamic row-level security in models are beyond the scope of this article. To learn more,
see Roles (SSAS tabular) and Security roles (Analysis Services - Multidimensional data) on MSDN. For the most in-
depth understanding of tabular model security, download and read the Securing the tabular BI semantic model
whitepaper.
whoami /upn
The result looks similar to an email address, but it's the UPN that's on your domain account. If you use an Analysis
Services data source for live connections, and if this UPN doesn't match the email address you use to sign in to
Power BI, you might want to look at how to map user names.
NOTE
Synchronizing accounts with the Azure AD Connect tool creates new accounts within your Azure AD tenant.
NOTE
The server and database name must match between Power BI Desktop and the data source within the on-premises data
gateway.
The link between your dataset and the data source within the gateway is based on your server name and database
name. These names must match. For example, if you supply an IP address for the server name within Power BI
Desktop, you must use the IP address for the data source within the gateway configuration. If you use
SERVER\INSTANCE in Power BI Desktop, you also must use it within the data source configured for the gateway.
This requirement is the case for both live connections and scheduled refresh.
Use the data source with live connections
Make sure that the server and database name matches between Power BI Desktop and the configured data source
for the gateway. You also need to make sure your user is listed in the Users tab of the data source to publish live
connection datasets. The selection for live connections occurs within Power BI Desktop when you first import data.
After you publish, either from Power BI Desktop or Get Data , your reports should start to work. It might take
several minutes after you create the data source within the gateway for the connection to be usable.
Use the data source with scheduled refresh
If you're listed in the Users tab of the data source configured within the gateway and the server and database
name match, you see the gateway as an option to use with scheduled refresh.
Next steps
Troubleshooting the on-premises data gateway
Troubleshoot gateways - Power BI
More questions? Try the Power BI Community.
Manage your data source - SAP HANA
9/9/2020 • 2 minutes to read • Edit Online
NOTE
We recently revised the on-premises data gateway docs. We split them into content that's specific to Power BI and general
content that applies to all services that the gateway supports. You're currently in the Power BI content. To provide feedback
on this article, or the overall gateway docs experience, scroll to the bottom of the article.
After you install the on-premises data gateway, you need to add data sources that can be used with the gateway.
This article looks at how to work with gateways and SAP HANA data sources that are used either for scheduled
refresh or for DirectQuery.
After you select the SAP HANA data source type, fill in the Ser ver , Username , and Password information for the
data source.
NOTE
All queries to the data source will run using these credentials. To learn more about how credentials are stored, see Store
encrypted credentials in the cloud.
After you fill in everything, select Add . You can now use this data source for scheduled refresh or DirectQuery
against an SAP HANA server that is on-premises. You see Connection Successful if it succeeded.
Advanced settings
Optionally, you can configure the privacy level for your data source. This setting controls how data can be
combined. It's only used for scheduled refresh. The privacy-level setting doesn't apply to DirectQuery. To learn
more about privacy levels for your data source, see Privacy levels (Power Query).
NOTE
The server and database names must match between Power BI Desktop and the data source within the on-premises data
gateway.
The link between your dataset and the data source within the gateway is based on your server name and database
name. These names must match. For example, if you supply an IP address for the server name within Power BI
Desktop, you must use the IP address for the data source within the gateway configuration. If you use
SERVER\INSTANCE in Power BI Desktop, you also must use it within the data source configured for the gateway.
This requirement is the case for both DirectQuery and scheduled refresh.
Use the data source with DirectQuery connections
Make sure that the server and database names match between Power BI Desktop and the configured data source
for the gateway. You also need to make sure your user is listed in the Users tab of the data source to publish
DirectQuery datasets. The selection for DirectQuery occurs within Power BI Desktop when you first import data.
For more information about how to use DirectQuery, see Use DirectQuery in Power BI Desktop.
After you publish, either from Power BI Desktop or Get Data , your reports should start to work. It might take
several minutes after you create the data source within the gateway for the connection to be usable.
Use the data source with scheduled refresh
If you're listed in the Users tab of the data source configured within the gateway and the server name and
database name match, you see the gateway as an option to use with scheduled refresh.
Next steps
Troubleshooting the on-premises data gateway
Troubleshoot gateways - Power BI
More questions? Try asking the Power BI Community.
Manage your data source - SQL Server
9/9/2020 • 3 minutes to read • Edit Online
NOTE
We recently revised the on-premises data gateway docs. We split them into content that's specific to Power BI and general
content that applies to all services that the gateway supports. You're currently in the Power BI content. To provide feedback
on this article, or the overall gateway docs experience, scroll to the bottom of the article.
After you install the on-premises data gateway, you can add data sources that can be used with the gateway. This
article looks at how to work with gateways and SQL Server data sources that are used either for scheduled refresh
or for DirectQuery.
NOTE
When you use DirectQuery, the gateway supports only SQL Ser ver 2012 SP1 and subsequent versions.
Then fill in the information for the data source, which includes Ser ver and Database .
Under Authentication Method , choose either Windows or Basic . Choose Basic if you plan to use SQL
authentication instead of Windows authentication. Then enter the credentials to be used for this data source.
NOTE
All queries to the data source will run using these credentials, unless Kerberos single sign-on (SSO) is configured and enabled
for the data source. With SSO, import datasets use the stored credentials, but DirectQuery datasets use the current Power BI
user to execute the queries using SSO. To learn more about how credentials are stored, see Store encrypted credentials in the
cloud. Or, see the article that describes how to use Kerberos for single sign-on (SSO) from Power BI to on-premises data
sources.
After you fill in everything, select Add . You can now use this data source for scheduled refresh or DirectQuery
against a SQL Server that's on-premises. You see Connection Successful if it succeeded.
Advanced settings
Optionally, you can configure the privacy level for your data source. This setting controls how data can be
combined. It's only used for scheduled refresh. The privacy-level setting doesn't apply to DirectQuery. To learn
more about privacy levels for your data source, see Privacy levels (Power Query).
NOTE
The server and database names must match between Power BI Desktop and the data source within the on-premises data
gateway.
The link between your dataset and the data source within the gateway is based on your server name and database
name. These names must match. For example, if you supply an IP address for the server name within Power BI
Desktop, you must use the IP address for the data source within the gateway configuration. If you use
SERVER\INSTANCE in Power BI Desktop, you must use it within the data source configured for the gateway.
This requirement is the case for both DirectQuery and scheduled refresh.
Use the data source with DirectQuery connections
Make sure that the server and database names match between Power BI Desktop and the configured data source
for the gateway. You also need to make sure your user is listed in the Users tab of the data source to publish
DirectQuery datasets. The selection for DirectQuery occurs within Power BI Desktop when you first import data.
For more information about how to use DirectQuery, see Use DirectQuery in Power BI Desktop.
After you publish, either from Power BI Desktop or Get Data , your reports should start to work. It might take
several minutes after you create the data source within the gateway for the connection to be usable.
Use the data source with scheduled refresh
If you're listed in the Users tab of the data source configured within the gateway and the server name and
database name match, you see the gateway as an option to use with scheduled refresh.
Next steps
Connect to on-premises data in SQL Server
Troubleshooting the on-premises data gateway
Troubleshoot gateways - Power BI
Use Kerberos for single sign-on (SSO) from Power BI to on-premises data sources
More questions? Try asking the Power BI Community.
Manage your data source - Oracle
9/9/2020 • 5 minutes to read • Edit Online
NOTE
We recently revised the on-premises data gateway docs. We split them into content that's specific to Power BI and general
content that applies to all services that the gateway supports. You're currently in the Power BI content. To provide feedback
on this article, or the overall gateway docs experience, scroll to the bottom of the article.
After you install the on-premises data gateway, you need to add data sources that can be used with the gateway.
This article looks at how to work with gateways and Oracle data sources either for scheduled refresh or for
DirectQuery.
NOTE
Choose a version of Oracle Data Access Client (ODAC) which is compatible with your Oracle Server. For instance, ODAC 12.x
does not always support Oracle Server version 9. Choose the Windows installer of the Oracle Client. During the setup of the
Oracle client, make sure you enable Configure ODP.NET and/or Oracle Providers for ASP.NET at machine-wide level by
selecting the corresponding checkbox during the setup wizard. Some versions of the Oracle client wizard selects the
checkbox by default, others do not. Make sure that checkbox is selected so that Power BI can connect to your Oracle
database.
After the client is installed and ODAC is configured properly, we recommend using PowerBI Desktop or other test
client to verify correct installation and configuration on the Gateway.
NOTE
All queries to the data source will run using these credentials. To learn more about how credentials are stored, see Store
encrypted credentials in the cloud.
After you fill in everything, select Add . You can now use this data source for scheduled refresh or DirectQuery
against an Oracle server that's on-premises. You see Connection Successful if it succeeded.
Advanced settings
Optionally, you can configure the privacy level for your data source. This setting controls how data can be
combined. It's only used for scheduled refresh. The privacy-level setting doesn't apply to DirectQuery. To learn
more about privacy levels for your data source, see Privacy levels (Power Query).
Use the data source
After you create the data source, it's available to use with either DirectQuery connections or through scheduled
refresh.
WARNING
The server and database names must match between Power BI Desktop and the data source within the on-premises data
gateway.
The link between your dataset and the data source within the gateway is based on your server name and database
name. These names must match. For example, if you supply an IP address for the server name within Power BI
Desktop, you must use the IP address for the data source within the gateway configuration. This name also has to
match an alias defined within the tnsnames.ora file. For more information about the tnsnames.ora file, see Install
the Oracle client.
This requirement is the case for both DirectQuery and scheduled refresh.
Use the data source with DirectQuery connections
Make sure that the server and database names match between Power BI Desktop and the configured data source
for the gateway. You also need to make sure your user is listed in the Users tab of the data source to publish
DirectQuery datasets. The selection for DirectQuery occurs within Power BI Desktop when you first import data.
For more information about how to use DirectQuery, see Use DirectQuery in Power BI Desktop.
After you publish, either from Power BI Desktop or Get Data , your reports should start to work. It might take
several minutes after you create the data source within the gateway for the connection to be usable.
Use the data source with scheduled refresh
If you're listed in the Users tab of the data source configured within the gateway and the server name and
database name match, you see the gateway as an option to use with scheduled refresh.
Troubleshooting
You might encounter any of several errors from Oracle when the naming syntax is either incorrect or not
configured properly:
ORA-12154: TNS:could not resolve the connect identifier specified.
ORA-12514: TNS:listener does not currently know of service requested in connect descriptor.
ORA-12541: TNS:no listener.
ORA-12170: TNS:connect timeout occurred.
ORA-12504: TNS:listener was not given the SERVICE_NAME in CONNECT_DATA.
These errors might occur if the Oracle client either isn't installed or isn't configured properly. If it's installed, verify
that the tnsnames.ora file is properly configured and you're using the proper net_service_name. You also need to
make sure that the net_service_name is the same between the machine that uses Power BI Desktop and the
machine that runs the gateway. For more information, see Install the Oracle client.
You might also encounter a compatibility issue between the Oracle server version and the Oracle Data Access
Client version. Typically, you want these versions to match, as some combinations are incompatible. For instance,
ODAC 12.x does not support Oracle Server version 9.
For diagnosing connectivity issues between the data source server and the Gateway machine, we recommend
installing a client(such as PowerBI Desktop or Oracle ODBC Test) on the gateway machine. You can use the client to
check connectivity to the data source server.
For additional troubleshooting information that relates to the gateway, see Troubleshooting the on-premises data
gateway.
Next steps
Troubleshoot gateways - Power BI
Power BI Premium
More questions? Try asking the Power BI Community.
Manage your data source - Import/scheduled refresh
9/9/2020 • 2 minutes to read • Edit Online
NOTE
We recently revised the on-premises data gateway docs. We split them into content that's specific to Power BI and general
content that applies to all services that the gateway supports. You're currently in the Power BI content. To provide feedback
on this article, or the overall gateway docs experience, scroll to the bottom of the article.
After you install the on-premises data gateway, you need to add data sources that can be used with the gateway.
This article looks at how to work with gateways and data sources that are used for scheduled refresh as opposed
to DirectQuery or live connections.
Then fill in the information for the data source, which includes the source information and credentials that are
used to access the data source.
NOTE
All queries to the data source run by using these credentials. To learn more about how credentials are stored, see Store
encrypted credentials in the cloud.
For a list of data source types that can be used with scheduled refresh, see List of available data source types.
After you fill in everything, select Add . You can now use this data source for scheduled refresh with your on-
premises data. You see Connection Successful if it succeeded.
Advanced settings
Optionally, you can configure the privacy level for your data source. This setting controls how data can be
combined. It's only used for scheduled refresh. To learn more about privacy levels for your data source, see
Privacy levels (Power Query).
Use the data source for scheduled refresh
After you create the data source, it's available to use with either DirectQuery connections or through scheduled
refresh.
NOTE
The server and database names must match between Power BI Desktop and the data source within the on-premises data
gateway.
The link between your dataset and the data source within the gateway is based on your server name and
database name. These names must match. For example, if you supply an IP address for the server name within
Power BI Desktop, you must use the IP address for the data source within the gateway configuration. If you use
SERVER\INSTANCE in Power BI Desktop, you also must use it within the data source configured for the gateway.
If you're listed in the Users tab of the data source configured within the gateway and the server name and
database name match, you see the gateway as an option to use with scheduled refresh.
WARNING
If your dataset contains multiple data sources, each data source must be added within the gateway. If one or more data
sources aren't added to the gateway, you won't see the gateway as available for scheduled refresh.
Limitations
OAuth isn't a supported authentication scheme with the on-premises data gateway. You can't add data sources
that require OAuth. If your dataset has a data source that requires OAuth, you can't use the gateway for scheduled
refresh.
Next steps
Troubleshooting the on-premises data gateway
Troubleshoot gateways - Power BI
More questions? Try the Power BI Community.
Merge or append on-premises and cloud data
sources
9/9/2020 • 2 minutes to read • Edit Online
NOTE
We recently revised the on-premises data gateway docs. We split them into content that's specific to Power BI and general
content that applies to all services that the gateway supports. You're currently in the Power BI content. To provide feedback
on this article, or the overall gateway docs experience, scroll to the bottom of the article.
You can use the on-premises data gateway to merge or append on-premises and cloud data sources in the same
query. This solution is helpful when you want to combine data from multiple sources without having to use
separate queries.
NOTE
This article applies only to datasets that have cloud and on-premises data sources merged or appended in a single query. For
datasets that include separate queries--one that connects to an on-premises data source and the other to a cloud data
source--the gateway doesn't execute the query for the cloud data source.
Prerequisites
A gateway installed on a local computer.
A Power BI Desktop file with queries that combine on-premises and cloud data sources.
NOTE
To access any cloud data sources, you must ensure that the gateway has access to those data sources.
1. In the upper-right corner of the Power BI service, select the gear icon > Manage gateways .
4. Under this gateway cluster, add any on-premises data sources used in your queries. You don't need to add
the cloud data sources here.
5. Upload to the Power BI service your Power BI Desktop file with the queries that combine on-premises and
cloud data sources.
6. On the Dataset settings page for the new dataset:
For the on-premises source, select the gateway associated with this data source.
Under Data source credentials , edit the cloud data source credentials, as necessary.
Make sure privacy levels for both cloud and on-premises data sources are set appropriately to ensure the
joins are handled securely.
7. With the cloud credentials set, you can now refresh the dataset by using the Refresh now option. Or, you
can schedule it to refresh periodically.
Next steps
To learn more about data refresh for gateways, see Use the data source for scheduled refresh.
Overview of single sign-on (SSO) for gateways in
Power BI
9/9/2020 • 2 minutes to read • Edit Online
You can get seamless single sign-on connectivity, enabling Power BI reports and dashboards to update in real time
from on-premises data, by configuring your on-premises data gateway. You have the option of configuring your
gateway with either Kerberos constrained delegation or Security Assertion Markup Language (SAML). The on-
premises data gateway supports SSO by using DirectQuery or for Refresh, which connects to on-premises data
sources.
Power BI supports the following data sources:
SQL Server (Kerberos)
SAP HANA (Kerberos and SAML)
SAP BW Application Server (Kerberos)
SAP BW Message Server (Kerberos)
Oracle (Kerberos)
Teradata (Kerberos)
Spark (Kerberos)
Impala (Kerberos)
We don't currently support SSO for M-extensions.
When a user interacts with a DirectQuery report in the Power BI Service, each cross-filter, slice, sort, and report
editing operation can result in queries that execute live against the underlying on-premises data source. When you
configure SSO for the data source, queries execute under the identity of the user that interacts with Power BI (that
is, through the web experience or Power BI mobile apps). Therefore, each user sees precisely the data for which
they have permissions in the underlying data source.
You can also configure a report which is set up for refresh in the Power BI Service to use SSO. When you configure
SSO for this data source, queries execute under the identity of the dataset owner within Power BI. Therefore, the
refresh happens based on the dataset owner's permissions on the underlying data source. Refresh using SSO is
currently enabled only for data sources using Kerberos constrained delegation
Next steps
Now that you understand the basics of enabling SSO through the gateway, read more detailed information about
Kerberos and SAML:
Single sign-on (SSO) - Kerberos
Single sign-on (SSO) - SAML
Configure Kerberos-based SSO from Power BI
service to on-premises data sources
9/9/2020 • 13 minutes to read • Edit Online
Enabling SSO makes it easy for Power BI reports and dashboards to refresh data from on-premises sources
while respecting user-level permissions configured on those sources. Use Kerberos constrained delegation to
enable seamless SSO connectivity.
Prerequisites
Several items must be configured for Kerberos constrained delegation to work properly, including Service
Principal Names (SPN) and delegation settings on service accounts.
Install and configure the Microsoft on-premises data gateway
The on-premises data gateway supports an in-place upgrade, and settings takeover of existing gateways.
Run the gateway Windows service as a domain account
In a standard installation, the gateway runs as the machine-local service account, NT Ser vice\PBIEgwSer vice .
To enable Kerberos constrained delegation, the gateway must run as a domain account, unless your Azure Active
Directory (Azure AD) instance is already synchronized with your local Active Directory instance (by using Azure
AD DirSync/Connect). To switch to a domain account, see change the gateway service account.
NOTE
If Azure AD Connect is configured and user accounts are synchronized, the gateway service doesn't need to perform local
Azure AD lookups at runtime. Instead, you can simply use the local service SID for the gateway service to complete all
required configuration in Azure AD. The Kerberos constrained delegation configuration steps outlined in this article are the
same as the configuration steps required in the Azure AD context. They are applied to the gateway's computer object (as
identified by the local service SID) in Azure AD instead of the domain account.
You can also set the SPN by using the Active Director y Users and Computers MMC snap-in.
Add gateway service account to Windows Authorization and Access Group if required
In certain scenarios the gateway service account must be added to the Windows Authorization and Access
Group. These scenarios include security hardening of the Active Directory environment, and when the gateway
service account and the user accounts that the gateway will impersonate are in separate domains or forests. You
can also add the gateway service account to Windows Authorization and Access Group in situations where the
domain / forest has not been hardened, but it isn't required.
For more information, see Windows Authorization and Access Group.
To complete this configuration step, for each domain that contains Active Directory users you want the gateway
service account to be able to impersonate:
1. Sign in to a computer in the domain, and launch the Active Directory Users and Computers MMC snap-in.
2. Locate the group Windows Authorization and Access Group , which is typically found in the Builtin
container.
3. Double click on the group, and click on the Members tab.
4. Click Add , and change the domain location to the domain that the gateway service account resides in.
5. Type in the gateway service account name and click Check Names to verify that the gateway service account
is accessible.
6. Click OK .
7. Click Apply .
8. Restart the gateway service.
Decide on the type of Kerberos constrained delegation to use
You can configure delegation settings for either standard Kerberos constrained delegation or resource-based
Kerberos constrained delegation. Use resource-based delegation (requires Windows Server 2012 or later) if your
data source belongs to a different domain than your gateway. For more information on the differences between
the two approaches to delegation, see Kerberos constrained delegation overview.
Depending on which approach you want to use, proceed to one of the following sections. Don't complete both
sections:
Configure the gateway service account for standard Kerberos constrained delegation
Configure the gateway service account for resource-based Kerberos constrained delegation.
We'll now set the delegation settings for the gateway service account. There are multiple tools you can use to
perform these steps. Here, we'll use the Active Director y Users and Computers MMC snap-in to administer
and publish information in the directory. It's available on domain controllers by default; on other machines, you
can enable it through Windows feature configuration.
We need to configure Kerberos constrained delegation with protocol transiting. With constrained delegation, you
must be explicit about which services you allow the gateway to present delegated credentials to. For example,
only SQL Server or your SAP HANA server accepts delegation calls from the gateway service account.
This section assumes you have already configured SPNs for your underlying data sources (such as SQL Server,
SAP HANA, SAP BW, Teradata, or Spark). To learn how to configure those data source server SPNs, refer to the
technical documentation for the respective database server and see the section What SPN does your app
require? in the My Kerberos Checklist blog post.
In the following steps, we assume an on-premises environment with two machines in the same domain: a
gateway machine and a database server running SQL Server that has already been configured for Kerberos-
based SSO. The steps can be adopted for one of the other supported data sources, so long as the data source has
already been configured for Kerberos-based single sign-on. For this example, we'll use the following settings:
Active Directory Domain (Netbios): Contoso
Gateway machine name: MyGatewayMachine
Gateway service account: Contoso\GatewaySvc
SQL Server data source machine name: TestSQLSer ver
SQL Server data source service account: Contoso\SQLSer vice
Here's how to configure the delegation settings:
1. With domain administrator rights, open the Active Director y Users and Computers MMC snap-in.
2. Right-click the gateway service account (Contoso\GatewaySvc ), and select Proper ties .
3. Select the Delegation tab.
4. Select Trust this computer for delegation to specified ser vices only > Use any authentication
protocol .
5. Under Ser vices to which this account can present delegated credentials , select Add .
6. In the new dialog box, select Users or Computers .
7. Enter the service account for the data source, and then select OK .
For example, a SQL Server data source can have a service account like Contoso\SQLService. An
appropriate SPN for the data source should have already been set on this account.
8. Select the SPN that you created for the database server.
In our example, the SPN begins with MSSQLSvc. If you added both the FQDN and the NetBIOS SPN for
your database service, select both. You might see only one.
9. Select OK .
You should now see the SPN in the list of services to which the gateway service account can present
delegated credentials.
10. To continue the setup process, proceed to Grant the gateway service account local policy rights on the
gateway machine.
You use resource-based Kerberos constrained delegation to enable single sign-on connectivity for Windows
Server 2012 and later versions. This type of delegation permits front-end and back-end services to be in different
domains. For it to work, the back-end service domain needs to trust the front-end service domain.
In the following steps, we assume an on-premises environment with two machines in different domains: a
gateway machine and a database server running SQL Server that has already been configured for Kerberos-
based SSO. These steps can be adopted for one of the other supported data sources, so long as the data source
has already been configured for Kerberos-based single sign-on. For this example, we'll use the following settings:
Active Directory frontend Domain (Netbios): ContosoFrontEnd
Active Directory backend Domain (Netbios): ContosoBackEnd
Gateway machine name: MyGatewayMachine
Gateway service account: ContosoFrontEnd\GatewaySvc
SQL Server data source machine name: TestSQLSer ver
SQL Server data source service account: ContosoBackEnd\SQLSer vice
Complete the following configuration steps:
1. Use the Active Director y Users and Computers MMC snap-in on the domain controller for the
ContosoFrontEnd domain and verify no delegation settings are applied for the gateway service account.
2. Use Active Director y Users and Computers on the domain controller for the ContosoBackEnd
domain and verify no delegation settings are applied for the back-end service account.
3. In the Attribute Editor tab of the account properties, verify that the msDS-
AllowedToActOnBehalfOfOtherIdentity attribute isn't set.
4. In Active Director y Users and Computers , create a group on the domain controller for the
ContosoBackEnd domain. Add the GatewaySvc gateway service account to the ResourceDelGroup
group.
5. Open a command prompt and run the following commands in the domain controller for the
ContosoBackEnd domain to update the msDS-AllowedToActOnBehalfOfOtherIdentity attribute of
the back-end service account:
$c = Get-ADGroup ResourceDelGroup
Set-ADUser SQLService -PrincipalsAllowedToDelegateToAccount $c
6. In Active Director y Users and Computers , verify that the update is reflected in the Attribute Editor
tab in the properties for the back-end service account.
Grant the gateway service account local policy rights on the gateway
machine
Finally, on the machine running the gateway service (MyGatewayMachine in our example), grant the gateway
service account the local policies Impersonate a client after authentication and Act as par t of the
operating system (SeTcbPrivilege) . Perform this configuration with the Local Group Policy Editor
(gpedit.msc ).
1. On the gateway machine, run gpedit.msc .
2. Go to Local Computer Policy > Computer Configuration > Windows Settings > Security
Settings > Local Policies > User Rights Assignment .
3. Under User Rights Assignment , from the list of policies, select Impersonate a client after
authentication .
4. Right-click the policy, open Proper ties , and then view the list of accounts.
The list must include the gateway service account (Contoso\GatewaySvc or
ContosoFrontEnd\GatewaySvc depending on the type of constrained delegation).
5. Under User Rights Assignment , select Act as par t of the operating system (SeTcbPrivilege) from
the list of policies. Ensure that the gateway service account is included in the list of accounts.
6. Restart the On-premises data gateway service process.
Set user-mapping configuration parameters on the gateway machine (if necessary)
If you don't have Azure AD Connect configured, follow these steps to map a Power BI service user to a local
Active Directory user. Each Active Directory user mapped in this way needs to have SSO permissions for your
data source. For more information, see Guy in a Cube video.
1. Open the main gateway configuration file, Microsoft.PowerBI.DataMovement.Pipeline.GatewayCore.dll. By
default, this file is stored at C:\Program Files\On-premises data gateway.
2. Set ADUserNameLookupProper ty to an unused Active Directory attribute. We'll use
msDS-cloudExtensionAttribute1 in the steps that follow. This attribute is available only in Windows Server
2012 and later.
3. Set ADUserNameReplacementProper ty to SAMAccountName and then save the configuration file.
4. From the Ser vices tab of Task Manager, right-click the gateway service and select Restar t .
5. For each Power BI service user you want to enable Kerberos SSO for, set the
msDS-cloudExtensionAttribute1 property of a local Active Directory user (with SSO permission to your
data source) to the full username (UPN) of the Power BI service user. For example, if you sign in to Power
BI service as [email protected] and you want to map this user to a local Active Directory user with SSO
permissions, say, [email protected], set this user's msDS-cloudExtensionAttribute1 attribute to
[email protected].
You can set the msDS-cloudExtensionAttribute1 property with the Active Directory Users and Computers
MMC snap-in:
a. As a domain administrator, launch Active Director y Users and Computers .
b. Right-click the domain name, select Find , and then enter the account name of the local Active
Directory user to map.
c. Select the Attribute Editor tab.
Locate the msDS-cloudExtensionAttribute1 property, and double-click it. Set the value to the full
username (UPN) of the user you use to sign in to the Power BI service.
d. Select OK .
e. Select Apply . Verify that the correct value has been set in the Value column.
NOTE
Although other SNC libraries might also work for BW SSO, they aren't officially supported by Microsoft.
Next steps
For more information about the on-premises data gateway and DirectQuery, see the following resources:
What is an on-premises data gateway?
DirectQuery in Power BI
Data sources supported by DirectQuery
DirectQuery and SAP BW
DirectQuery and SAP HANA
Use Kerberos for single sign-on (SSO) to SAP HANA
9/9/2020 • 2 minutes to read • Edit Online
This article describes how to configure your SAP HANA data source to enable SSO from the Power BI service.
NOTE
Before you attempt to refresh a SAP HANA-based report that uses Kerberos SSO, complete both the steps in this article and
the steps in Configure Kerberos SSO.
Next steps
For more information about the on-premises data gateway and DirectQuery, see the following resources:
What is an on-premises data gateway?
DirectQuery in Power BI
Data sources supported by DirectQuery
DirectQuery and SAP BW
DirectQuery and SAP HANA
Use Kerberos single sign-on for SSO to SAP BW
using CommonCryptoLib (sapcrypto.dll)
9/9/2020 • 6 minutes to read • Edit Online
This article describes how to configure your SAP BW data source to enable SSO from the Power BI service by using
CommonCryptoLib (sapcrypto.dll).
NOTE
Before you attempt to refresh a SAP BW-based report that uses Kerberos SSO, complete both the steps in this article and
the steps in Configure Kerberos SSO. Using CommonCryptoLib as your SNC library enables SSO connections to both SAP
BW Application Servers and SAP BW Message Servers.
1. Ensure that your BW server is correctly configured for Kerberos SSO using CommonCryptoLib. If it is, you
can use SSO to access your BW server (either directly or through an SAP BW Message Server) with an SAP
tool like SAP GUI that has been configured to use CommonCryptoLib.
For more information on setup steps, see SAP Single Sign-On: Authenticate with Kerberos/SPNEGO. Your
BW server should use CommonCryptoLib as its SNC Library and have an SNC name that starts with CN=,
such as CN=BW1. For more information on SNC name requirements (specifically, the snc/identity/as
parameter), see SNC Parameters for Kerberos Configuration.
2. If you haven't already done so, install the x64-version of the SAP .NET Connector on the computer the
gateway has been installed on.
You can check whether the component has been installed by attempting to connect to your BW server in
Power BI Desktop from the gateway computer. If you can't connect by using the 2.0 implementation, the .NET
Connector isn't installed or hasn't been installed to the GAC.
3. Ensure that SAP Secure Login Client (SLC) isn't running on the computer the gateway is installed on.
SLC caches Kerberos tickets in a way that can interfere with the gateway's ability to use Kerberos for SSO.
4. If SLC is installed, uninstall it or make sure you exit SAP Secure Login Client. Right-click the icon in the
system tray and select Log Out and Exit before you attempt an SSO connection by using the gateway.
SLC isn't supported for use on Windows Server machines. For more information, see SAP Note 2780475 (s-
user required).
5. If you uninstall SLC or select Log Out and Exit , open a cmd window and enter klist purge to clear any
cached Kerberos tickets before you attempt an SSO connection through the gateway.
6. Download 64-bit CommonCryptoLib (sapcrypto.dll) version 8.5.25 or greater from the SAP Launchpad, and
copy it to a folder on your gateway machine. In the same directory where you copied sapcrypto.dll, create a
file named sapcrypto.ini, with the following content:
ccl/snc/enable_kerberos_in_client_role = 1
The .ini file contains configuration information required by CommonCryptoLib to enable SSO in the gateway
scenario.
NOTE
These files must be stored in the same location; in other words, /path/to/sapcrypto/ should contain both
sapcrypto.ini and sapcrypto.dll.
Both the gateway service user and the Active Directory (AD) user that the service user impersonates need
read and execute permissions for both files. We recommend granting permissions on both the .ini and .dll
files to the Authenticated Users group. For testing purposes, you can also explicitly grant these permissions
to both the gateway service user and the Active Directory user you use for testing. In the following
screenshot we've granted the Authenticated Users group Read & execute permissions for sapcrypto.dll:
7. If you don't already have an SAP BW data source associated with the gateway you want the SSO connection
to flow through, add one on the Manage gateways page in the Power BI service. If you already have such a
data source, edit it:
Choose SAP Business Warehouse as the Data Source Type if you want to create an SSO connection
to a BW Application Server.
Select Sap Business Warehouse Message Ser ver if you want to create an SSO connection to a BW
Message Server.
8. For SNC Librar y , select either the SNC_LIB or SNC_LIB_64 environment variable, or Custom .
If you select SNC_LIB , you must set the value of the SNC_LIB_64 environment variable on the
gateway machine to the absolute path of the 64-bit copy of sapcrypto.dll on the gateway machine.
For example, C:\Users\Test\Desktop\sapcrypto.dll.
If you choose Custom , paste the absolute path to sapcrypto.dll into the Custom SNC Library Path
field that appears on the Manage gateways page.
9. For SNC Par tner Name , enter the SNC Name of the BW server. Under Advanced settings , ensure that
Use SSO via Kerberos for DirectQuer y queries is checked. Fill in the other fields as if you were
establishing a Windows Authentication connection from PBI Desktop.
10. Create a CCL_PROFILE system environment variable and set its value to the path to sapcrypto.ini.
The sapcrypto .dll and .ini files must exist in the same location. In the above example, sapcrypto.ini and
sapcrypto.dll are both located on the desktop.
11. Restart the gateway service.
Troubleshooting
If you're unable to refresh the report in the Power BI service, you can use gateway tracing, CPIC tracing, and
CommonCryptoLib tracing to diagnose the issue. Because CPIC tracing and CommonCryptoLib are SAP products,
Microsoft can't provide support for them.
Gateway logs
1. Reproduce the issue.
2. Open the gateway app, and select Expor t logs from the Diagnostics tab.
CPIC tracing
1. To enable CPIC tracing, set two environment variables: CPIC_TRACE and CPIC_TRACE_DIR .
The first variable sets the trace level and the second variable sets the trace file directory. The directory must
be a location that members of the Authenticated Users group can write to.
2. Set CPIC_TRACE to 3 and CPIC_TRACE_DIR to whichever directory you want the trace files written to. For
example:
3. Reproduce the issue and ensure that CPIC_TRACE_DIR contains trace files.
CPIC tracing can diagnose higher level issues such as a failure to load the sapcrypto.dll library. For example,
here is a snippet from a CPIC trace file where a .dll load error occured:
If you encounter such a failure but you've set the Read & Execute permissions on sapcrypto.dll and
sapcrypto.ini as described in the section above, try setting the same Read & Execute permissions on the
folder that contains the files.
If you're still unable to load the .dll, try turning on auditing for the file. Examining the resulting audit logs in
the Windows Event Viewer might help you determine why the file is failing to load. Look for a failure entry
initiated by the impersonated Active Directory user. For example, for the impersonated user
MYDOMAIN\mytestuser a failure in the audit log would look something like this:
A handle to an object was requested.
Subject:
Security ID: MYDOMAIN\mytestuser
Account Name: mytestuser
Account Domain: MYDOMAIN
Logon ID: 0xCF23A8
Object:
Object Server: Security
Object Type: File
Object Name: <path information>\sapcrypto.dll
Handle ID: 0x0
Resource Attributes: -
Process Information:
Process ID: 0x2b4c
Process Name: C:\Program Files\On-premises data gateway\Microsoft.Mashup.Container.NetFX45.exe
CommonCryptoLib tracing
1. Turn on CommonCryptoLib tracing by adding these lines to the sapcrypto.ini file you created earlier:
ccl/trace/level=5
ccl/trace/directory=<drive>:\logs\sectrace
2. Change the ccl/trace/directory option to a location to which members of the Authenticated Users group
can write.
3. Alternatively, create a new .ini file to change this behavior. In the same directory as sapcrypto.ini and
sapcrypto.dll, create a file named sectrace.ini, with the following content. Replace the DIRECTORY option with
a location on your machine that members of the Authenticated Users group can write to:
LEVEL = 5
DIRECTORY = <drive>:\logs\sectrace
4. Reproduce the issue and verify that the location pointed to by DIRECTORY contains trace files.
5. When you're finished, turn off CPIC and CCL tracing.
For more information on CommonCryptoLib tracing, see SAP Note 2491573 (SAP s-user required).
Next steps
For more information about the on-premises data gateway and DirectQuery, see the following resources:
What is an on-premises data gateway?
DirectQuery in Power BI
Data sources supported by DirectQuery
DirectQuery and SAP BW
DirectQuery and SAP HANA
Use Kerberos for single sign-on (SSO) to SAP BW
using gx64krb5
9/9/2020 • 10 minutes to read • Edit Online
This article describes how to configure your SAP BW data source to enable SSO from the Power BI service by using
gx64krb5.
NOTE
You can complete the steps in this article in addition to the steps in Configure Kerberos SSO to enable SSO-based refresh for
SAP BW Application Server-based reports in Power BI service. However, Microsoft recommends the use of
CommonCryptoLib, not gx64krb5 as your SNC library. SAP no longer supports gx64krb5 and the steps required to configure
it for the gateway are significantly more complex compared to CommonCryptoLib. For information about how to configure
SSO by using CommonCryptoLib, see Configure SAP BW for SSO using CommonCryptoLib. You should use
CommonCryptoLib or gx64krb5 as your SNC library. Do not complete the configuration steps for both libraries.
This guide is comprehensive; if you've already completed some of the described steps, you can skip them. For
example, you might have already configured your SAP BW server for SSO using gx64krb5.
The gx64krb5 library must be used by both the client and server to complete an SSO connection through the
gateway. That is, both the client and server must be using the same SNC library.
1. Download gx64krb5.dll from SAP Note 2115486 (SAP s-user required). Ensure you have at least version
1.0.11.x. Also, download gsskrb5.dll (the 32-bit version of the library) if you want to test the SSO connection
in SAP GUI before you attempt the SSO connection through the gateway (recommended). The 32-bit version
is required to test with SAP GUI because SAP GUI is 32-bit only.
2. Put gx64krb5.dll in a location on your gateway machine that's accessible by your gateway service user. If you
want to test the SSO connection with SAP GUI, also put a copy of gsskrb5.dll on your machine and set the
SNC_LIB environment variable to point to it. Both the gateway service user and the Active Directory (AD)
users that the service user will impersonate need read and execute permissions for the copy of gx64krb5.dll.
We recommend granting permissions on the .dll to the Authenticated Users group. For testing purposes, you
can also explicitly grant these permissions to both the gateway service user and the Active Directory user
you use to test.
3. If your BW server hasn't already been configured for SSO using gx64krb5.dll, put another copy of the .dll on
your SAP BW server machine in a location accessible by the SAP BW server.
For more information on configuring gx64krb5.dll for use with an SAP BW server, see SAP documentation
(SAP s-user required).
4. On the client and server machines, set the SNC_LIB and SNC_LIB_64 environment variables:
If you use gsskrb5.dll, set the SNC_LIB variable to its absolute path.
If you use gx64krb5.dll, set the SNC_LIB_64 variable to its absolute path.
NOTE
This section assumes that you've already created a service user for BW and bound a suitable SPN to it (that is, a name that
begins with SAP/).
b. Double-click the Local Admin group, and select Add to add your service user to the group.
c. Select Check Names to ensure you've entered the name correctly, and then select OK .
2. Set the SAP BW server's service user as the user that starts the SAP BW server service on the SAP BW server
machine:
a. Open Run , and then enter Ser vices.msc .
b. Find the service corresponding to your SAP BW Application Server instance, right-click it, and then
select Proper ties .
c. Switch to the Log on tab, and change the user to your SAP BW service user.
d. Enter the user's password, and then select OK .
3. In SAP Logon, sign in to your server and set the following profile parameters by using the RZ10 transaction:
a. Set the snc/identity/as profile parameter to p:<SAP BW service user you created>. For example,
p:[email protected]. Note that p: precedes the service user's UPN, as opposed to
p:CN=, which precedes the UPN when you use CommonCryptoLib as the SNC library.
b. Set the snc/gssapi_lib profile parameter to <path to gx64krb5.dll on the BW server>. Place the
library in a location that the SAP BW Application Server can access.
c. Set the following additional profile parameters, changing the values as required to fit your needs. The
last five options enable clients to connect to the SAP BW server by using SAP Logon without having
SNC configured.
SET T IN G VA L UE
snc/data_protection/max 3
snc/data_protection/min 1
snc/data_protection/use 9
snc/accept_insecure_cpic 1
snc/accept_insecure_gui 1
snc/accept_insecure_r3int_rfc 1
snc/accept_insecure_rfc 1
snc/permit_insecure_start 1
3. Select the SNC tab. In the SNC name input box, enter p:<your Active Directory user>@<your domain>. For
the SNC name, p: must precede the Active Directory user's UPN. Note that the UPN is case-sensitive.
The Active Directory user you specify should belong to the person or organization for whom you want to
enable SSO access to the SAP BW Application Server. For example, if you want to enable SSO access for the
user [email protected], enter p:[email protected].
4. Select the Save icon (floppy disk image) near the top left of the screen.
5. Fill in the appropriate details on the next screen, including the application server, instance number, and
system ID. Then, select Finish .
6. Right-click the new connection, select Proper ties , and then select the Network tab.
7. In the SNC Name box, enter p:<SAP BW service user's UPN>. For example,
p:[email protected]. Select OK .
8. Double-click the connection you just created to attempt an SSO connection to your SAP BW server.
If this connection succeeds, continue to the next section. Otherwise, review the earlier steps in this document
to make sure they've been completed correctly, or review the Troubleshooting section. If you can't connect to
the SAP BW server via SSO in this context, you won't be able to connect to the SAP BW server by using SSO
in the gateway context.
Troubleshooting
Troubleshoot gx64krb5 configuration
If you encounter any of the following problems, follow these steps to troubleshoot the gx64krb5 installation and
SSO connections:
You encounter errors when you complete the gx64krb5 setup steps. For example, the SAP BW server won't
start after you've changed the profile parameters. View the server logs (…work\dev_w0 on the server
machine) to troubleshoot these errors.
You can't start the SAP BW service due to a sign-on failure. You might have provided the wrong password
when you set the SAP BW start-as user. Verify the password by signing in as the SAP BW service user on a
machine in your Active Directory environment.
You get errors about underlying data source credentials (for example, SQL Server), which prevent the server
from starting, verify that you've granted the service user access to the SAP BW database.
You get the following message: (GSS-API) specified target is unknown or unreachable. This error usually
means you have the wrong SNC name specified. Make sure to use p: only, not p:CN=, to precede the service
user's UPN in the client application.
You get the following message: (GSS-API) An invalid name was supplied. Make sure p: is the value of the
server's SNC identity profile parameter.
You get the following message: (SNC error) the specified module could not be found. This error is often
caused by placing gx64krb5.dll in a location that requires elevated privileges (../administrator rights) to
access.
Troubleshoot gateway connectivity issues
1. Check the gateway logs. Open the gateway configuration application, and select Diagnostics , then Expor t
logs . The most recent errors are at the end of any log files you examine.
2. Turn on SAP BW tracing, and review the generated log files. There are several different types of SAP BW
tracing available (for example, CPIC tracing):
a. To enable CPIC tracing, set two environment variables: CPIC_TRACE and CPIC_TRACE_DIR .
The first variable sets the trace level and the second variable sets the trace file directory. The directory must
be a location that members of the Authenticated Users group can write to.
b. Set CPIC_TRACE to 3 and CPIC_TRACE_DIR to whichever directory you want the trace files written to.
For example:
c. Reproduce the issue and ensure that CPIC_TRACE_DIR contains trace files.
d. Examine the contents of the trace files to determine the blocking issue. For example, you may find that
gx64krb5.dll was not loaded properly, or that an Active Directory user different than the one you were
expecting initiated the SSO connection attempt.
Next steps
For more information about the on-premises data gateway and DirectQuery, see the following resources:
What is an on-premises data gateway?
DirectQuery in Power BI
Data sources supported by DirectQuery
DirectQuery and SAP BW
DirectQuery and SAP HANA
Use Security Assertion Markup Language (SAML) for
SSO from Power BI to on-premises data sources
9/9/2020 • 6 minutes to read • Edit Online
Enabling SSO makes it easy for Power BI reports and dashboards to refresh data from on-premises sources while
respecting user-level permissions configured on those sources. Use Security Assertion Markup Language (SAML)
to enable seamless single sign-on connectivity.
openssl req -new -x509 -newkey rsa:2048 -days 3650 -sha256 -keyout CA_Key.pem -out CA_Cert.pem -
extensions v3_ca
Ensure that the Root CA's private key is secured properly. If it's obtained by a third party, it could be used to
gain unauthorized access to the HANA server.
2. Add the certificate (for example, CA_Cert.pem) to the HANA server's trust store so that the HANA server will
trust any certificates signed by the Root CA you created.
You can find the location of your HANA server's trust store by examining the ssltruststore configuration
setting. If you've followed the instructions in the SAP documentation covering how to configure OpenSSL,
your HANA server might already trust a Root CA you that can reuse. For more information, see How to
Configure Open SSL for SAP HANA Studio to SAP HANA Server. If you have multiple HANA servers for
which you want to enable SAML SSO, make sure that each of the servers trusts this Root CA.
3. Create the gateway IdP's X509 certificate.
For example, to create a certificate-signing request (IdP_Req.pem) and a private key (IdP_Key.pem) that are
valid for a year, execute the following command:
openssl req -newkey rsa:2048 -days 365 -sha256 -keyout IdP_Key.pem -out IdP_Req.pem -nodes
4. Sign the certificate-signing request by using the Root CA you've configured your HANA servers to trust.
For example, to sign IdP_Req.pem using CA_Cert.pem and CA_Key.pem (the certificate and key of the Root
CA), execute the following command:
openssl x509 -req -days 365 -in IdP_Req.pem -sha256 -extensions usr_cert -CA CA_Cert.pem -CAkey
CA_Key.pem -CAcreateserial -out IdP_Cert.pem
The resulting IdP certificate is valid for a year (see the -days option).
Import your IdP's certificate in HANA Studio to create a new SAML Identity Provider:
1. In SAP HANA Studio, right-click your SAP HANA server name, then navigate to Security > Open Security
Console > SAML Identity Provider > OpenSSL Cr yptographic Librar y .
4. Expand Users , and then select the user you want to map your Power BI user to.
5. Select SAML , and then select Configure .
6. Select the identity provider you created in step 2. For External Identity , enter the Power BI user's UPN
(typically the email address the user uses to sign in to Power BI), and then select Add . If you've configured
your gateway to use the ADUserNameReplacementProperty configuration option, enter the value that will
replace the Power BI user's original UPN.
For example, if you set ADUserNameReplacementProperty to SAMAccountName you should enter the
user's SAMAccountName .
Now that you have the gateway's certificate and identity configured, convert the certificate to a pfx format and
configure the gateway to use the certificate:
1. Convert the certificate to pfx format by running the following command. This command names the
resulting .pfx file samlcert.pfx and sets root as its password:
openssl pkcs12 -export -out samltest.pfx -in IdP_Cert.pem -inkey IdP_Key.pem -passin pass:root -passout
pass:root
3. Grant the gateway service account access to the private key of the certificate:
a. On the gateway machine, run the Microsoft Management Console (MMC).
b. Under File , select Add/Remove Snap-in .
c. Select Cer tificates > Add , then select Computer account > Next .
d. Select Local Computer > Finish > OK .
e. Expand Cer tificates > Personal > Cer tificates , and find the certificate.
f. Right-click the certificate and navigate to All Tasks > Manage Private Keys .
g. Add the gateway service account to the list. By default, the account is NT SERVICE\PBIEgwSer vice .
You can find out which account is running the Gateway service by running ser vices.msc and
locating On-premises data gateway ser vice .
Finally, follow these steps to add the certificate thumbprint to the gateway configuration:
1. Run the following PowerShell command to list the certificates on your machine:
Troubleshooting
After you configure SAML-based SSO, you might see the following error in the Power BI portal: The credentials
provided cannot be used for the SapHana source. This error indicates that the SAML credential was rejected by SAP
HANA.
Server-side authentication traces provide detailed information for troubleshooting credential issues on SAP HANA.
Follow these steps to configure tracing for your SAP HANA server:
1. On the SAP HANA server, turn on the authentication trace by running the following query:
5. After the troubleshooting is complete, turn off the authentication trace by running the following query:
Next steps
For more information about the on-premises data gateway and DirectQuery, see the following resources:
What is an on-premises data gateway?
DirectQuery in Power BI
Data sources supported by DirectQuery
DirectQuery and SAP BW
DirectQuery and SAP HANA
Troubleshoot gateways - Power BI
9/9/2020 • 10 minutes to read • Edit Online
NOTE
We recently revised the on-premises data gateway docs. We split them into content that's specific to Power BI and
general content that applies to all services that the gateway supports. You're currently in the Power BI content. To
provide feedback on this article, or the overall gateway docs experience, scroll to the bottom of the article.
This article discusses some common issues when you use the on-premises data gateway with Power BI. If you
encounter an issue that isn't listed here, you can use the Power BI Community site. Or, you can create a
support ticket.
Configuration
Error: Power BI service reported local gateway as unreachable. Restart the gateway and try again.
At the end of configuration, the Power BI service is called again to validate the gateway. The Power BI service
doesn't report the gateway as live. Restarting the Windows service might allow the communication to be
successful. To get more information, you can collect and review the logs as described in Collect logs from the
on-premises data gateway app.
Data sources
Error: Unable to Connect. Details: "Invalid connection credentials"
Within Show details , the error message that was received from the data source is displayed. For SQL Server,
you see something like the following:
Verify that you have the correct username and password. Also, verify that those credentials can successfully
connect to the data source. Make sure the account that's being used matches the authentication method.
Error: Unable to Connect. Details: "Cannot connect to the database"
You were able to connect to the server but not to the database that was supplied. Verify the name of the
database and that the user credential has the proper permission to access that database.
Within Show details , the error message that was received from the data source is displayed. For SQL Server,
you see something like the following:
Cannot open database "AdventureWorks" requested by the login. The login failed. Login failed for user
'username'.
The 'CONTOSO\account' value of the 'EffectiveUserName' XML for Analysis property is not valid.
If the underlying error message is similar to the following, it could mean that the service account for Analysis
Services might be missing the token-groups-global-and-universal (TGGAU) directory attribute.
Domains with pre-Windows 2000 compatibility access have the TGGAU attribute enabled. Most newly created
domains don't enable this attribute by default. For more information, see Some applications and APIs require
access to authorization information on account objects.
To confirm whether the attribute is enabled, follow these steps.
1. Connect to the Analysis Services machine within SQL Server Management Studio. Within the
Advanced connection properties, include EffectiveUserName for the user in question and see if this
addition reproduces the error.
2. You can use the dsacls Active Directory tool to validate whether the attribute is listed. This tool is found
on a domain controller. You need to know what the distinguished domain name is for the account and
pass that name to the tool.
To correct this issue, you must enable TGGAU on the account used for the Analysis Services Windows service.
Another possibility for "The username or password is incorrect."
This error could also be caused if the Analysis Services server is in a different domain than the users and
there isn't a two-way trust established.
Work with your domain administrators to verify the trust relationship between domains.
Unable to see the data gateway data sources in the Get Data experience for Analysis Services from the Power BI service
Make sure that your account is listed in the Users tab of the data source within the gateway configuration. If
you don't have access to the gateway, check with the administrator of the gateway and ask them to verify.
Only accounts in the Users list can see the data source listed in the Analysis Services list.
Error: You don't have any gateway installed or configured for the data sources in this dataset.
Ensure that you've added one or more data sources to the gateway, as described in Add a data source. If the
gateway doesn't appear in the admin portal under Manage gateways , clear your browser cache or sign out
of the service and then sign back in.
Datasets
Error: There is not enough space for this row.
This error occurs if you have a single row greater than 4 MB in size. Determine what the row is from your
data source, and attempt to filter it out or reduce the size for that row.
Error: The server name provided doesn't match the server name on the SQL Server SSL certificate.
This error can occur when the certificate common name is for the server's fully qualified domain name
(FQDN), but you supplied only the NetBIOS name for the server. This situation causes a mismatch for the
certificate. To resolve this issue, make the server name within the gateway data source and the PBIX file use
the FQDN of the server.
Error: You don't see the on-premises data gateway present when you configure scheduled refresh.
A few different scenarios could be responsible for this error:
The server and database name don't match what was entered in Power BI Desktop and the data source
configured for the gateway. These names must be the same. They aren't case sensitive.
Your account isn't listed in the Users tab of the data source within the gateway configuration. You need to
be added to that list by the administrator of the gateway.
Your Power BI Desktop file has multiple data sources within it, and not all of those data sources are
configured with the gateway. You need to have each data source defined with the gateway for the gateway
to show up within scheduled refresh.
Error: The received uncompressed data on the gateway client has exceeded the limit.
The exact limitation is 10 GB of uncompressed data per table. If you're hitting this issue, there are good
options to optimize and avoid it. In particular, reduce the use of highly constant, long string values and
instead use a normalized key. Or, removing the column if it's not in use helps.
Reports
Error: Report could not access the data source because you do not have access to our data source via an
on-premises data gateway.
This error is usually caused by one of the following:
The data source information doesn't match what's in the underlying dataset. The server and database
name need to match between the data source defined for the on-premises data gateway and what you
supply within Power BI Desktop. If you use an IP address in Power BI Desktop, the data source for the on-
premises data gateway needs to use an IP address as well.
There's no data source available on any gateway within your organization. You can configure the data
source on a new or existing on-premises data gateway.
Error: Data source access error. Please contact the gateway administrator.
If this report makes use of a live Analysis Services connection, you could encounter an issue with a value
being passed to EffectiveUserName that either isn't valid or doesn't have permissions on the Analysis
Services machine. Typically, an authentication issue is due to the fact that the value being passed for
EffectiveUserName doesn't match a local user principal name (UPN).
To confirm the effective username, follow these steps.
1. Find the effective username within the gateway logs.
2. After you have the value being passed, validate that it's correct. If it's your user, you can use the
following command from a command prompt to see the UPN. The UPN looks like an email address.
whoami /upn
Optionally, you can see what Power BI gets from Azure Active Directory.
1. Browse to https://developer.microsoft.com/graph/graph-explorer.
2. Select Sign in in the upper-right corner.
3. Run the following query. You see a rather large JSON response.
https://graph.windows.net/me?api-version=1.5
Kerberos
If the underlying database server and on-premises data gateway aren't appropriately configured for Kerberos
constrained delegation, enable verbose logging on the gateway. Then, investigate based on the errors or
traces in the gateway’s log files as a starting point for troubleshooting. To collect the gateway logs for
viewing, see Collect logs from the on-premises data gateway app.
ImpersonationLevel
The ImpersonationLevel is related to the SPN setup or the local policy setting.
Solution
Follow these steps to solve the issue.
1. Set up an SPN for the on-premises gateway.
2. Set up constrained delegation in your Active Directory.
FailedToImpersonateUserException: Failed to create Windows identity for user userid
The FailedToImpersonateUserException happens if you're unable to impersonate on behalf of another user.
This error could also happen if the account you're trying to impersonate is from another domain than the one
the gateway service domain is on. This is a limitation.
Solution
Verify that the configuration is correct as per the steps in the previous "ImpersonationLevel" section.
Ensure that the user ID it's trying to impersonate is a valid Active Directory account.
General error: 1033 error while you parse the protocol
You get the 1033 error when your external ID that's configured in SAP HANA doesn't match the sign-in if the
user is impersonated by using the UPN ([email protected]). In the logs, you see "Original UPN
'[email protected]' replaced with a new UPN '[email protected]'" at the top of the error logs, as seen here:
[DM.GatewayCore] SingleSignOn Required. Original UPN '[email protected]' replaced with new UPN
'[email protected].'
Solution
SAP HANA requires the impersonated user to use the sAMAccountName attribute in Active Directory
(user alias). If this attribute isn't correct, you see the 1033 error.
In the logs, you see the sAMAccountName (alias) and not the UPN, which is the alias followed by the
domain ([email protected]).
[SAP AG ][LIBODBCHDB DLL ][HDBODBC ] Communication link failure:-10709 Connection failed (RTE:[-1]
Kerberos error. Major: "Miscellaneous failure [851968]." Minor: "No credentials are available in the security
package."
You get the "-10709 Connection failed" error message if your delegation isn't configured correctly in Active
Directory.
Solution
Make sure that you have the SAP Hana server on the delegation tab in Active Directory for the
gateway service account.
Refresh history
When you use the gateway for a scheduled refresh, Refresh histor y can help you see what errors occurred.
It can also provide useful data if you need to create a support request. You can view scheduled and on-
demand refreshes. The following steps show how you can get to the refresh history.
1. In the Power BI nav pane, in Datasets , select a dataset. Open the menu, and select Schedule refresh .
Fiddler trace
Fiddler is a free tool from Telerik that monitors HTTP traffic. You can see the back and forth with the Power BI
service from the client machine. This traffic list might show errors and other related information.
Next steps
Troubleshoot the on-premises data gateway
Configure proxy settings for the on-premises data gateway
Manage your data source - Analysis Services
Manage your data source - SAP HANA
Manage your data source - SQL Server
Manage your data source - Import/scheduled refresh
More questions? Try the Power BI Community.
Troubleshooting Power BI gateway (personal mode)
9/9/2020 • 7 minutes to read • Edit Online
NOTE
We recently revised the on-premises data gateway docs. We split them into content that's specific to Power BI and general
content that applies to all services that the gateway supports. You're currently in the Power BI content. To provide
feedback on this article, or the overall gateway docs experience, scroll to the bottom of the article.
The following sections go through some common issues you might come across when you use the Power BI on-
premises data gateway (personal mode).
Installation
Gateway (personal mode) operates on 64-bit versions: If your machine is a 32-bit version, you can't
install the gateway (personal mode). Your operating system has to be a 64-bit version. Install a 64-bit version of
Windows or install the gateway (personal mode) on a 64-bit machine.
Gateway (personal mode) fails to install as a ser vice even though you're a local administrator for
the computer : Installation can fail if the user is in the computer’s local Administrator group, but Group Policy
doesn't allow that username to sign in as a service. Ensure that Group Policy lets a user sign in as a service. We’re
working on a fix for this issue. For more information, see Add the Log on as a service right to an account.
Operation timed out: This message is common if the computer (physical machine or VM) on which you’re
installing the gateway (personal mode) has a single core processor. Close any applications, turn off any non-
essential processes, and try installing again.
Data management gateway or Analysis Ser vices connector can't be installed on the same computer
as gateway (personal mode): If you already have an Analysis Servicesconnector or a data management
gateway installed, you must first uninstall the connector or the gateway. Then, try installing the gateway
(personal mode).
NOTE
If you encounter an issue during installation, the setup logs can provide information to help you resolve the issue. For
more information, see Setup logs.
Proxy configuration: You might see issues with configuring the gateway (personal mode) if your environment
needs the use of a proxy. To learn more about how to configure proxy information, see Configure proxy settings
for the on-premises data gateway.
Schedule refresh
Error : The credential stored in the cloud is missing.
You might get this error in settings for <dataset> if you have a scheduled refresh and then you uninstalled and
reinstalled the gateway (personal mode). When you uninstall a gateway (personal mode), the data source
credentials for a dataset that was configured for refresh are removed from the Power BI service.
Solution: In Power BI, go to the refresh settings for a dataset. In Manage Data Sources , for any data source
with an error, select Edit credentials . Then sign in to the data source again.
Error : The credentials provided for the dataset are invalid. Please update the credentials through a
refresh or in the Data Source Settings dialog to continue.
Solution: If you get a credentials message, it could mean:
The usernames and passwords that you used to sign in to data sources aren't up to date. In Power BI, go to
refresh settings for the dataset. In Manage Data Sources , select Edit credentials to update the
credentials for the data source.
Mashups between a cloud source and an on-premises source, in a single query, fail to refresh in the
gateway (personal mode) if one of the sources is using OAuth for authentication. An example of this issue
is a mashup between CRM Online and a local SQL Server instance. The mashup fails because CRM Online
requires OAuth.
This error is a known issue, and it's being looked at. To work around the problem, have a separate query
for the cloud source and the on-premises source. Then, use a merge or append query to combine them.
Error : Unsuppor ted data source.
Solution: If you get an unsupported data source message in Schedule Refresh settings, it could mean:
The data source isn't currently supported for refresh in Power BI.
The Excel workbook doesn't contain a data model, only worksheet data. Power BI currently only supports
refresh if the uploaded Excel workbook contains a data model. When you import data by using Power Query
in Excel, choose the Load option to load data to a data model. This option ensures that data is imported into a
data model.
Error : [Unable to combine data] <quer y par t>/<…>/<…> is accessing data sources that have
privacy levels, which cannot be used together. Please rebuild this data combination.
Solution: This error is because of the privacy-level restrictions and the types of data sources you're using.
Error : Data source error : We cannot conver t the value "[Table]" to type Table.
Solution: This error is because of the privacy-level restrictions and the types of data sources you're using.
Error : There is not enough space for this row.
Solution: This error occurs if you have a single row greater than 4 MB in size. Find the row from your data
source, and attempt to filter it out or reduce the size for that row.
Data sources
Missing data provider : The gateway (personal mode) operates on 64-bit versions only. It requires a 64-bit
version of the data providers to be installed on the same computer where the gateway (personal mode) is
installed. For example, if the data source in the dataset is Microsoft Access, you must install the 64-bit ACE
provider on the same computer where you installed the gateway (personal mode).
NOTE
If you have a 32-bit version of Excel, you can't install a 64-bit version ACE provider on the same computer.
Windows authentication is not suppor ted for Access database: Power BI currently only supports
Anonymous authentication for the Access database.
Error : Sign-in error when you enter credentials for a data source: If you get an error like this one when
you enter Windows credentials for a data source:
Power BI doesn't currently support Windows authentication for a data source using an ACE OLEDB provider.
Solution: To work around this error, select Anonymous authentication . For a legacy ACE OLEDB provider,
anonymous credentials are equal to Windows credentials.
Tile refresh
If you receive an error when dashboard tiles refresh, see Troubleshooting tile errors.
Setup logs
If the gateway (personal mode) fails to install, you'll see a link to show the setup log. The setup log can show you
details about the failure. These logs are Windows Install logs, also known as MSI logs. They can be fairly complex
and hard to read. Typically, the resulting error is at the bottom, but determining the cause of the error isn't trivial.
It could be a result of errors in a different log. It could also be a result of an error higher up in the log.
Or, you can go to your Temp folder (%temp%) and look for files that start with Power_BI_.
NOTE
Going to %temp% might take you to a subfolder of Temp. The Power_BI_ files are in the root of the Temp directory. You
might need to go up a level or two.
Next steps
Configure proxy settings for the on-premises data gateway- Data refresh
Power BI gateway - Personal
Troubleshooting tile errors
Troubleshooting the on-premises data gateway
More questions? Try asking the Power BI Community.
Use custom data connectors with the on-premises
data gateway
9/9/2020 • 3 minutes to read • Edit Online
NOTE
We recently revised the on-premises data gateway docs. We split them into content that's specific to Power BI and general
content that applies to all services that the gateway supports. You're currently in the Power BI content. To provide feedback
on this article, or the overall gateway docs experience, scroll to the bottom of the article.
With data connectors for Power BI, you can connect to and access data from an application, service, or data source.
You can develop custom data connectors and use them in Power BI Desktop.
To learn more about how to develop custom data connectors for Power BI, see the Data connector SDK GitHub
page. This site includes information on how to get started and samples for Power BI and Power Query.
When you build reports in Power BI Desktop that use custom data connectors, you can use the on-premises data
gateway to refresh those reports from the Power BI service.
Next steps
Manage your data source - Analysis Services
Manage your data source - SAP HANA
Manage your data source - SQL Server
Manage your data source - Oracle
Manage your data source - Import/scheduled refresh
Configure proxy settings for the on-premises data gateway
Use Kerberos for single sign-on (SSO) from Power BI to on-premises data sources
More questions? Try asking the Power BI Community.
Troubleshoot importing Access and Excel .xls files in
Power BI Desktop
9/9/2020 • 3 minutes to read • Edit Online
In Power BI Desktop, both Access databases and early versions of Excel workbooks (.XLS files of type Excel 97-2003)
use the Access Database Engine. There are three common situations that can prevent the Access Database Engine
from working properly.
NOTE
If the installed Access Database Engine bit-version is different from your Microsoft Office installation's bit-version, Office
applications won't be able to use the Access Database Engine.
3. On the download page that appears, choose your language and then select the Download button.
4. On the screen that appears, select the checkbox beside PBIDesktop.msi for the 32-bit version, or
PBIDesktop_x64.msi for the 64-bit version.
In the following screenshot, the 64-bit version is selected.
NOTE
If you use the 32-bit version of Power BI Desktop when creating very large data models, you might experience out-
of-memory issues.
Solution 2
Change the bit-version of Microsoft Office to match the bit-version of your Power BI Desktop installation:
1. Uninstall Microsoft Office
2. Install the version of Office that matches your Power BI Desktop installation.
Solution 3
If the error occurs when you attempt to open an .XLS file (an Excel 97-2003 workbook), you can avoid using the
Access Database Engine by opening the .XLS file in Excel, and saving it as an XLSX file.
Solution 4
If the previous three solutions are not feasible, it's possible to install both versions of the Access Database Engine.
However, this workaround isn't recommended. Although installing both versions will resolve this issue for Power
Query for Excel and Power BI Desktop, it will introduce errors and issues for any application that automatically (by
default) uses the bit-version of the Access Database Engine that was installed first.
To install both bit-versions of the Access Database Engine, follow these steps:
1. Install both bit-versions of the Access Database Engine from the download page.
2. Run each version of the Access Database Engine by using the /passive switch. For example:
c:\users\joe\downloads\AccessDatabaseEngine.exe /passive
c:\users\joe\downloads\AccessDatabaseEngine_x64.exe /passive
In Power BI Desktop, users who installed and are running previous versions of the Power BI On-premises data
gateway can be blocked from opening Power BI Desktop, because of administrative policy restrictions that the
Power BI on-premises gateway placed on named pipes on the local machine.
You can often resolve the issue if you open Power BI Desktop as an administrator before you make the SQL Server
connection.
After you open Power BI Desktop as an administrator and establish the connection, the required DLLs are registered
properly. After that, opening Power BI Desktop as an administrator isn't necessary.
This article targets data modelers developing Power BI DirectQuery models, developed by using either Power BI
Desktop or the Power BI service. It describes how to diagnose performance issues, and how to get more detailed
information to allow reports to be optimized.
Performance Analyzer
It's strongly recommended that any diagnosis of performance issues starts in Power BI Desktop, rather than in
Power BI (the service or Power BI Report Server). It's commonly the case that performance issues are simply based
on the level of performance of the underlying data source, and these are more easily identified and diagnosed in
the much more isolated environment of Power BI Desktop, and initially eliminates certain components (such as the
Power BI gateway). Only if the performance issues are found to not be present with Power BI Desktop should
investigation focus on the specifics of the report in Power BI. The Performance Analyzer is a useful tool for
identifying issues throughout this process.
Similarly, it is recommended to first try to isolate any issues to an individual visual, rather than many visuals on a
page.
Let's say those steps (in the previous paragraphs of this topic) have been taken—we now have a single visual on a
page in Power BI Desktop that is still sluggish. To determine what queries are being sent to the underlying source
by Power BI Desktop, you can use the Performance Analyzer. It's also possible to view traces/diagnostic information
that might be emitted by the underlying data source. Such traces might also contain useful information about the
details of how the query was executed, and how it can be improved.
Further, even in the absence of such traces from the source, it's possible to view the queries sent by Power BI, along
with their execution times, as described next.
Refreshing that visual will result in the T-SQL query shown below the next paragraph. As you can tell, there are
three subqueries for the Web_Sales , Item , and Date_dim model tables. Each of these tables returns all the model
table columns, even though only four columns are actually referenced by the visual. These subqueries (they're
shaded) are exactly the definition of the Power Query queries. Use of subqueries in this manner has not been found
to impact performance, for the data sources so far supported for DirectQuery. Data sources like SQL Server
optimize away the references to unused columns.
One reason Power BI employs this pattern is because you can define a Power Query query to use a specific query
statement. So, it's used "as provided", without an attempt to rewrite it. Note that this patterns restricts using query
statements that use Common Table Expressions (CTEs) and stored procedures. These statements cannot be used in
subqueries.
Gateway performance
For information about troubleshooting gateway performance, read the Troubleshoot gateways - Power BI article.
Next steps
For more information about DirectQuery, check out the following resources:
Use DirectQuery in Power BI Desktop
DirectQuery models in Power BI Desktop
DirectQuery model guidance in Power BI Desktop
Questions? Try asking the Power BI Community
Data types in Power BI Desktop
9/9/2020 • 10 minutes to read • Edit Online
This article describes data types supported in Power BI Desktop and Data Analysis Expressions (DAX).
When you load data into Power BI Desktop, it will attempt to convert the data type of the source column into a data
type that better supports more efficient storage, calculations, and data visualization. For example, if a column of
values you import from Excel has no fractional values, Power BI Desktop will convert the entire column of data to a
Whole Number data type, which is better suited for storing integers.
This concept is important because some DAX functions have special data type requirements. While in many cases
DAX will implicitly convert a data type for you, there are some cases where it will not. For instance, if a DAX
function requires a Date data type and the data type for your column is Text, the DAX function will not work
correctly. So, it’s both important and useful to get the correct data type for a column. Implicit conversions are
described later in this article.
Date/time types
Power BI Desktop supports five Date/Time data types in Query View. Both Date/Time/Timezone and Duration are
converted during load into the model. The Power BI Desktop data model only supports date/time, but they can be
formatted as dates or times independently.
Date/Time – Represents both a date and time value. Underneath the covers, the Date/Time value is stored as a
Decimal Number Type. So you can actually convert between the two. The time portion of a date is stored as a
fraction to whole multiples of 1/300 seconds (3.33 ms). Dates between years 1900 and 9999 are supported.
Date – Represents just a Date (no time portion). When converted into the model, a Date is the same as a
Date/Time value with zero for the fractional value.
Time – Represents just Time (no Date portion). When converted into the model, a Time value is the same as a
Date/Time value with no digits to the left of the decimal place.
Date/Time/Timezone – Represents a UTC Date/Time with a timezone offset. It’s converted into Date/Time when
loaded into the model. The Power BI model doesn't adjust the timezone based on a user's location or locale etc. If a
value of 09:00 is loaded into the model in the USA, it will display as 09:00 wherever the report is opened or
viewed.
Duration – Represents a length of time. It’s converted into a Decimal Number Type when loaded into the model.
As a Decimal Number type it can be added or subtracted from a Date/Time field with correct results. As a Decimal
Number type, you can easily use it in visualizations that show magnitude.
Text type
Text - A Unicode character data string. Can be strings, numbers, or dates represented in a text format. Maximum
string length is 268,435,456 Unicode characters (256 mega characters) or 536,870,912 bytes.
True/false type
True/False – A Boolean value of either a True or False.
Blanks/nulls type
Blank - Is a data type in DAX that represents and replaces SQL nulls. You can create a blank by using the BLANK
function, and test for blanks by using the ISBLANK logical function.
Binary data type
The Binary data type can be used to represent any other data with a binary format. Inside the Query Editor, you can
use it when loading binary files if you convert it to other data types before loading it to the Power BI model. Binary
columns aren't supported in the Power BI data model. It exists in the Data View and Report View menus for legacy
reasons but if you try to load binary columns to the Power BI model you may run into errors.
NOTE
If a binary column is in the output of the steps of a query, attempting to refresh the data through a gateway can cause
errors. It's recommended that you explicitly remove any binary columns as the last step in your queries.
NOTE
Text data types are not included in these tables. When a number is represented as in a text format, in some cases Power BI
will attempt to determine the number type and represent it as a number.
Addition (+)
For example, if a real number is used in an addition operation in combination with currency data, both values are
converted to REAL, and the result is returned as REAL.
Subtraction (-)
In the following table, the row header is the minuend (left side) and the column header is the subtrahend (right
side).
O P ERATO R( - ) IN T EGER C URREN C Y REA L DAT E/ T IM E
For example, if a date is used in a subtraction operation with any other data type, both values are converted to
dates, and the return value is also a date.
NOTE
Data models also support the unary operator, - (negative), but this operator does not change the data type of the operand.
Multiplication (*)
For example, if an integer is combined with a real number in a multiplication operation, both numbers are
converted to real numbers, and the return value is also REAL.
Division (/)
In the following table, the row header is the numerator and the column header is the denominator.
O P ERATO R( / )
( RO W / C O L UM N ) IN T EGER C URREN C Y REA L DAT E/ T IM E
For example, if an integer is combined with a currency value in a division operation, both values are converted to
real numbers, and the result is also a real number.
Comparison operators
In comparison expressions, Boolean values are considered greater than string values and string values are
considered greater than numeric or date/time values; numbers and date/time values are considered to have the
same rank. No implicit conversions are performed for Boolean or string values; BLANK or a blank value is
converted to 0/""/false depending on the data type of the other compared value.
The following DAX expressions illustrate this behavior:
=IF(FALSE()>"true","Expression is true", "Expression is false"), returns "Expression is true"
=IF("12">12,"Expression is true", "Expression is false"), returns "Expression is true"
=IF("12"=12,"Expression is true", "Expression is false"), returns "Expression is false"
Conversions are performed implicitly for numeric or date/time types as described in the following table:
C O M PA RISO N
O P ERATO R IN T EGER C URREN C Y REA L DAT E/ T IM E
BLANK + 5 5 5
Power BI can connect to data by using existing connectors and generic data sources, like ODBC, OData, OLE DB,
Web, CSV, XML, and JSON. Or, developers can enable new data sources with custom data extensions called custom
connectors. Some custom connectors are certified and distributed by Microsoft as certified connectors.
To use non-certified custom connectors that you or a third party have developed, you must adjust the Power BI
Desktop security settings to allow extensions to load without validation or warning. Because this code can handle
credentials, including sending them over HTTP, and ignore privacy levels, you should only use this security setting if
you absolutely trust your custom connectors.
Another option is for the developer to sign the connector with a certificate, and provide the information you need
to use it without changing your security settings. For more information, see About trusted third-party connectors.
Custom connectors
Non-certified custom connectors can range from small business-critical APIs to large industry-specific services that
Microsoft hasn't released a connector for. Many connectors are distributed by vendors. If you need a specific data
connector, contact the vendor.
To use a non-certified custom connector, put the connector .pq, .pqx, .m, or .mez file in the [Documents]\Power BI
Desktop\Custom Connectors folder. If the folder doesn't exist, create it.
Adjust the data extension security settings as follows:
In Power BI Desktop, select File > Options and settings > Options > Security .
Under Data Extensions , select (Not Recommended) Allow any extension to load without validation or
warning . Select OK , and then restart Power BI Desktop.
The default Power BI Desktop data extension security setting is (Recommended) Only allow Microsoft
cer tified and other trusted third-par ty extensions to load . With this setting, if there are non-certified
custom connectors on your system, the Uncer tified Connectors dialog box appears at Power BI Desktop startup,
listing the connectors that can't securely load.
To resolve the error, you can either change your Data Extensions security setting, or remove the uncertified
connectors from your Custom Connectors folder.
Certified connectors
A limited subset of data extensions is considered certified. While Microsoft distributes the connectors, it's not
responsible for their performance or continued function. The third-party developer who created the connector is
responsible for its maintenance and support.
In Power BI Desktop, certified third-party connectors appear in the list in the Get Data dialog box, along with
generic and common connectors. You don't need to adjust security settings to use the certified connectors.
If you would like a custom connector to be certified, ask your vendor to contact [email protected].
Trusted third-party connectors
5/13/2020 • 2 minutes to read • Edit Online
Add a new value under the path specified above. The type should be “Multi-String Value” (REG_MULTI_SZ), and it
should be called “TrustedCertificateThumbprints”
Add the thumbprints of the certificates you want to trust. You can add multiple certificates by using “\0” as a
delimiter, or in the registry editor, right click -> modify and put each thumbprint on a new line. Example thumbprint
is taken from a self-signed certificate.
If you’ve followed the instructions properly, and have been given the proper thumbprint by your developer, you
should now be able to securely trust connectors signed with the associated certificate.