# Table of Contents
- [Connect to data in Power BI - documentation - Power BI | Microsoft Learn](#connect-to-data-in-power-bi-documentation-power-bi-microsoft-learn)
- [Table view in Power BI Desktop - Power BI | Microsoft Learn](#table-view-in-power-bi-desktop-power-bi-microsoft-learn)
- [What are Power BI template apps? - Power BI | Microsoft Learn](#what-are-power-bi-template-apps-power-bi-microsoft-learn)
- [Tutorial: Import and analyze data from a webpage - Power BI | Microsoft Learn](#tutorial-import-and-analyze-data-from-a-webpage-power-bi-microsoft-learn)
- [Tutorial: Connect to on-premises data in SQL Server - Power BI | Microsoft Learn](#tutorial-connect-to-on-premises-data-in-sql-server-power-bi-microsoft-learn)
- [New name for Power BI datasets - Power BI | Microsoft Learn](#new-name-for-power-bi-datasets-power-bi-microsoft-learn)
- [Data sources in Power BI Desktop - Power BI | Microsoft Learn](#data-sources-in-power-bi-desktop-power-bi-microsoft-learn)
- [On-premises data gateway - Power BI | Microsoft Learn](#on-premises-data-gateway-power-bi-microsoft-learn)
- [Use a personal gateway in Power BI - Power BI | Microsoft Learn](#use-a-personal-gateway-in-power-bi-power-bi-microsoft-learn)
- [Create template apps in Power BI - Power BI | Microsoft Learn](#create-template-apps-in-power-bi-power-bi-microsoft-learn)
- [Install, share, and update template apps in your organization with Power BI - Power BI | Microsoft Learn](#install-share-and-update-template-apps-in-your-organization-with-power-bi-power-bi-microsoft-learn)
- [Data refresh in Power BI - Power BI | Microsoft Learn](#data-refresh-in-power-bi-power-bi-microsoft-learn)
- [Configure scheduled refresh - Power BI | Microsoft Learn](#configure-scheduled-refresh-power-bi-microsoft-learn)
- [Incremental refresh for semantic models in Power BI - Power BI | Microsoft Learn](#incremental-refresh-for-semantic-models-in-power-bi-power-bi-microsoft-learn)
- [Troubleshoot refresh scenarios - Power BI | Microsoft Learn](#troubleshoot-refresh-scenarios-power-bi-microsoft-learn)
- [Automate configuration of template app installation - Power BI | Microsoft Learn](#automate-configuration-of-template-app-installation-power-bi-microsoft-learn)
- [Tutorial: Shape and combine data in Power BI Desktop - Power BI | Microsoft Learn](#tutorial-shape-and-combine-data-in-power-bi-desktop-power-bi-microsoft-learn)
- [Real-time streaming in Power BI - Power BI | Microsoft Learn](#real-time-streaming-in-power-bi-power-bi-microsoft-learn)
- [Data types in Power BI Desktop - Power BI | Microsoft Learn](#data-types-in-power-bi-desktop-power-bi-microsoft-learn)
- [Power BI data sources - Power BI | Microsoft Learn](#power-bi-data-sources-power-bi-microsoft-learn)
- [Manage your data source - import and scheduled refresh - Power BI | Microsoft Learn](#manage-your-data-source-import-and-scheduled-refresh-power-bi-microsoft-learn)
- [Tips for authoring template apps in Power BI - Power BI | Microsoft Learn](#tips-for-authoring-template-apps-in-power-bi-power-bi-microsoft-learn)
- [Add or remove a gateway data source - Power BI | Microsoft Learn](#add-or-remove-a-gateway-data-source-power-bi-microsoft-learn)
- [Troubleshoot gateways - Power BI | Microsoft Learn](#troubleshoot-gateways-power-bi-microsoft-learn)
- [Troubleshooting unsupported data source for refresh - Power BI | Microsoft Learn](#troubleshooting-unsupported-data-source-for-refresh-power-bi-microsoft-learn)
- [Query caching in Power BI Premium - Power BI | Microsoft Learn](#query-caching-in-power-bi-premium-power-bi-microsoft-learn)
- [Use DirectQuery in Power BI Desktop - Power BI | Microsoft Learn](#use-directquery-in-power-bi-desktop-power-bi-microsoft-learn)
- [Troubleshooting tile errors - Power BI | Microsoft Learn](#troubleshooting-tile-errors-power-bi-microsoft-learn)
- [Troubleshoot incremental refresh and real-time data - Power BI | Microsoft Learn](#troubleshoot-incremental-refresh-and-real-time-data-power-bi-microsoft-learn)
- [Advanced incremental refresh and real-time data with the XMLA endpoint in Power BI - Power BI | Microsoft Learn](#advanced-incremental-refresh-and-real-time-data-with-the-xmla-endpoint-in-power-bi-power-bi-microsoft-learn)
- [Automate template app installation with an Azure function - Power BI | Microsoft Learn](#automate-template-app-installation-with-an-azure-function-power-bi-microsoft-learn)
- [Quickstart: Connect to data in Power BI Desktop - Power BI | Microsoft Learn](#quickstart-connect-to-data-in-power-bi-desktop-power-bi-microsoft-learn)
- [Semantic model details page - Power BI | Microsoft Learn](#semantic-model-details-page-power-bi-microsoft-learn)
- [DirectQuery in Power BI - Power BI | Microsoft Learn](#directquery-in-power-bi-power-bi-microsoft-learn)
- [Configure incremental refresh for Power BI semantic models - Power BI | Microsoft Learn](#configure-incremental-refresh-for-power-bi-semantic-models-power-bi-microsoft-learn)
- [Get data from files for Power BI - Power BI | Microsoft Learn](#get-data-from-files-for-power-bi-power-bi-microsoft-learn)
- [Troubleshoot Power BI gateway (personal mode) - Power BI | Microsoft Learn](#troubleshoot-power-bi-gateway-personal-mode-power-bi-microsoft-learn)
- [Configure Kerberos-based SSO from Power BI service to on-premises data sources - Power BI | Microsoft Learn](#configure-kerberos-based-sso-from-power-bi-service-to-on-premises-data-sources-power-bi-microsoft-learn)
- [Manage SQL Server Analysis Services data sources - Power BI | Microsoft Learn](#manage-sql-server-analysis-services-data-sources-power-bi-microsoft-learn)
- [Manage your data source - SAP HANA - Power BI | Microsoft Learn](#manage-your-data-source-sap-hana-power-bi-microsoft-learn)
- [Connect to data in Power BI Desktop - Power BI | Microsoft Learn](#connect-to-data-in-power-bi-desktop-power-bi-microsoft-learn)
- [Manage your data source - Oracle - Power BI | Microsoft Learn](#manage-your-data-source-oracle-power-bi-microsoft-learn)
- [Manage a SQL Server data source - Power BI | Microsoft Learn](#manage-a-sql-server-data-source-power-bi-microsoft-learn)
- [Overview of single sign-on for on-premises data gateways - Power BI | Microsoft Learn](#overview-of-single-sign-on-for-on-premises-data-gateways-power-bi-microsoft-learn)
- [Create and share cloud data sources in the Power BI service - Power BI | Microsoft Learn](#create-and-share-cloud-data-sources-in-the-power-bi-service-power-bi-microsoft-learn)
- [DirectQuery for SAP HANA in Power BI - Power BI | Microsoft Learn](#directquery-for-sap-hana-in-power-bi-power-bi-microsoft-learn)
- [Guidance for deploying a data gateway for the Power BI service - Power BI | Microsoft Learn](#guidance-for-deploying-a-data-gateway-for-the-power-bi-service-power-bi-microsoft-learn)
- [DirectQuery and SAP Business Warehouse (BW) in Power BI - Power BI | Microsoft Learn](#directquery-and-sap-business-warehouse-bw-in-power-bi-power-bi-microsoft-learn)
- [Use Kerberos for single sign-on (SSO) to SAP HANA - Power BI | Microsoft Learn](#use-kerberos-for-single-sign-on-sso-to-sap-hana-power-bi-microsoft-learn)
- [Get data from Excel workbook files - Power BI | Microsoft Learn](#get-data-from-excel-workbook-files-power-bi-microsoft-learn)
- [Get data from Power BI Desktop files - Power BI | Microsoft Learn](#get-data-from-power-bi-desktop-files-power-bi-microsoft-learn)
- [Share access to a semantic model - Power BI | Microsoft Learn](#share-access-to-a-semantic-model-power-bi-microsoft-learn)
- [Use Kerberos single sign-on to SAP BW using CommonCryptoLib - Power BI | Microsoft Learn](#use-kerberos-single-sign-on-to-sap-bw-using-commoncryptolib-power-bi-microsoft-learn)
- [Use Security Assertion Markup Language for SSO from Power BI to on-premises data sources - Power BI | Microsoft Learn](#use-security-assertion-markup-language-for-sso-from-power-bi-to-on-premises-data-sources-power-bi-microsoft-learn)
- [Using enhanced semantic model metadata in Power BI Desktop - Power BI | Microsoft Learn](#using-enhanced-semantic-model-metadata-in-power-bi-desktop-power-bi-microsoft-learn)
- [OneLake catalog overview - Microsoft Fabric | Microsoft Learn](#onelake-catalog-overview-microsoft-fabric-microsoft-learn)
- [Build permission for shared semantic models - Power BI | Microsoft Learn](#build-permission-for-shared-semantic-models-power-bi-microsoft-learn)
- [Use Kerberos for single sign-on (SSO) to Teradata - Power BI | Microsoft Learn](#use-kerberos-for-single-sign-on-sso-to-teradata-power-bi-microsoft-learn)
- [Introduction to semantic models across workspaces - Power BI | Microsoft Learn](#introduction-to-semantic-models-across-workspaces-power-bi-microsoft-learn)
- [Test single sign-on (SSO) configuration - Power BI | Microsoft Learn](#test-single-sign-on-sso-configuration-power-bi-microsoft-learn)
- [Create reports based on semantic models from different workspaces - Power BI | Microsoft Learn](#create-reports-based-on-semantic-models-from-different-workspaces-power-bi-microsoft-learn)
- [Active Directory (AD) SSO - Power BI | Microsoft Learn](#active-directory-ad-sso-power-bi-microsoft-learn)
- [Microsoft Entra SSO - Power BI | Microsoft Learn](#microsoft-entra-sso-power-bi-microsoft-learn)
- [Use composite models in Power BI Desktop - Power BI | Microsoft Learn](#use-composite-models-in-power-bi-desktop-power-bi-microsoft-learn)
- [On-premises data gateway FAQ - Power BI | Microsoft Learn](#on-premises-data-gateway-faq-power-bi-microsoft-learn)
- [Connect to cloud data sources in the Power BI service - Power BI | Microsoft Learn](#connect-to-cloud-data-sources-in-the-power-bi-service-power-bi-microsoft-learn)
- [Manage semantic model access permissions - Power BI | Microsoft Learn](#manage-semantic-model-access-permissions-power-bi-microsoft-learn)
- [Get data from comma separated value (CSV) files - Power BI | Microsoft Learn](#get-data-from-comma-separated-value-csv-files-power-bi-microsoft-learn)
- [Semantic model permissions - Power BI | Microsoft Learn](#semantic-model-permissions-power-bi-microsoft-learn)
- [Publish to Power BI from Microsoft Excel - Power BI | Microsoft Learn](#publish-to-power-bi-from-microsoft-excel-power-bi-microsoft-learn)
- [Reduce the size of an Excel workbook to view it in Power BI - Power BI | Microsoft Learn](#reduce-the-size-of-an-excel-workbook-to-view-it-in-power-bi-power-bi-microsoft-learn)
- [Control the use of semantic models across workspaces - Power BI | Microsoft Learn](#control-the-use-of-semantic-models-across-workspaces-power-bi-microsoft-learn)
- [Copy reports from other apps or workspaces - Power BI | Microsoft Learn](#copy-reports-from-other-apps-or-workspaces-power-bi-microsoft-learn)
- [Use OneDrive for work or school links in Power BI Desktop - Power BI | Microsoft Learn](#use-onedrive-for-work-or-school-links-in-power-bi-desktop-power-bi-microsoft-learn)
- [Manage DirectQuery connections to a published semantic model - Power BI | Microsoft Learn](#manage-directquery-connections-to-a-published-semantic-model-power-bi-microsoft-learn)
- [Semantic model modes in the Power BI service - Power BI | Microsoft Learn](#semantic-model-modes-in-the-power-bi-service-power-bi-microsoft-learn)
---
# Connect to data in Power BI - documentation - Power BI | Microsoft Learn
[Skip to main content](#main)
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
[Download Microsoft Edge](https://go.microsoft.com/fwlink/p/?LinkID=2092881)
[More info about Internet Explorer and Microsoft Edge](https://learn.microsoft.com/en-us/lifecycle/faq/internet-explorer-microsoft-edge)
Table of contents Exit focus mode
Read in English[](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/index.yml "Edit This Document")
Table of contents Read in English [Edit](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/index.yml "Edit This Document")
* * *
#### Share via
Facebook x.com LinkedIn Email
Table of contents
Connect to data in Power BI - documentation
===========================================
Power BI documentation provides expert information for connecting to data with tools such as gateways, template apps, and data refresh.
Connect to data in Power BI
---------------------------
### Concept
* [Data sources](desktop-data-sources)
* [Table view in Power BI Desktop](desktop-data-view)
* [New name for Power BI datasets](service-datasets-rename)
### Tutorial
* [Import data from a web page](desktop-tutorial-importing-and-analyzing-data-from-a-web-page)
Gateways
--------
### Concept
* [On-premises data gateways](service-gateway-onprem)
### Tutorial
* [Connect to on-premises SQL Server data](service-gateway-sql-tutorial)
### How-To Guide
* [Use personal gateways](service-gateway-personal-mode)
Template apps
-------------
### Overview
* [What are template apps?](service-template-apps-overview)
### Concept
* [Create template apps](service-template-apps-create)
* [Distribute template apps in your org](service-template-apps-install-distribute)
Refresh data
------------
### Concept
* [Data refresh](refresh-data)
* [Incremental refresh for semantic models](incremental-refresh-overview)
### How-To Guide
* [Configure scheduled refresh](refresh-scheduled-refresh)
---
# Table view in Power BI Desktop - Power BI | Microsoft Learn
Table of contents Exit focus mode
Ask Learn Ask Learn [Read in English](# "Read in English")
Save[](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/desktop-data-view.md "Edit This Document")
Table of contents [Read in English](# "Read in English")
Add Add to plan [Edit](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/desktop-data-view.md "Edit This Document")
* * *
#### Share via
[Facebook](#)
[x.com](#)
[LinkedIn](#)
[Email](#)
* * *
Print
* * *
Note
Access to this page requires authorization. You can try [signing in](#)
or changing directories.
Access to this page requires authorization. You can try changing directories.
Work with Table view in Power BI Desktop
========================================
* Article
* 2025-04-02
* 5 contributors
Feedback
_Table view_ helps you inspect, explore, and understand data in your Power BI Desktop model. It's different from how you view tables, columns, and data in the Power Query Editor. With Table view, you're looking at your data after it has been loaded into the model.
Note
Since Table view shows data after it's loaded into the model, the Table view icon isn't visible if all data sources are based on DirectQuery.
When you're modeling your data, sometimes you want to see what's actually in a table or column without creating a visual on the report canvas. You might want to see right down to the row level. This ability is especially useful when you're creating measures and calculated columns, or you need to identify a data type or data category.
Let's take a closer look at some of the elements found in Table view.
[](media/desktop-data-view/dataview_fullscreen.png#lightbox)
1. **Table view icon**. Select this icon to enter **Table** view.
2. **Data Grid**. This area shows the selected table and all columns and rows in it. Columns hidden from the **Report** view are greyed out. You can right-click on a column for options.
3. **Formula bar**. Enter Data Analysis Expression (DAX) formulas for Measures and Calculated columns.
4. **Search**. Search for a table or column in your model.
5. **Fields list**. Select a table or column to view in the data grid.
Filtering in Table view
-----------------------
You can also filter and sort data in Table view. Each column shows an icon that identifies the sort direction, if applied.

You can filter individual values, or use advanced filtering based on the data in the column.
Note
When a Power BI model is created in a different culture than your current user interface, the search box doesn't appear in the Table view user interface for anything other than text fields. For example, this behavior would apply for a model created in US English that you view in Spanish.
Copying elements in Table view
------------------------------
You can copy various elements of a table in _Table view_ with a few easy steps.
First, you can right-click any cell to access various options, including copying the entire table, copying a specific column, or copying the cell value. To access these features you can right-click on any cell, then select **Copy** from the menu that appears. Options to copy the cell value, the column, or the entire table appear, as shown in the following image.

You can also use the keyboard shortcut by pressing **Ctrl+C**. Copying elements in Table view lets you extract individual cell values directly, eliminating extra steps and making your workflow more efficient.
Related content
---------------
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?](../fundamentals/desktop-what-is-desktop)
* [Query overview with Power BI Desktop](../transform-model/desktop-query-overview)
* [Data types in Power BI Desktop](desktop-data-types)
* [Shape and combine data with Power BI Desktop](desktop-shape-and-combine-data)
* [Common query tasks in Power BI Desktop](../transform-model/desktop-common-query-tasks)
* * *
Feedback
--------
Was this page helpful?
Yes No
[Provide product feedback](https://ideas.fabric.microsoft.com/?forum=2d80fd4a-16cb-4189-896b-e0dac5e08b41)
| [Ask the community](https://community.fabric.microsoft.com/powerbi)
* * *
Additional resources
--------------------
---
# What are Power BI template apps? - Power BI | Microsoft Learn
Table of contents Exit focus mode
Ask Learn Ask Learn [Read in English](# "Read in English")
Save[](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-template-apps-overview.md "Edit This Document")
Table of contents [Read in English](# "Read in English")
Add Add to plan [Edit](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-template-apps-overview.md "Edit This Document")
* * *
#### Share via
[Facebook](#)
[x.com](#)
[LinkedIn](#)
[Email](#)
* * *
Print
* * *
Note
Access to this page requires authorization. You can try [signing in](#)
or changing directories.
Access to this page requires authorization. You can try changing directories.
What are Power BI template apps?
================================
* Article
* 2024-12-16
* 12 contributors
Feedback
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 app to the Partner center. The apps then become publicly available in the [Power BI apps](https://app.powerbi.com/groups/me/getapps/apps)
marketplace and on [the Microsoft commercial marketplace](https://appsource.microsoft.com/?product=power-bi)
. Here's a high-level look at the public template app creation experience.
Power BI Apps marketplace
-------------------------
Power BI template apps allow Power BI Pro or Power BI Premium users to gain immediate insights through prepackaged dashboards and reports that can be connected to live data sources. Many Power BI Apps are already available in the [Power BI Apps](https://app.powerbi.com/groups/me/getapps/apps)
marketplace.
[](https://app.powerbi.com/groups/me/getapps/services/pbi_msprojectonline.pbi-microsoftprojectwebapp)
[](https://app.powerbi.com/groups/me/getapps/services/cia_microsoft365.microsoft-365-usage-analytics)
[](https://app.powerbi.com/groups/me/getapps/services/microsoftdynsmb.businesscentral_sales)
[](https://app.powerbi.com/groups/me/getapps/services/msfp.formsprocustomersatisfaction)
Note
Marketplace apps aren't available for US government cloud instances. For more information, see [Power BI for US government customers](../enterprise/service-govus-overview)
.
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.
| Stage | Power BI Desktop | Power BI service | Partner Center |
| --- | --- | --- | --- |
| **One** | Build a data model and report in a _.pbix_ file | Create a workspace. Import _.pbix_ file. Create a complementary dashboard | Register as a partner |
| **Two** | | Create a test package and run internal validation | |
| **Three** | | Promote the test package to preproduction for validation outside your Power BI tenant, and submit it to AppSource | With your preproduction package, create a Power BI template app offer and start the validation process |
| **Four** | | Promote the preproduction package to production | Go live |
Before you begin
----------------
To create the template app, you need permissions to create one. For more information, see [Template app tenant settings](/en-us/fabric/admin/service-admin-portal-template-app)
.
To publish a template app to the Power BI service and AppSource, you must meet the requirements for [becoming a Partner Center publisher](/en-us/azure/marketplace/become-publisher)
.
High-level steps
----------------
Here are the high-level steps.
1. [Review the requirements](#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. Submit the content to [Partner center](/en-us/azure/marketplace/partner-center-portal/create-power-bi-app-offer)
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. For more information, see [Template app tenant settings](/en-us/fabric/admin/service-admin-portal-template-app)
.
To publish a template app to the Power BI service and AppSource, you must meet the requirements for [becoming a Partner Center publisher](/en-us/azure/marketplace/become-publisher)
.
Note
Template apps submissions are managed in [Partner Center](/en-us/azure/marketplace/partner-center-portal/create-power-bi-app-offer)
. 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.
* Limit semantic model size (rule of thumb: _.pbix_ file < 10MBs). This typically means keeping the size of sample data as small as possible.
* 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.
* If you're an independent software vendor and are distributing your app through your web service, consider automating parameter configuration during installation to make things easier for your customers and to increase the likelihood of a successful installation. For more information, see [Automated configuration of a template app installation](template-apps-auto-install)
.
See [Tips for authoring template apps in Power BI](service-template-apps-tips)
for more suggestions.
Known limitations
-----------------
| Feature | Known Limitation |
| --- | --- |
| Contents: Semantic models | Exactly one semantic model should be present. Only semantic models built into Power BI Desktop (_.pbix_ files) are allowed. Not supported: Semantic models from other template apps, cross-workspace semantic models, paginated reports (_.rdl_ files), and Excel workbooks. |
| Contents: Reports | A single template app can't include more than 20 reports. |
| Contents: Dashboards | Real-time tiles aren't allowed. In other words, no support for push or streaming datasets. |
| Contents: Dataflows | Not supported: Dataflows. |
| Contents from files | Only _.pbix_ files are allowed. Not supported: _.rdl_ files (paginated reports) and Excel workbooks. |
| Data sources | Data sources supported for cloud Scheduled Data refresh are allowed. Not supported: Live connections, on-premises data sources (personal and enterprise gateways aren't supported), real time (no support for push dataset), and composite models. |
| Semantic model: cross-workspace | No cross-workspace semantic models are allowed. |
| Query parameters | Not supported: Parameters of type _Any_, _Date_, or _Binary_ type block refresh operation for semantic model. |
| Incremental refresh | Template apps don't support incremental refresh. |
| Power BI visuals | Only publicly available Power BI visuals are supported. [Organizational Power BI visuals](../developer/visuals/power-bi-custom-visuals-organization)
aren't supported. |
| Sovereign clouds | Template apps aren't available in sovereign clouds. |
| Composite models | Composite models shouldn't be used in the app builder workspace. App installers can use composite models after installing the app. |
| Large semantic model storage format | Large semantic model storage format isn't supported for template apps. |
| Mobile layout | Partial support. Mobile layout positioning of elements is supported. Mobile layout changes to other properties, such as color, are not supported. |
Support
-------
For support during development, use [https://powerbi.microsoft.com/support](https://powerbi.microsoft.com/support)
. We actively monitor and manage this site. Customer incidents quickly find their way to the appropriate team.
Related content
---------------
* [Create a template app](service-template-apps-create)
* * *
Feedback
--------
Was this page helpful?
Yes No
[Provide product feedback](https://ideas.fabric.microsoft.com/?forum=2d80fd4a-16cb-4189-896b-e0dac5e08b41)
| [Ask the community](https://community.fabric.microsoft.com/powerbi)
* * *
Additional resources
--------------------
---
# Tutorial: Import and analyze data from a webpage - Power BI | Microsoft Learn
Table of contents Exit focus mode
Ask Learn Ask Learn [Read in English](# "Read in English")
Save[](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/desktop-tutorial-importing-and-analyzing-data-from-a-web-page.md "Edit This Document")
Table of contents [Read in English](# "Read in English")
Add Add to plan [Edit](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/desktop-tutorial-importing-and-analyzing-data-from-a-web-page.md "Edit This Document")
* * *
#### Share via
[Facebook](#)
[x.com](#)
[LinkedIn](#)
[Email](#)
* * *
Print
* * *
Note
Access to this page requires authorization. You can try [signing in](#)
or changing directories.
Access to this page requires authorization. You can try changing directories.
Tutorial: Analyze webpage data by using Power BI Desktop
========================================================
* Article
* 2024-07-30
* 10 contributors
Feedback
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 webpage 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.
Connect to a web data source
----------------------------
You can get the UEFA winners data from the Results table on the UEFA European Football Championship Wikipedia page at `https://en.wikipedia.org/wiki/UEFA_European_Football_Championship`.

Web connections are only established using basic authentication. Web sites requiring authentication might not work properly with the Web connector.
To import the data:
1. In the Power BI Desktop **Home** ribbon tab, dropdown 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 other sources** from Power BI Desktop Home, then select **Web** from the **All** or the **Other** section of the **Get Data** dialog, and then select **Connect**.
2. In the **From Web** dialog, paste the URL `https://en.wikipedia.org/wiki/UEFA_European_Football_Championship` into the **URL** text box, and then select **OK**.

After you connect to the Wikipedia webpage, the **Navigator** dialog shows a list of available tables on the page. You can select any of the table names to preview its data. **Table 3** 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.
[](media/desktop-tutorial-importing-and-analyzing-data-from-a-web-page/tutorialimanaly_navigator.png#lightbox)
Note
The **Preview** pane shows the most recent table selected, but all selected tables load into the Power Query Editor when you select **Transform Data** or **Load**.
3. Select **Table 3** in the **Navigator** list, and then select **Transform Data**.
A preview of the table opens in **Power Query Editor**, where you can apply transformations to clean up the data.
[](media/desktop-tutorial-importing-and-analyzing-data-from-a-web-page/webpage3.png#lightbox)
Shape data in Power Query Editor
--------------------------------
You want to make the data easier to scan by displaying only the years and the countries/regions that won. You can use the Power Query Editor to perform these data shaping and cleansing steps.
First, remove all the columns except for two from the table. Rename one of these columns as _CountryRegion_ later in the process.
1. In the **Power Query Editor** grid, select the columns. Press **Ctrl** to select multiple items.
2. Right-click and select **Remove Other Columns**, or select **Remove Columns** > **Remove Other Columns** from the **Manage Columns** group in the **Home** ribbon tab, to remove all other columns from the table.

or

The second row of the imported data contains values that aren't needed. You can filter the **Final** column to exclude the word "Winners".
1. Select the filter dropdown arrow on the column.
2. In the dropdown menu, scroll down and clear the checkbox next to the **Winners** option, and then select **OK**.

The cell with the word "Winners" is filtered out along with the one next to it, the `null` value in the same row for the other column.
3. Do the same thing for **2028** and **2032**, as these games are yet to be played and the outcomes are unknown.
Since you're only looking at the final winners data now, you can rename the second column to **CountryRegion**. 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 **CountryRegion** in the header and press **Enter** to rename the column.
You also want to filter out rows that have `null` values in the **CountryRegion** column. You could use the filter menu as you did with the **Winner** value, or you can:
1. Right-click on the row that has the value _null_ in it. Since both columns have _null_ in the same row, you can right-click on the cell in either column.
2. Select **Text Filters** > **Does not Equal** in the context menu to remove any rows that contain that cell's value.

The imported data has the superscript note marker _\[c\]_ appended to the year 2020. You can remove the note marker _\[c\]_, or you can change the value to 2021, which is when the match took place, according to the note.
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 **2020\[c\]** in the **Value To Find** text box, enter **2021** in the **Replace With** text box, and then select **OK** to replace the value in the column.

Import the query into Report view
---------------------------------
Now that you've shaped the data the way you want, you're ready to name your query "Euro Cup Winners" and import it into your report.
1. In the **Queries** pane, in the **Name** text box, enter **Euro Cup Winners**.

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 **Data** 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 query**, or
* Selecting **Transform data** in the **Queries** group of the **Home** ribbon tab in Report view.
Create a visualization
----------------------
To create a visualization based on your data:
1. Select the **CountryRegion** field in the **Data** pane, or drag it to the report canvas. Power BI Desktop recognizes the data as country/region names, and automatically creates a **Map** visualization.
[](media/desktop-tutorial-importing-and-analyzing-data-from-a-web-page/get-data-web14.png#lightbox)
2. Enlarge the map by dragging the handles in the corners so all the winning country/region names are visible.

3. The map shows identical data points for every country/region that won a Euro Cup tournament. To make the size of each data point reflect how often the country/region has won, drag the **Year** field to **Add data fields here** under **Bubble 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/regions that have won more tournaments.
[](media/desktop-tutorial-importing-and-analyzing-data-from-a-web-page/webpage15.png#lightbox)
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 brush) 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. 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 **Visual** > **Bubbles** > **Colors** to expand the data color options.

2. Turn **Show all** to **On**, and then select the dropdown menu next to **West Germany** and choose a yellow color.

3. Select **General** > **Title** to expand the title options, and in the **Text** field, type **Euro Cup Winners** in place of the current title.
4. Change **Text color** to red, size to **12**, and **Font** to **Segoe UI (Bold)**.

Your map visualization now looks like this example:
[](media/desktop-tutorial-importing-and-analyzing-data-from-a-web-page/get-data-web18.png#lightbox)
### Change the visualization type
You can change the type of a visualization by selecting it and then selecting a different icon at the top of the **Visualizations** pane. For example, your map visualization is missing the data for the Soviet Union, because that country/region no longer exists on the world map. Another type of visualization like a _treemap_ or _pie chart_ might be more accurate, because it shows all the values.
To change the map to a pie chart, select the map and then choose the **Pie chart** icon in the **Visualizations** pane.
[](media/desktop-tutorial-importing-and-analyzing-data-from-a-web-page/get-data-web19.png#lightbox)
Tip
* You can use the **Data colors** formatting options to make "Germany" and "West Germany" the same color.
* To group the countries/regions with the most wins together on the pie chart, select the ellipsis (**...**) at the upper right of the visualization, and then select **Sort axis** and **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](../create-reports/desktop-upload-desktop-files)
and create dashboards based on it, which you can share with other Power BI users.
Related content
---------------
* [Watch Power BI videos](../fundamentals/videos)
* [Visit the Power BI Forum](https://go.microsoft.com/fwlink/?LinkID=519326)
* [Read the Power BI Blog](https://go.microsoft.com/fwlink/?LinkID=519327)
* * *
Feedback
--------
Was this page helpful?
Yes No
[Provide product feedback](https://ideas.fabric.microsoft.com/?forum=2d80fd4a-16cb-4189-896b-e0dac5e08b41)
| [Ask the community](https://community.fabric.microsoft.com/powerbi)
* * *
Additional resources
--------------------
---
# Tutorial: Connect to on-premises data in SQL Server - Power BI | Microsoft Learn
Table of contents Exit focus mode
Ask Learn Ask Learn [Read in English](# "Read in English")
Save[](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-gateway-sql-tutorial.md "Edit This Document")
Table of contents [Read in English](# "Read in English")
Add Add to plan [Edit](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-gateway-sql-tutorial.md "Edit This Document")
* * *
#### Share via
[Facebook](#)
[x.com](#)
[LinkedIn](#)
[Email](#)
* * *
Print
* * *
Note
Access to this page requires authorization. You can try [signing in](#)
or changing directories.
Access to this page requires authorization. You can try changing directories.
Refresh data from an on-premises SQL Server database
====================================================
* Article
* 2024-09-06
* 11 contributors
Feedback
In this tutorial, you explore how to refresh a Power BI semantic model 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 semantic model settings in Power BI for SQL Server connectivity through a data gateway.
* Configure a refresh schedule to ensure your Power BI semantic model has recent data.
* Do an on-demand refresh of your semantic model.
* Review the refresh history to analyze the outcomes of past refresh cycles.
* Clean up resources by deleting the items you created in this tutorial.
Prerequisites
-------------
* If you don't already have one, sign up for a [free Power BI trial](https://powerbi.microsoft.com/getting-started-with-power-bi)
before you begin.
* [Install Power BI Desktop](https://powerbi.microsoft.com/desktop)
on a local computer.
* [Install SQL Server](/en-us/sql/database-engine/install-windows/install-sql-server)
on a local computer, and restore the [AdventureWorksDW2017 sample database from a backup](https://github.com/Microsoft/sql-server-samples/releases/download/adventureworks/AdventureWorksDW2017.bak)
. For more information about the AdventureWorks sample databases, see [AdventureWorks installation and configuration](/en-us/sql/samples/adventureworks-install-configure)
.
* [Install SQL Server Management Studio (SSMS)](/en-us/sql/ssms/download-sql-server-management-studio-ssms)
.
* [Install an on-premises data gateway](/en-us/data-integration/gateway/service-gateway-install)
on the same local computer as SQL Server. In production, the gateway would usually be on a different computer.
Note
If you're not a gateway administrator, or don't want to install a gateway yourself, ask a gateway administrator in your organization to create the required data source definition to connect your semantic model to your SQL Server database.
Create and publish a Power BI Desktop file
------------------------------------------
Use the following procedure to create a basic Power BI report that uses the AdventureWorksDW2017 sample database. Publish the report to the Power BI service to get a Power BI semantic model, which you configure and refresh in later steps.
1. In Power BI Desktop, on the **Home** tab, select **Get data** > **SQL Server**.
2. In the **SQL Server database** dialog box, enter the **Server** and **Database (optional)** names, and make sure the **Data Connectivity mode** is set to **Import**.
Note
If you plan to use a stored procedure, you must use **Import** as the **Data connectivity** mode.

Optionally, under **Advanced options**, you could specify a SQL statement and set other options like using [SQL Server Failover](/en-us/sql/database-engine/availability-groups/windows/failover-clustering-and-always-on-availability-groups-sql-server)
.

3. Select **OK**.
4. On the next screen, verify your credentials, and then select **Connect**.
Note
If authentication fails, make sure you selected the correct authentication method and used 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. For more assistance, see [Troubleshoot refresh scenarios](refresh-troubleshooting-refresh-scenarios)
, or contact your database administrator.
5. If an **Encryption Support** dialog box appears, select **OK**.
6. In the **Navigator** dialog box, select the **DimProduct** table, and then select **Load**.

7. In the Power BI Desktop **Report** view, in the **Visualizations** pane, select the **Stacked column chart**.

8. With the new column chart selected in the report canvas, in the **Data** pane, select the **EnglishProductName** and **ListPrice** fields.

9. Drag **EndDate** from the **Data** pane onto **Filters on this page** in the **Filters** pane, and under **Basic filtering**, select the checkbox for **(Blank)**.

The visualization should now look similar to the following chart:

Notice that the **Road-250 Red** product has the same list price as the other **Road-250** products. This price changes when you later update the data and refresh the report.
10. Save the report with the name _AdventureWorksProducts.pbix_.
11. On the **Home** tab, select **Publish**.
12. On the **Publish to Power BI** screen, choose **My Workspace**, and then select **Select**. Sign in to the Power BI service if necessary.
13. When the **Success** message appears, select **Open 'AdventureWorksProducts.pbix' in Power BI**.

Connect the semantic model to the SQL Server database
-----------------------------------------------------
In Power BI Desktop, you connected directly to your on-premises SQL Server database. In the Power BI service, you need a data gateway to act as a bridge between the cloud and your on-premises network. Follow these steps to add your on-premises SQL Server database as a data source to a gateway and connect your semantic model to this data source.
1. In the Power BI service, go to your workspace and locate the **AdventureWorksProducts** semantic model in the workspace content list.
2. Select the **More options** three horizontal dots icon next to the name of the semantic model, then choose **Settings**.
3. Expand **Gateway and cloud connections** and verify that at least one gateway is listed. If you don't see a gateway, make sure you followed the instructions to [install an on-premises data gateway](/en-us/data-integration/gateway/service-gateway-install)
.

4. Select the arrow toggle under **Actions** to expand the data sources, and then select the **Add to gateway** link next to your data source.

5. On the **New connection** screen with **On-premises** selected, complete or verify the following fields. Most fields are already filled in.
* **Gateway cluster name**: Verify or enter the gateway cluster name.
* **Connection name**: Enter a name for the new connection, such as **AdventureWorksProducts**.
* **Connection type**: Select **SQL Server** if not already selected.
* **Server**: Verify or enter your SQL Server instance name. Must be identical to what you specified in Power BI Desktop.
* **Database**: Verify or enter your SQL Server database name, such as **AdventureWorksDW2017**. Must be identical to what you specified in Power BI Desktop.
Under **Authentication**:
* **Authentication method**: Select **Windows**, **Basic**, or **OAuth2**, usually **Windows**.
* **Username** and **Password**: Enter the credentials you use to connect to SQL Server.

6. Select **Create**.
7. Back on the **Settings** screen, expand the **Gateway connection** section, and verify that the data gateway you configured now shows a **Status** of running on the machine where you installed it. Select **Apply**.

Configure a refresh schedule
----------------------------
Once you have connected your Power BI semantic model to your SQL Server on-premises database through a data gateway, follow these steps to configure a refresh schedule. Refreshing your semantic model on a scheduled basis helps ensure that your reports and dashboards have the most recent data.
1. In the left navigation pane, select **My Workspace**.
2. Select the **AdventureWorksProducts** semantic model from the workspace content list.
Tip
Make sure you point to the **AdventureWorksProducts** semantic model, not the report with the same name, which doesn't have a **Schedule refresh** option.
3. On the semantic model settings page, select **Refresh**, then **Schedule refresh** from the ribbon.
4. In the **Refresh** section, under **Configure a refresh schedule**, set the slider to **On**.
5. Under **Refresh frequency**, select **Daily** for this example, and then under **Time**, select **Add another time**.
For this example, specify **6:00 AM**, then select **Add another time** and specify **6:00 PM**.

Note
You can configure up to eight daily time slots if your semantic model is on shared capacity, or 48 time slots on Power BI Premium.
6. Leave the checkbox under **Send refresh failure notifications to** set to **Semantic model owner**, and select **Apply**.
With a configured refresh schedule, Power BI refreshes your semantic model at the next scheduled time, within a margin of 15 minutes.
Refresh on demand
-----------------
To refresh the data anytime, such as to test your gateway and data source configuration, you can do an on-demand refresh by using the **Refresh now** option in the ribbon at the top of the semantic model settings page. You can also find this option in the workspace content list next to the name of the semantic model. On-demand refreshes don't affect the next scheduled refresh time.
To illustrate an on-demand refresh, first change the sample data by using SSMS to update the `DimProduct` table in the AdventureWorksDW2017 database, as follows:
UPDATE [AdventureWorksDW2017].[dbo].[DimProduct]
SET ListPrice = 5000
WHERE EnglishProductName ='Road-250 Red, 58'
Follow these steps to make the updated data flow through the gateway connection to the semantic model and into the Power BI reports:
1. Navigate to **My Workspace** in the left navigation pane and locate the **AdventureWorksProducts** semantic model.
2. Select the **Refresh now** icon next to the name of the semantic model. A **Preparing for refresh** message appears in the upper right corner.

A **Preparing for refresh** message appears at upper right.
3. Now select the **AdventureWorksProducts** report to open it. See how the updated data flowed through into the report, and the product with the highest list price is now **Road-250 Red, 58**.

Review the refresh history
--------------------------
It's a good idea to periodically use the refresh history to check the outcomes of past refresh cycles. Database credentials might have expired, or the selected gateway might have been offline when a scheduled refresh was due. Follow these steps to examine the refresh history and check for issues.
1. In **My Workspace**, select the **AdventureWorksProducts** semantic model.
2. On the semantic model settings page, select **Refresh**, then **Refresh history** from the ribbon at the top of the page.
3. On the **Scheduled** tab of the **Refresh history** dialog box, notice the past scheduled and on-demand refreshes with their **Start** and **End** times. A **Status** of **Completed** indicates that Power BI did the refreshes successfully. For failed refreshes, you can see the error message and examine error details.

Note
The OneDrive tab is relevant only for semantic models that are connected to Power BI Desktop files, Excel workbooks, or CSV files on OneDrive or SharePoint Online. For more information, see [Data refresh in Power BI](refresh-data)
.
Clean up resources
------------------
Follow these instructions to clean up the resources you created for this tutorial:
* If you don't want to use the sample data anymore, use SSMS to drop the database.
* If you don't want to use the SQL Server data source, [remove the data source](service-gateway-data-sources#remove-a-data-source)
from your data gateway. Also consider uninstalling the data gateway, if you installed it only for this tutorial.
* Also delete the AdventureWorksProducts semantic model and report that Power BI created when you published the _AdventureWorksProducts.pbix_ file.
Related content
---------------
This tutorial explored how to:
* Import data from an on-premises SQL Server database into a Power BI semantic model.
* To update reports and dashboards that use the semantic model, refresh the Power BI semantic model on a scheduled and on-demand basis.
Check out the following resources to learn more about Power BI data refresh and managing data gateways and data sources:
* [Manage an on-premises data gateway](/en-us/data-integration/gateway/service-gateway-manage)
* [Manage your data source - import and scheduled refresh](service-gateway-enterprise-manage-scheduled-refresh)
* [Data refresh in Power BI](refresh-data)
* * *
Feedback
--------
Was this page helpful?
Yes No
[Provide product feedback](https://ideas.fabric.microsoft.com/?forum=2d80fd4a-16cb-4189-896b-e0dac5e08b41)
| [Ask the community](https://community.fabric.microsoft.com/powerbi)
* * *
Additional resources
--------------------
---
# New name for Power BI datasets - Power BI | Microsoft Learn
Table of contents Exit focus mode
Ask Learn Ask Learn [Read in English](# "Read in English")
Save[](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-datasets-rename.md "Edit This Document")
Table of contents [Read in English](# "Read in English")
Add Add to plan [Edit](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-datasets-rename.md "Edit This Document")
* * *
#### Share via
[Facebook](#)
[x.com](#)
[LinkedIn](#)
[Email](#)
* * *
Print
* * *
Note
Access to this page requires authorization. You can try [signing in](#)
or changing directories.
Access to this page requires authorization. You can try changing directories.
New name for Power BI datasets
==============================
* Article
* 2023-11-14
* 5 contributors
Feedback
Microsoft has renamed the Power BI _dataset_ content type to _semantic model_.
The rename was necessary for two main reasons.
* The term _dataset_ is considered too generic. It has different meanings in the context of other data-related activities, especially now that Power BI is one of many experiences in [Microsoft Fabric](/en-us/fabric/get-started/microsoft-fabric-overview)
.
* The term _semantic model_ better reflects the rich functionality of Analysis Services data models, upon which Power BI reports are based.
Important
This change is a rename only. There's no interruption to usage or service. You can expect a continuation of service because administrators, developers, and other users aren't required to make any changes.
Tip
To avoid confusion and support requests, be sure to notify your [community of practice](../guidance/fabric-adoption-roadmap-community-of-practice)
of this change.
Name changes
------------
Here are some examples of name changes.
| Old name | New name |
| --- | --- |
| Dataset | Semantic model |
| Shared dataset | Shared semantic model |
| Import dataset | Import semantic model |
| DirectQuery dataset | DirectQuery semantic model |
| Composite dataset | Composite semantic model |
| Live connection dataset | Live connection semantic model |
| On-premises dataset | On-premises semantic model |
| Dataset owner | Semantic model owner |
| Large dataset | Large semantic model |
Note
The name change has been rolled out in the Power BI service and in documentation, though there might be some instances where the change hasn't occurred yet.
Name change exceptions
----------------------
The following concepts aren't affected.
* Generic references to datasets
* [Power BI paginated report dataset](../paginated-reports/report-data/report-data)
* [Power BI real-time dataset](service-real-time-streaming)
, including:
* Push dataset
* Streaming dataset
* Hybrid dataset
* PubNub dataset
* All [Power BI REST API operations](/en-us/rest/api/power-bi/)
related to datasets
* [Power BI activity log operations](/en-us/fabric/admin/track-user-activities)
* Other types of datasets that aren't related to Power BI, for example, [Azure Open Datasets](/en-us/azure/open-datasets/dataset-catalog)
Related content
---------------
For more information related to this article, check out the following resources.
* Blog post: [Datasets renamed to semantic models](https://aka.ms/DatasetRename)
* Questions? Try asking the [Fabric Community](https://community.fabric.microsoft.com/)
.
* Suggestions? [Contribute ideas to improve Fabric](https://ideas.fabric.microsoft.com/)
.
* * *
Feedback
--------
Was this page helpful?
Yes No
[Provide product feedback](https://ideas.fabric.microsoft.com/?forum=2d80fd4a-16cb-4189-896b-e0dac5e08b41)
| [Ask the community](https://community.fabric.microsoft.com/powerbi)
* * *
Additional resources
--------------------
---
# Data sources in Power BI Desktop - Power BI | Microsoft Learn
Table of contents Exit focus mode
Ask Learn Ask Learn [Read in English](# "Read in English")
Save[](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/desktop-data-sources.md "Edit This Document")
Table of contents [Read in English](# "Read in English")
Add Add to plan [Edit](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/desktop-data-sources.md "Edit This Document")
* * *
#### Share via
[Facebook](#)
[x.com](#)
[LinkedIn](#)
[Email](#)
* * *
Print
* * *
Note
Access to this page requires authorization. You can try [signing in](#)
or changing directories.
Access to this page requires authorization. You can try changing directories.
Data sources in Power BI Desktop
================================
* Article
* 2024-11-12
* 13 contributors
Feedback
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](power-bi-data-sources)
.
To see available data sources, in the **Home** group of the Power BI Desktop ribbon, select the **Get data** button label or down arrow to open the **Common data sources** list. If the data source you want isn't listed under **Common data sources**, select **More** to open the **Get Data** dialog box.

Or, open the **Get Data** dialog box directly by selecting the **Get data** icon itself.

This article provides an overview of the available data sources in Power BI Desktop and explains how to connect to them. It also describes how to export or use data sources as PBIDS files to make it easier to build new reports from the same data.
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).
Data sources
------------
The **Get Data** dialog box organizes data types in the following categories:
* All
* File
* Database
* Microsoft Fabric
* 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 Workbook
* Text/CSV
* XML
* JSON
* Folder
* PDF
* Parquet
* SharePoint folder
### Database data sources
The **Database** category provides the following data connections:
* SQL Server database
* Access database
* SQL Server Analysis Services database
* Oracle database
* IBM Db2 database
* IBM Informix database (Beta)
* IBM Netezza
* MySQL database
* PostgreSQL database
* Sybase database
* Teradata database
* SAP HANA database
* SAP Business Warehouse Application Server
* SAP Business Warehouse Message Server
* Amazon Redshift
* Impala
* Google BigQuery
* Google BigQuery (Microsoft Entra ID)
* Vertica
* Snowflake
* Essbase
* AtScale Models
* Actian (Beta)
* Amazon Athena
* BI Connector
* Data Virtuality LDW
* Exact Online Premium (Beta)
* Jethro (Beta)
* Kyligence
* Linkar PICK Style / MultiValue Databases (Beta)
* MariaDB
* MarkLogic
* MongoDB Atlas SQL
* TIBCO® Data Virtualization
* AtScale cubes
* Denodo
* Dremio Software
* Dremio Cloud
* Exasol
* ClickHouse (beta)
* InterSystems Health Insight
* KX kdb Insights Enterprise (beta)
* Kyvos ODBC (beta)
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 previously 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 shouldn't be used in production environments.
### Microsoft Fabric
The **Microsoft Fabric** category provides the following data connections:
* Power BI semantic models
* Dataflows
* Datamarts (preview)
* Warehouses
* Lakehouses
* KQL Databases
* Metric Sets
### Power Platform data sources
The **Power Platform** category provides the following data connections:
* Power BI dataflows (Legacy)
* Common Data Service (Legacy)
* Dataverse
* Dataflows
### Azure data sources
The **Azure** category provides the following data connections:
* Azure SQL Database
* Azure Synapse Analytics SQL
* Azure Analysis Services database
* Azure Database for PostgreSQL
* Azure Blob Storage
* Azure Table Storage
* Azure Cosmos DB v1
* Azure Data Explorer (Kusto)
* Azure Data Lake Storage Gen2
* Azure HDInsight (HDFS)
* Azure HDInsight Spark
* HDInsight Interactive Query
* Azure Cost Management
* Azure Resource Graph
* Azure HDInsight on AKS Trino (Beta)
* Azure Cosmos DB v2
* Azure Databricks
* Azure Synapse Analytics workspace (Beta)
### Online Services data sources
The **Online Services** category provides the following data connections:
* SharePoint Online List
* Microsoft Exchange Online
* Dynamics 365 Online (legacy)
* Dynamics 365 (Dataverse)
* Dynamics NAV
* Dynamics 365 Business Central
* Dynamics 365 Business Central (on-premises)
* 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 Portfolios
* QuickBooks Online (Beta)
* Smartsheet (Legacy)
* SparkPost (Beta)
* SweetIQ (Beta)
* Planview Enterprise Architecture
* Aptix Insights (Beta)
* Asana (Beta)
* Assemble Views
* Autodesk Construction Cloud
* Automy Data Analytics (Beta)
* CData Connect Cloud
* Dynamics 365 Customer Insights (Beta)
* Databricks
* Digital Construction Works Insights
* Emigo Data Source
* Entersoft Business Suite (Beta)
* eWay-CRM
* FactSet Analytics
* Palantir Foundry
* Hexagon PPM Smart® API
* Industrial App Store
* Planview OKR (beta)
* Planview ProjectPlace
* Quickbase
* SoftOne BI (Beta)
* Planview IdeaPlace
* TeamDesk (beta)
* Webtrends Analytics (Beta)
* Witivio (Beta)
* Zoho Creator
* Automation Anywhere
* CData Connect Cloud
* Dynamics 365 Customer Insights (beta)
* Databricks
* Funnel
* Intune Data Warehouse (Beta)
* LEAP (Beta)
* LinkedIn Learning
* Product Insights (Beta)
* Profisee
* Samsara (Beta)
* Supermetrics (beta)
* Viva Insights
* Zendesk (Beta)
* BuildingConnected & TradeTapp (beta)
* Smartsheet (Beta)
### 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
* R script
* Python script
* ODBC
* OLE DB
* Acterys : Model Automation & Planning (Beta)
* Amazon OpenSearch Service (Beta)
* Anaplan
* Solver
* Bloomberg Data and Analytics
* Celonis EMS
* Cherwell (Beta)
* CloudBluePSA (Beta)
* Cognite Data Fusion
* EQuIS
* FactSet RMS (Beta)
* inwink (Beta)
* Kognitwin
* MicroStrategy for Power BI
* OneStream (Beta)
* OpenSearch Project (Beta)
* Paxata
* QubolePresto (Beta)
* Roamler (Beta)
* SIS-CC SDMX (Beta)
* Shortcuts Business Insights (Beta)
* Starburst Enterprise
* SumTotal
* SurveyMonkey
* Tenforce (Smart)List
* Usercube (Beta)
* Vena
* Vessel Insight
* Wrike (Beta)
* Zucchetti HR Infinity (Beta)
* BitSight Security Ratings
* BQE CORE
* Wolters Kluwer CCH Tagetik
* Delta Sharing
* Eduframe (Beta)
* FHIR
* Google Sheets
* InformationGrid
* Jamf Pro (Beta)
* SingleStore Direct Query Connector
* Siteimprove
* SolarWinds Service Desk
* Microsoft Teams Personal Analytics (Beta)
* Windsor (beta)
* Blank Query
Note
At this time, it's not possible to connect to custom data sources secured using Microsoft Entra ID.
### Template apps
You can find template apps for your organization by selecting the **Template Apps** link near the bottom of the **Get data** window.

Available Template Apps may vary based on your organization.
Connect to a data source
------------------------
1. To connect to a data source, select the data source from the **Get data** window and select **Connect**. The following screenshot shows **Web** selected from the **Other** data connection category.

2. A connection window appears. Enter the URL or resource connection information, and then select **OK**. The following screenshot shows a URL entered in the **From Web** connection dialog box.

3. Depending on the data connection, you might be prompted to provide credentials or other information. After you provide all required information, Power BI Desktop connects to the data source and presents the available data sources in the **Navigator** dialog box.

4. Select the tables and other data that you want to load. 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.
Connecting to data sources in Power BI Desktop is that easy. 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.
Use PBIDS files to get data
---------------------------
PBIDS files are Power BI Desktop files that have a specific structure and a _.pbids_ extension to identify them as Power BI data source files.
You can create a PBIDS file to streamline the **Get Data** experience for new or beginner report creators in your organization. If you create the PBIDS file from existing reports, it's easier for beginning report authors to build new reports from the same data.
When an author opens a PBIDS file, Power BI Desktop prompts the user for credentials to authenticate and connect to the data source that the file specifies. The **Navigator** dialog box appears, and the user must select the tables from that data source to load into the model. Users might also need to select the database and connection mode if none was specified in the PBIDS file.
From that point forward, the user can begin building visualizations or select **Recent Sources** to load a new set of tables into the model.
Currently, PBIDS files only support a single data source in one file. Specifying more than one data source results in an error.
### How to create a PBIDS connection file
If you have an existing Power BI Desktop PBIX file already connected to the data you’re interested in, you can export the connection files from within Power BI Desktop. This method is recommended, since the PBIDS file can be autogenerated from Desktop. You can also still edit or manually create the file in a text editor.
1. To create the PBIDS file, select **File** > **Options and settings** > **Data source settings**.

2. In the dialog that appears, select the data source you want to export as a PBIDS file, and then select **Export PBIDS**.

3. In the **Save As** dialog box, give the file a name, and select **Save**. Power BI Desktop generates the PBIDS file, which you can rename and save in your directory, and share with others.
You can also open the file in a text editor, and modify the file further, including specifying the mode of connection in the file itself. The following image shows a PBIDS file open in a text editor.

If you prefer to manually create your PBIDS files in a text editor, you must specify the required inputs for a single connection and save the file with the _.pbids_ extension. Optionally, you can also specify the connection `mode` as either `DirectQuery` or `Import`. If `mode` is missing or `null` in the file, the user who opens the file in Power BI Desktop is prompted to select **DirectQuery** or **Import**.
Important
Some data sources will generate an error if columns are encrypted in the data source. For example, if two or more columns in an Azure SQL Database are encrypted during an Import action, an error will be returned. For more information, see [SQL Database](/en-us/power-query/connectors/azuresqldatabase)
.
### PBIDS file examples
This section provides some examples from commonly used data sources. The PBIDS file type only supports data connections that are also supported in Power BI Desktop, with the following exceptions: Wiki URLs, Live Connect, and Blank Query.
The PBIDS file doesn't include authentication information and table and schema information.
The following code snippets show several common examples for PBIDS files, but they aren't complete or comprehensive. For other data sources, you can refer to the [git Data Source Reference (DSR) format for protocol and address information](/en-us/azure/data-catalog/data-catalog-dsr#data-source-reference-specification)
.
If you're editing or manually creating the connection files, these examples are for convenience only, aren't meant to be comprehensive, and don't include all supported connectors in DSR format.
#### Azure AS
{
"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"\
}\
}\
}\
]
}
Related content
---------------
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?](../fundamentals/desktop-what-is-desktop)
* [Query overview in Power BI Desktop](../transform-model/desktop-query-overview)
* [Data types in Power BI Desktop](desktop-data-types)
* [Tutorial: Shape and combine data in Power BI Desktop](desktop-shape-and-combine-data)
* [Perform common query tasks in Power BI Desktop](../transform-model/desktop-common-query-tasks)
* * *
Feedback
--------
Was this page helpful?
Yes No
[Provide product feedback](https://ideas.fabric.microsoft.com/?forum=2d80fd4a-16cb-4189-896b-e0dac5e08b41)
| [Ask the community](https://community.fabric.microsoft.com/powerbi)
* * *
Additional resources
--------------------
---
# On-premises data gateway - Power BI | Microsoft Learn
Table of contents Exit focus mode
Ask Learn Ask Learn [Read in English](# "Read in English")
Save[](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-gateway-onprem.md "Edit This Document")
Table of contents [Read in English](# "Read in English")
Add Add to plan [Edit](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-gateway-onprem.md "Edit This Document")
* * *
#### Share via
[Facebook](#)
[x.com](#)
[LinkedIn](#)
[Email](#)
* * *
Print
* * *
Note
Access to this page requires authorization. You can try [signing in](#)
or changing directories.
Access to this page requires authorization. You can try changing directories.
What is an on-premises data gateway?
====================================
* Article
* 2025-02-07
* 12 contributors
Feedback
Note
We've split the on-premises data gateway docs into [content that's specific to Power BI](service-gateway-onprem)
and [general content that applies to all services](/en-us/data-integration/gateway/service-gateway-onprem)
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.
An on-premises data gateway is software that you install in an on-premises network. The on-premises data gateway facilitates access to data in that network and 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.
This article helps you understand the purpose and functionality of the on-premises data gateway so you can securely transfer and use on-premises data in various Microsoft cloud services. Keep reading to learn about how to bridge the gap between on-premises data and cloud services.
How the gateway works
---------------------

For more information on how the gateway works, see [On-premises data gateway architecture](/en-us/data-integration/gateway/service-gateway-onprem-indepth)
.
Types of gateways
-----------------
There are three different types of gateways, each for a different scenario:
* **On-premises data gateway**: Allows multiple users to connect to multiple on-premises data sources. With a single gateway installation, you can use an on-premises data gateway with all supported services. This gateway is well-suited to complex scenarios where multiple people access multiple data sources.
* **On-premises data gateway (personal mode)**: Allows one user to connect to data sources and can’t be shared with others. An on-premises data gateway (personal mode) can only be used 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.
* **Virtual network data gateway**: Allows multiple users to connect to multiple data sources secured using virtual networks. No installation is required because it's a Microsoft managed service. This gateway is well-suited to complex scenarios where multiple people access multiple data sources.
Use a gateway
-------------
There are five main steps for using a gateway:
1. [Download and install the gateway](/en-us/data-integration/gateway/service-gateway-install)
on a local computer.
2. [Configure the gateway](/en-us/data-integration/gateway/service-gateway-app)
based on your firewall and other network requirements.
3. [Add gateway admins](/en-us/data-integration/gateway/service-gateway-manage)
who can also manage and administer other network requirements.
4. [Use the gateway](service-gateway-sql-tutorial)
to refresh an on-premises data source.
5. [Troubleshoot](service-gateway-onprem-tshoot)
issues with the gateway.
Related content
---------------
* [Install the on-premises data gateway](/en-us/data-integration/gateway/service-gateway-install)
* [Power BI implementation planning: Data gateways](../guidance/powerbi-implementation-planning-data-gateways)
More questions? [Try the Power BI Community](https://community.powerbi.com/)
* * *
Feedback
--------
Was this page helpful?
Yes No
[Provide product feedback](https://ideas.fabric.microsoft.com/?forum=2d80fd4a-16cb-4189-896b-e0dac5e08b41)
| [Ask the community](https://community.fabric.microsoft.com/powerbi)
* * *
Additional resources
--------------------
---
# Use a personal gateway in Power BI - Power BI | Microsoft Learn
Table of contents Exit focus mode
Ask Learn Ask Learn [Read in English](# "Read in English")
Save[](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-gateway-personal-mode.md "Edit This Document")
Table of contents [Read in English](# "Read in English")
Add Add to plan [Edit](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-gateway-personal-mode.md "Edit This Document")
* * *
#### Share via
[Facebook](#)
[x.com](#)
[LinkedIn](#)
[Email](#)
* * *
Print
* * *
Note
Access to this page requires authorization. You can try [signing in](#)
or changing directories.
Access to this page requires authorization. You can try changing directories.
Use a personal gateway in Power BI
==================================
* Article
* 2024-08-15
* 12 contributors
Feedback
Note
We've split the on-premises data gateway docs into [content that's specific to Power BI](service-gateway-onprem)
and [general content that applies to all services](/en-us/data-integration/gateway/service-gateway-onprem)
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 get access to on-premises data. This article provides information on how to use a personal gateway in Power BI to easily and securely connect to on-premises data.
Note
Each Power BI user can have only one personal mode gateway running. If the same user installs another personal mode gateway, even on a different computer, the most recent installation replaces the existing previous installation.
On-premises data gateway vs. on-premises data gateway (personal mode)
---------------------------------------------------------------------
The following table describes differences between an on-premises data gateway and an on-premises data gateway (personal mode).
| | On-premises data gateway | On-premises data gateway (personal mode) |
| --- | --- | --- |
| **Supports cloud services:** | Power BI, PowerApps, Azure Logic Apps, Power Automate, Azure Analysis Services, dataflows | None |
| **Runs under credentials:** | As configured by users who have access to the gateway | Your credentials for Windows authentication, or credentials you configure for other authentication types |
| **Can install only as computer admin** | Yes | No |
| **Centralized gateway and data source management** | Yes | No |
| **Can import data and schedule refresh** | Yes | Yes |
| **DirectQuery support** | Yes | No |
| **LiveConnect support for Analysis Services** | Yes | No |
Install the on-premises data gateway (personal mode)
----------------------------------------------------
To install the on-premises data gateway (personal mode):
1. [Download the on-premises data gateway](https://go.microsoft.com/fwlink/?LinkId=820925&clcid=0x409)
.
2. Open the installer, and select **Next**.
3. Select **On-premises data gateway (personal mode)**, and then select **Next**.

4. On the next screen, review the minimum requirements, verify or edit the installation path, and select the checkbox to accept the terms of use and privacy statement. Then select **Install**.
5. After the installation completes successfully, enter your email address under **Email address to use with this gateway**, and select **Sign in**.
6. After you sign in, a confirmation screen displays.
7. Select **Close** to close the installer.
Use Fast Combine with the personal gateway
------------------------------------------
Fast Combine on a personal gateway helps you ignore specified privacy levels when you run queries. To enable Fast Combine for the on-premises data gateway (personal mode):
1. Use Windows File Explorer to open the file _\\Microsoft\\On-premises data gateway (personal mode)\\Microsoft.PowerBI.DataMovement.Pipeline.GatewayCore.dll.config_.
2. At the end of the file, before ``, add the following code, and then save the file.
true
3. The setting takes effect in approximately one minute. To confirm that Fast Combine is working properly, try an on-demand refresh in the Power BI service.
Frequently asked questions (FAQ)
--------------------------------
* **Question:** Can you run the on-premises data gateway (personal mode) side by side with the on-premises data gateway that used to be called the Enterprise gateway?
**Answer:** Yes, both gateways can run simultaneously.
* **Question:** Can you run the on-premises data gateway (personal mode) as a service?
**Answer:** No. The on-premises data gateway (personal mode) can run only as an application. To run a gateway as a service or in admin mode, use the [on-premises data gateway](/en-us/data-integration/gateway/service-gateway-onprem)
, which used to be called the Enterprise gateway.
* **Question:** How often does the on-premises data gateway (personal mode) update?
**Answer:** The personal gateway updates monthly.
* **Question:** Why does the personal gateway ask you to update your credentials?
**Answer:** Many situations can trigger a request for credentials. The most common scenario is that you reinstalled the on-premises data gateway (personal mode) on a different machine than your original Power BI personal gateway. There could also be an issue in the data source, or Power BI failed to make a test connection, or a timeout or system error occurred.
To update your credentials in the Power BI service, open the semantic model settings and choose **Data source credentials**.
* **Question:** How long is a personal gateway offline during an upgrade?
**Answer:** Upgrading the personal gateway to a new version takes only few minutes.
* **Question:** Does the personal gateway support R and Python scripts?
**Answer:** Yes, personal mode supports R and Python scripts.
Related content
---------------
* [Add or remove a gateway data source](service-gateway-data-sources)
* [Configure proxy settings for the on-premises data gateway](/en-us/data-integration/gateway/service-gateway-proxy)
* [Power BI implementation planning: Data gateways](../guidance/powerbi-implementation-planning-data-gateways)
More questions? Try the [Power BI Community](https://community.powerbi.com/)
.
* * *
Feedback
--------
Was this page helpful?
Yes No
[Provide product feedback](https://ideas.fabric.microsoft.com/?forum=2d80fd4a-16cb-4189-896b-e0dac5e08b41)
| [Ask the community](https://community.fabric.microsoft.com/powerbi)
* * *
Additional resources
--------------------
---
# Create template apps in Power BI - Power BI | Microsoft Learn
Table of contents Exit focus mode
Ask Learn Ask Learn [Read in English](# "Read in English")
Save[](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-template-apps-create.md "Edit This Document")
Table of contents [Read in English](# "Read in English")
Add Add to plan [Edit](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-template-apps-create.md "Edit This Document")
* * *
#### Share via
[Facebook](#)
[x.com](#)
[LinkedIn](#)
[Email](#)
* * *
Print
* * *
Note
Access to this page requires authorization. You can try [signing in](#)
or changing directories.
Access to this page requires authorization. You can try changing directories.
Create a template app in Power BI
=================================
* Article
* 2023-03-21
* 10 contributors
Feedback
This article contains step-by-step instructions for creating a Power BI _template app_. Power BI template apps let Power BI partners build Power BI apps with little or no coding, and deploy them to any Power BI customer.
If you can create Power BI reports and dashboards, you can become a _template app builder_ and build and package analytical content into an app. You can then deploy your app to other Power BI tenants through any available platform, such as AppSource or your own web service. If you're distributing your template app through your own web service, you can [automate part of the installation process](template-apps-auto-install)
to make things easier for your customers.
Power BI admins govern and control who in their organization can create template apps, and who can install them. Authorized users can install your template app, modify it, and distribute it to the Power BI consumers in their organizations.
Prerequisites
-------------
Here are the requirements for building a template app:
* A [Power BI pro license](../fundamentals/service-self-service-signup-for-power-bi)
* [Power BI Desktop](../fundamentals/desktop-get-the-desktop)
(optional)
* Familiarity with [basic Power BI concepts](../fundamentals/service-basic-concepts)
* Permissions to share a template app publicly as shown in [Template app tenant settings](/en-us/fabric/admin/service-admin-portal-template-app)
Create the template workspace
-----------------------------
To create a template app you can distribute to other Power BI tenants, you need to create it in a workspace.
1. In the Power BI service, create a workspace as described in [Create a workspace in Power BI](../collaborate-share/service-create-the-new-workspaces)
. In the **Advanced** section, select **Develop a template app**.

Important
The capacity that the app builder workspace is assigned to does not determine the capacity assignment of workspaces where app installers install the app. This means that an app developed in a premium capacity workspace will not necessarily be installed on a premium capacity workspace. Therefore it is **not** recommended to use premium capacity for the builder workspace, as installer workspaces might not be premium capacity, and functionality that relies on premium capacity won't work unless the installer manually reassigns the installed workspace to premium capacity.
Important
The **Develop a template app** option can only be selected when creating the app builder workspace. Once a workspace has been defined as an app builder workspace, the app builder functionality can never be removed from the workspace.
2. When you're done creating the workspace, select **Save**.
Note
You need permissions from your Power BI admin to promote template apps.
Add content to the template app workspace
-----------------------------------------
As with a regular Power BI workspace, your next step is to add content to the workspace. If you're using parameters in Power Query, make sure they have well-defined types, such as `Text`. The types `Any` and `Binary` aren't supported.
For suggestions to consider when creating reports and dashboards for your template app, see [Tips for authoring template apps in Power BI](service-template-apps-tips)
.
Define the properties of the template app
-----------------------------------------
Now that you have content in your workspace, you can package it in a template app. The first step is to create a test template app, accessible only from within your organization on your tenant.
1. In the template app workspace, select **Create app**.

Next, fill in more options for your template app in six tabs.
2. On the **Branding** tab, complete the following fields:
* **App name**
* **Description**
* **Support site**. The support link appears under app info after you redistribute the template app as an organizational app.
* **App logo**. The logo has a 45K file-size limit, must have a 1:1 aspect ratio, and must be in a _.png_, _.jpg_, or _.jpeg_ file format.
* **App theme color**

3. On the **Navigation** tab, you can turn on **New navigation builder** to define the navigation pane of the app.

If you don't turn on **New navigation builder**, you have the option of selecting an app landing page. Define a report or dashboard to be the landing page of your app. Use a landing page that gives the impression you want.
4. On the **Control** tab, set your app users' limits and restrictions on your app's content. You can use this control to protect intellectual property in your app.

Note
If you want to protect your data, disable the **Download the report to file** option and then configure the other two options as desired.
Why:
The view, edit, and export controls on this tab apply only to the Power BI service. Once you download the _.pbix_ file, it is no longer in the service. It puts a copy of your data, unprotected, in a location chosen by the user. You then no longer have any control over what the user can do with it.
If you want to limit access to your queries and measures while still allowing your users to add their own data sources, consider checking only the **Export or externally connect to data** options. This enables users to add their own data sources without being able to edit your semantic model. For more information, see [Use composite models in Power BI Desktop](../transform-model/desktop-composite-models)
.
5. Parameters are created in the original _.pbix_ file (learn more about [creating query parameters](https://powerbi.microsoft.com/blog/deep-dive-into-query-parameters-and-power-bi-templates/)
). You use the capabilities on this tab to help the app installer configure the app after installation when they connect to their data.

Each parameter has a name, which comes from the query, and a **Value** field. There are three options for getting a value for the parameter during installation:
* You can require the user who installs the app to enter a value.
In this case, you provide an example that the user replaces. To configure a parameter in this way, select the **Required** checkbox, and then give an example in the textbox that shows the user what kind of value is expected, as shown in the following example.

* You can provide a pre-populated value that the user who installs the app can't change.
A parameter configured in this way is hidden from the user who installs the app. You should use this method only if you're sure that the pre-populated value is valid for all users. If not, use the first method that requires user input.
To configure a parameter in this way, enter the value in the **Value** textbox, and then select the lock icon so the value can't be changed. The following example shows this option:

* You can provide a default value that the user can change during installation.
To configure a parameter in this way, enter the desired default value in the **Value** textbox, and leave the lock icon unlocked, as in the following example:

In this tab, you also provide a link to the app documentation.
6. On the **Authentication** tab, select the authentication method to use. The available options depend on the data source types being used.

Privacy level is configured automatically:
* A single datasource is automatically configured as private.
* A multi anonymous datasource is automatically configured as public.
7. In the test phase, on the **Access** tab decide who else in your organization can install and test your app. You will come back and change these settings later. The setting doesn't affect access of the distributed template app.

8. Select **Create app**.
You see a message that the test app is ready, with a link to copy and share with your app testers.

You've also done the first step of the following release management process.
Manage the template app release
-------------------------------
Before you release the template app publicly, you want to make sure it's ready. In the Power BI release management pane, you can follow and inspect the full app release path. You can also trigger the transition from stage to stage. The common stages are:
* Generate a test app for testing within your organization only.
* Promote the test package to pre-production stage and test outside of your organization.
* Promote the pre-production package to the production version in Production.
* Delete any package or start over from a previous stage.
The URL doesn't change as you move between release stages. Promotion doesn't affect the URL itself.
To go through the release stages:
1. In the template workspace, select **Release Management**.

2. If you followed the steps in this article to create the test app, the dot next to **Testing** will already be filled in. Select **Get link**.
If you haven't created the app yet, select **Create app** to start the template app creation process.

3. To test the app installation experience, copy the link in the window and paste it into a new browser window.
From here, you follow the same procedure your app installers will follow. For more information, see [Install and distribute template apps in your organization](service-template-apps-install-distribute)
.
4. In the dialog box, select **Install**.
5. After installation succeeds, select the app in the **Apps** list to open it.
6. Verify that the test app has the sample data. To make any changes, go back to the app in the original workspace. Update the test app until you're satisfied.
7. When you're ready to promote your app to pre-production for testing outside your tenant, go back to the **Release Management** pane and select **Promote app**.

Note
When you promote the app, it becomes publicly available outside your organization.
If you don't see the **Promote app** option, contact your Power BI admin to grant you [permissions for template app development](/en-us/fabric/admin/service-admin-portal-template-app)
in the admin portal.
8. In the dialog box, select **Promote**.
9. Copy the 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](/en-us/azure/marketplace/partner-center-portal/create-power-bi-app-offer)
.
Submit only pre-production links to the Partner center. After the app is approved and you get notification that it's published in AppSource, you can promote the package to production in Power BI.
10. 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**.
11. Select **Promote**.
Now your app is in production and ready for distribution.

To make your app widely available to Power BI users throughout the world, submit it to AppSource. For more information, see the [Create a Power BI app offer](/en-us/azure/marketplace/partner-center-portal/create-power-bi-app-offer)
.
Automate parameter configuration during installation
----------------------------------------------------
If you're an independent software vendor and distribute your template app via your web service, you can create automation that configures template app parameters automatically when your customers install the app in Power BI. Automatic configuration makes things easier for your customers and increases the likelihood of a successful installation, because customers don't have to supply details that they might not know. For more information, see [Automated configuration of a template app installation](template-apps-auto-install)
.
Related content
---------------
* To learn how your customers interact with your template app, see [Install, customize, and distribute template apps in your organization](service-template-apps-install-distribute)
.
* For details on distributing your app, see the [Create a Power BI app offer](/en-us/azure/marketplace/partner-center-portal/create-power-bi-app-offer)
.
* * *
Feedback
--------
Was this page helpful?
Yes No
[Provide product feedback](https://ideas.fabric.microsoft.com/?forum=2d80fd4a-16cb-4189-896b-e0dac5e08b41)
| [Ask the community](https://community.fabric.microsoft.com/powerbi)
* * *
Additional resources
--------------------
---
# Install, share, and update template apps in your organization with Power BI - Power BI | Microsoft Learn
Table of contents Exit focus mode
Ask Learn Ask Learn [Read in English](# "Read in English")
Save[](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-template-apps-install-distribute.md "Edit This Document")
Table of contents [Read in English](# "Read in English")
Add Add to plan [Edit](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-template-apps-install-distribute.md "Edit This Document")
* * *
#### Share via
[Facebook](#)
[x.com](#)
[LinkedIn](#)
[Email](#)
* * *
Print
* * *
Note
Access to this page requires authorization. You can try [signing in](#)
or changing directories.
Access to this page requires authorization. You can try changing directories.
Install, share, and update template apps in your organization
=============================================================
* Article
* 2023-02-08
* 9 contributors
Feedback
Are you a Power BI analyst? Here you can learn more about [template apps](service-template-apps-overview)
and how to connect to many of the services that 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](../consumer/end-user-apps)
.
[](media/service-template-apps-install-distribute/power-bi-all-apps.png#lightbox)
If you're interested in creating template apps yourself for distribution outside your organization, see [Create a template app in Power BI](service-template-apps-create)
. 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](../fundamentals/service-self-service-signup-for-power-bi)
.
* 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](../fundamentals/service-basic-concepts)
.
Install a template app
----------------------
1. In the nav pane in the Power BI service, select **Apps** > **Get apps**.
[](media/service-template-apps-install-distribute/power-bi-get-apps.png#lightbox)
2. In the Power BI apps marketplace that appears, select **Template apps**. All the template apps available in AppSource are shown. Browse to find the template app you're looking for, or get a filtered selection by using the search box. Type part of the name of the template app, or select a category such as finance, analytics, or marketing to find the item you're looking for.
[](media/service-template-apps-install-distribute/app-source-template-apps.png#lightbox)
3. When you find the template app you're looking for, select it. The template app offer appears. Select **Get It Now**.
[](media/service-template-apps-install-distribute/service-github-template-app-appsource-get-it-now.png#lightbox)
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](#customize-and-share-the-app)
.
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 isn't listed on AppSource, you can request the relevant permissions from your admin. See the [template app settings](/en-us/fabric/admin/service-admin-portal-template-app)
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**.
The app opens, showing sample data.
2. Select the **Connect your data** link on the banner at the top of the page.

This link opens the parameters dialog, where you change the data source from the sample data to your own data source (see [known limitations](service-template-apps-overview#known-limitations)
), followed by the authentication method dialog. You might have to redefine the values in these dialogs. See the documentation of the specific template app you're installing for details.
[](media/service-template-apps-install-distribute/power-bi-template-app-connect-to-data-dialogs.png#lightbox)
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're viewing sample data.

Your report data will automatically refresh once a day, unless you disabled this setting during the sign-in process. You can also [set up your own refresh schedule](refresh-scheduled-refresh)
to keep the report data up to date if you so desire.
Customize and share the app
---------------------------
After you've connected to your data and data refresh is complete, you can customize any of the reports and dashboards the app includes, as well as share the app with your colleagues. Remember, however that any changes you make will be overwritten when you update the app with a new version, unless you save the items you changed under different names. [See details about overwriting](#overwrite-behavior)
.
To customize and share your app, select the pencil icon at the top right corner of the page.

For information about editing artifacts in the workspace, see
* [Tour the report editor in Power BI](../create-reports/service-the-report-editor-take-a-tour)
* [Basic concepts for designers in the Power BI service](../fundamentals/service-basic-concepts)
When you're done making changes to the artifacts in the workspace, you're ready to publish and share the app. See [Publish your app](../collaborate-share/service-create-distribute-apps#create-and-publish-your-app)
to learn how.
Update a template app
---------------------
From time to time, template app creators release new improved versions of their template apps, via AppSource, a direct link, or both.
If you originally downloaded the app from AppSource, when a new version of the template app becomes available, you get notified in two ways:
* An update banner appears in the Power BI service informing you that a new app version is available. [](media/service-template-apps-install-distribute/power-bi-new-app-version-notification-banner.png#lightbox)
* You receive a notification in Power BI's notification pane.

Note
If you originally got the app via a direct link rather than through AppSource, the only way to know when a new version is available is to contact the template app creator.
To install the update, either select **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, select the link.
You're asked how you want the update to affect your currently installed app.

* **Update the workspace and the app:** Updates both the workspace and the app, and republishes the app to your organization. Choose this option if you didn't make any changes to the app or its content and want to overwrite the old app. Your connections will be re-established, and the new version of the app will include any updated app branding, such as app name, logo, and navigation, as well as the latest publisher improvements to content.
* **Update only workspace content without updating the app:** Updates the reports, dashboards, and semantic model in the workspace. After updating the workspace, you can choose what you want to include in the app, and then you need to update the app to republish it to your organization with the changes.
* **Install another copy of the app into a new workspace:** Installs a fresh version of the workspace and app. Choose this option if you don’t want to change your current app.
### Overwrite behavior
* Overwriting updates the reports, dashboards, and semantic model in the workspace, not the app. Overwriting doesn't change app navigation, setup, and permissions.
* If you chose the second option, after you've updated the workspace **you need to update the app to apply changes from the workspace to the app**.
* Overwriting keeps configured parameters and authentication. After the update, an automatic semantic model refresh starts. **During this refresh, the app, reports, and dashboards present sample data**.
[](media/service-template-apps-install-distribute/power-bi-sample-data.png#lightbox)
* Overwriting always presents sample data until the refresh is complete. If the template app author made changes to the semantic model or parameters, users of the workspace and app won't see the new data until the refresh is complete. Instead, they'll still 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](#customize-and-share-the-app)
after overwriting to apply changes to the reports and dashboard for your organizational app users.
Delete a template app
---------------------
An installed template app consists of the app and its associated workspace. If you want to remove the template app, you have two options:
* **Completely remove the app and its associated workspace**: To completely remove a template app and its associated workspace, go to the app tile on the Apps page, select the trash icon, and then choose **Delete** in the dialog that appears.
* **Unpublish the app**: This option removes the app but keeps its associated workspace. This option is useful if there are customizations that you made and want to keep.
To unpublish the app:
1. Open the app.
2. Select the edit app pencil icon to open the template app's workspace.
3. In the template app workspace, select **More options (...)**, and then choose **Unpublish App**.

Related content
---------------
* [Create a workspace in Power BI](../collaborate-share/service-create-the-new-workspaces)
* * *
Feedback
--------
Was this page helpful?
Yes No
[Provide product feedback](https://ideas.fabric.microsoft.com/?forum=2d80fd4a-16cb-4189-896b-e0dac5e08b41)
| [Ask the community](https://community.fabric.microsoft.com/powerbi)
* * *
Additional resources
--------------------
---
# Data refresh in Power BI - Power BI | Microsoft Learn
Table of contents Exit focus mode
Ask Learn Ask Learn [Read in English](# "Read in English")
Save[](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/refresh-data.md "Edit This Document")
Table of contents [Read in English](# "Read in English")
Add Add to plan [Edit](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/refresh-data.md "Edit This Document")
* * *
#### Share via
[Facebook](#)
[x.com](#)
[LinkedIn](#)
[Email](#)
* * *
Print
* * *
Note
Access to this page requires authorization. You can try [signing in](#)
or changing directories.
Access to this page requires authorization. You can try changing directories.
Data refresh in Power BI
========================
* Article
* 2025-02-24
* 24 contributors
Feedback
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 Related content section at the end of this article.
Understanding data refresh
--------------------------
Whenever you refresh data, Power BI must query the underlying data sources, possibly load the source data into a semantic model, and then update any visualizations in your reports or dashboards that rely on the updated semantic model. The entire process consists of multiple phases, depending on the storage modes of your semantic models, as explained in the following sections.
To understand how Power BI refreshes your semantic models, reports, and dashboards, you must be aware of the following concepts:
* **Storage modes and semantic model types**: The storage modes and semantic model types that Power BI supports have different refresh requirements. You can choose between reimporting data into Power BI to see any changes that occurred or querying the data directly at the source.
* **Power BI refresh types**: Regardless of semantic model specifics, knowing the various refresh types can help you understand where Power BI might spend its time during a refresh operation. And combining these details with storage mode specifics helps to understand what exactly Power BI does when you select **Refresh now** for a semantic model.
### Storage modes and semantic model types
A Power BI semantic model can operate in one of the following modes to access data from various data sources. For more information, see [Storage mode in Power BI Desktop](../transform-model/desktop-storage-mode)
.
* Import mode
* DirectQuery mode
* Direct Lake mode
* LiveConnect mode
* Push mode
The following diagram illustrates the different data flows, based on storage mode. The most significant point is that only Import mode semantic models require a source data refresh. They require refresh because only this type of semantic model imports data from its data sources, and the imported data might be updated on a regular or ad-hoc basis. Semantic models in DirectQuery, Direct Lake, or LiveConnect mode to Analysis Services don't import data; they query the underlying data source with every user interaction. Semantic models in Push mode don't access any data sources directly but expect you to push the data into Power BI. Semantic model refresh requirements vary depending on the storage mode/semantic model type.

#### Semantic models in Import mode
Power BI imports the data from the original data sources into the semantic model. Power BI report and dashboard queries submitted to the semantic model return results from the imported tables and columns. You might consider such a semantic model a point-in-time copy. Because Power BI copies the data, you must refresh the semantic model to fetch changes from the underlying data sources.
When a semantic model is refreshed, it's either fully refreshed or partially refreshed. Partial refresh takes place in semantic models that have tables with an [incremental refresh](incremental-refresh-overview)
policy. In these semantic models, only a subset of the table partitions are refreshed. In addition, advanced users can use the [XMLA endpoint](../enterprise/service-premium-connect-tools)
to refresh specific partitions in any semantic model.
The amount of memory required to refresh a semantic model depends on whether you're performing a full or partial refresh. During the refresh, a copy of the semantic model is kept to handle queries to the semantic model. This means that if you're performing a full refresh, you'll need twice the amount of memory the semantic model requires.
We recommend that you plan your capacity usage to ensure that the extra memory needed for semantic model refresh is accounted for. Having enough memory prevents refresh issues that can occur if your semantic models require more memory than available during refresh operations. To find out how much memory is available for each semantic model on a Premium capacity, refer to the [Capacities and SKUs](../enterprise/service-premium-what-is#capacities-and-skus)
table.
For more information about large semantic models in Premium capacities, see [large semantic models](../enterprise/service-premium-large-models)
.
#### Semantic models in DirectQuery mode
Power BI doesn't import data over connections that operate in DirectQuery mode. Instead, the semantic model returns results from the underlying data source whenever a report or dashboard queries the semantic model. Power BI transforms and forwards the queries to the data source.
Note
Live connection reports submit queries to the capacity or Analysis Services instance that hosts the semantic model or the model. When using external analysis services such as SQL Server Analysis Services (SSAS) or Azure Analysis Services (AAS), resources are consumed outside of Power BI.
Because Power BI doesn't import the data, you don't need to run a data refresh. However, Power BI still performs tile refreshes and possibly report refreshes, as the next section on refresh types explains. A tile is a report visual pinned to a dashboard, and dashboard tile refreshes happen about every hour so that the tiles show recent results. You can change the schedule in the semantic model settings, as in the screenshot below, or force a dashboard update manually by using the **Refresh now** option.

Note
* Semantic models in Import mode and composite semantic models that combine Import mode and DirectQuery mode don't require a separate tile refresh because Power BI refreshes the tiles automatically during each scheduled or on-demand data refresh. Semantic models that are updated based on the XMLA endpoint will only clear the cached tile data (invalidate cache). The tile caches aren't refreshed until each user accesses the dashboard. For import models, you can find the refresh schedule in the "Scheduled refresh" section of the **Semantic models** tab. For composite semantic models, the "Scheduled refresh" section is located in the **Optimize Performance** section.
* Power BI doesn't support cross-border live connections to Azure Analysis Services (AAS) in a sovereign cloud.
#### Push semantic models
Push semantic models 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 semantic model 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 semantic model. For a detailed walk-through, see [Analyze fraudulent call data with Stream Analytics and visualize results in Power BI dashboard](/en-us/azure/stream-analytics/stream-analytics-power-bi-dashboard)
.
### Power BI refresh types
A Power BI refresh operation can consist of multiple refresh types, including data refresh, OneDrive refresh, refresh of query caches, tile refresh, and refresh of report visuals. While Power BI determines the required refresh steps for a given semantic model automatically, you should know how they contribute to the complexity and duration of a refresh operation. For a quick reference, refer to the following table.
| Storage mode | Data refresh | OneDrive refresh | Query caches | Tile refresh | Report visuals |
| --- | --- | --- | --- | --- | --- |
| Import | Scheduled and on demand | Yes, for connected semantic models | If enabled on Premium capacity | Automatically and on demand | No |
| DirectQuery | Not applicable | Yes, for connected semantic models | Not applicable | Automatically and on demand | No |
| LiveConnect | Not applicable | Yes, for connected semantic models | Not applicable | Automatically and on demand | Yes |
| Push | Not applicable | Not applicable | Not practical | Automatically and on demand | No |
Another way to consider the different refresh types is what they impact and where you can apply them. Changes in data source table structure, or schema, such as a new, renamed, or removed column can only be applied in Power BI Desktop, and in the Power BI service they can cause the refresh to fail. For a quick reference on what they impact, refer to the following table.
| | Refresh of report visuals | Data refresh | Schema refresh |
| --- | --- | --- | --- |
| What do the different refresh types do? | **Queries used to populate visuals are refreshed.**
For visuals using DirectQuery tables, the visual will query to get the latest data from the data source.
For visuals using imported tables, the visual will only query data already imported to the semantic model on the last data refresh. | **Data is refreshed from the data source.**
Doesn't apply to DirectQuery tables as they are at the visual level and rely on refresh of report visuals.
For imported tables, the data is refreshed from the source. | **Any data source table structure change since previous refresh will show.**
For example: To show a new column added to a Power BI Dataflow or SQL Database view.
Applies to imported, DirectQuery, and Direct Lake tables. |
In **Power BI Desktop**, refresh of report visuals, data refresh, and schema refresh all happen together using
* **Home** ribbon > **Refresh** button.
* **Home** ribbon > **Transform data** > **Close & Apply** button.
* The context menu (right-click or select the ellipsis) on any table in the Data pane: choose **Refresh data**.
These refresh types can't always be applied independently, and where you can apply them is different in Power BI Desktop and the Power BI service. For a quick reference, refer to the following table.
| | Refresh of report visuals | Data refresh | Schema refresh |
| --- | --- | --- | --- |
| In **Power BI Desktop** | * **Optimize** ribbon > **Refresh visuals**
* **View** ribbon > **Performance Analyzer** button > **Refresh visuals**
* Creating and changing visuals causing a DAX query to run
* When [Page Refresh](../create-reports/desktop-automatic-page-refresh)
is turned on (DirectQuery only)
* Opening the PBIX file | Not available independently from other refresh types | Not available independently from other refresh types |
| In the **Power BI service** | * When the browser loads or reloads the report
* Clicking the **Refresh Visuals** top right menu bar button
* Clicking the **Refresh** button in edit mode
* When [Page Refresh](../create-reports/desktop-automatic-page-refresh)
is turned on (DirectQuery only) | * Scheduled refresh
* Refresh now
* Refresh a Power BI semantic model from Power Automate
* Processing the table from SQL Server Management Studio (Premium) | Only available for semantic models in [Direct Lake mode](/en-us/fabric/get-started/direct-lake-overview)
when using [Edit tables](/en-us/fabric/get-started/direct-lake-edit-tables)
when [editing a data model in the Power BI service](/en-us/power-bi/transform-model/service-edit-data-models)
. |
| Keep in mind | For example, if you open a report in the browser, then the scheduled refresh performs a data refresh of the imported tables, the report visuals in the open browser won't update until a refresh of report visuals is initiated. | Data refresh in the Power BI service will fail when the source column or table is renamed or removed. It fails because the Power BI service doesn't also include a schema refresh. To correct this error, a schema refresh needs to happen in Power BI Desktop and the semantic model needs to be republished to the service. | A renamed or removed column or table at the data source will be removed with a schema refresh, and it can break visuals and DAX expressions (measures, calculated columns, row-level security, etc.), as well as remove relationships that are dependent on those columns or tables. |
#### Data refresh
For Power BI users, refreshing data typically means importing data from the original data sources into a semantic model, either based on a refresh schedule or on demand. You can perform multiple semantic model refreshes daily, which might be necessary if the underlying source data changes frequently. Power BI limits semantic models on shared capacity to eight scheduled daily semantic model refreshes. The eight time values are stored in the back-end database and are based on the _local time_ zone that was selected on the semantic model settings page. The scheduler checks which model should be refreshed and at what time(s). The quota of eight refreshes resets daily at 12:01 AM local time.

If the semantic model resides on a Premium capacity, you can schedule up to 48 refreshes per day in the semantic model settings. For more information, see [Configure scheduled refresh](#configure-scheduled-refresh)
later in this article. Semantic models on a Premium capacity with the [XMLA endpoint](../enterprise/service-premium-connect-tools)
enabled for read-write support unlimited refresh operations when configured programmatically with TMSL or PowerShell.
It's 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 ribbon on the semantic model settings page, as the following screenshot depicts. On-demand refreshes aren't included in the refresh limitation. Also note that semantic models on a Premium capacity don't impose limitations for API refreshes. If you're interested in building your own refresh solution by using the Power BI REST API, see [semantic models - Refresh semantic model](/en-us/rest/api/power-bi/datasets/refreshdataset)
.

Note
Data refreshes must complete in less than two hours on shared capacity. If your semantic models require longer refresh operations, consider moving the semantic model onto a Premium capacity. On Premium, the maximum refresh duration is five hours, but using XMLA endpoint to refresh data can bypass the five-hour limit.
#### OneDrive refresh
If you created your semantic models 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](service-get-data-from-files)
.
Unlike a semantic model refresh during which Power BI imports data from a data source into a semantic model, OneDrive refresh synchronizes semantic models and reports with their source files. By default, Power BI checks about every hour if a semantic model 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's item ID. However, if you copy that file to another location, a new instance of the file and new item ID 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 semantic model, 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 semantic model.

As the above screenshot shows, Power BI identified this OneDrive refresh as a **Scheduled** refresh, but it isn't possible to configure the refresh interval. You can only deactivate OneDrive refresh in the semantic model's settings. Deactivating refresh is useful if you don't want your semantic models and reports in Power BI to pick up any changes from the source files automatically.
The semantic model settings page only shows the **OneDrive refresh** section if the semantic model is connected to a file in OneDrive or SharePoint Online, as in the following screenshot. Semantic models that aren't connected to source files in OneDrive or SharePoint Online will not show this section. This section displays a link to the OneDrive or SharePoint Online folder where the underlying PBIX file is hosted and a toggle to enable or disable refresh.

If you disable OneDrive refresh for a semantic model, you can still synchronize your semantic model on demand by selecting **Refresh now** in the semantic model menu. As part of the on-demand refresh, Power BI checks if the source file on OneDrive or SharePoint Online is newer than the semantic model in Power BI and synchronizes the semantic model if it is. The **Refresh history** lists these activities as on-demand refreshes on the **OneDrive** tab.
Keep in mind that OneDrive refresh doesn't 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 semantic model 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 history** if you switch to the **Scheduled** tab.

If you keep OneDrive refresh enabled for a OneDrive or SharePoint Online-connected semantic model 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:00 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.
For live connection reports, there is also a **OneDrive refresh** section within the live connection report settings pane. This section displays a link to the OneDrive or SharePoint Online folder where the underlying PBIX file is hosted, a toggle to enable or disable refresh, and a button to view refresh history.

#### Refresh of query caches
If your semantic model resides on a Premium capacity, you might be able to improve the performance of any associated reports and dashboards by enabling query caching, as shown 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](power-bi-query-caching)
.

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 semantic models that you refresh often, for example 48 times per day.
#### Refresh of report visuals
This refresh process is less important because it's 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 doesn't 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.

Only pinned visuals are refreshed, not pinned live pages. To refresh a pinned live page, you can use the browser's Refresh button.
Review data infrastructure dependencies
---------------------------------------
Regardless of storage modes, no data refresh can succeed unless the underlying data sources are accessible. There are three main data access scenarios:
* A semantic model uses data sources that reside on-premises.
* A semantic model uses data sources in the cloud.
* A semantic model uses data from both on-premises and cloud sources.
### Connecting to on-premises data sources
If your semantic model uses a data source that Power BI can't access over a direct network connection, you must configure a gateway connection for this semantic model before you can enable a refresh schedule or perform an on-demand data refresh. For more information about data gateways and how they work, see [What is an on-premises data gateway?](service-gateway-onprem)
You have the following options:
* Choose an enterprise data gateway with the required data source definition.
* Deploy a personal data gateway.
#### Using an enterprise data gateway
Microsoft recommends using an enterprise data gateway instead of a personal gateway to connect a semantic model to an on-premises data source. Make sure the gateway is properly configured, which means the gateway must have the latest updates and all required data source definitions. A data source definition provides Power BI with the connection information for a given source, including connection endpoints, authentication mode, and credentials. For more information about managing data sources on a gateway, see [Manage your data source - import and scheduled refresh](service-gateway-enterprise-manage-scheduled-refresh)
.
Connecting a semantic model to an enterprise gateway is relatively straightforward if you're a gateway administrator. With admin permissions, you can promptly update the gateway and add missing data sources, if necessary. In fact, you can add a missing data source to your gateway straight from the semantic model settings page. Expand the toggle button to view the data sources and select the **Add to gateway** link, as in the following screenshot. If you aren't a gateway administrator, on the other hand, you must contact a gateway admin to add the required data source definition.
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 semantic model 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 semantic model owner in the Sales department would choose the AdventureWorksProducts-Sales data source definition while a semantic model owner in the Support department would map the semantic model 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 semantic model 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 semantic models 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 [Use a personal gateway in Power BI](service-gateway-personal-mode)
.
Unlike 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 semantic model settings, as the following screenshot illustrates.

### Accessing cloud data sources
Semantic models that use cloud data sources, such as Azure SQL DB, don't require a data gateway if Power BI can establish a direct network connection to the source. Accordingly, you can manage the configuration of these data sources by using the **Data source credentials** section in the semantic model settings. As the following screenshot shows, you don't need to configure a gateway connection.

Note
Each user can only have one set of credentials per data source, across all of the semantic models they own, regardless of the workspaces where the semantic models reside. And each semantic model can only have one owner. If you want to update the credentials for a semantic model where you are not the semantic model owner, you must first take over the semantic model by clicking on the Take over button on the semantic model settings page.
### Accessing on-premises and cloud sources in the same source query
A semantic model can get data from multiple sources, and these sources can reside on-premises or in the cloud. However, a semantic model can only use a single gateway connection, as mentioned earlier. While cloud data sources don't necessarily require a gateway, a gateway is required if a semantic model connects to both on-premises and cloud sources in a single mashup query. In this scenario, Power BI must use a gateway for the cloud data sources as well. The following diagram illustrates how such a semantic model accesses its data sources.

Note
If a semantic model uses separate mashup queries to connect to on-premises and cloud sources, Power BI uses a gateway connection to reach the on-premises sources and a direct network connection to access the cloud sources. If a mashup query merges or appends data from on-premises and cloud sources, Power BI switches to the gateway connection even for the cloud sources.
Power BI semantic models 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
OnPremSource = Sql.Database("on-premises-db", "AdventureWorks"),
CloudSource = Sql.Databases("cloudsql.database.windows.net", "AdventureWorks"),
TableData1 = OnPremSource{[Schema="Sales",Item="Customer"]}[Data],
TableData2 = CloudSource {[Schema="Sales",Item="Customer"]}[Data],
MergedData = Table.NestedJoin(TableData1, {"BusinessEntityID"}, TableData2, {"BusinessEntityID"}, "MergedData", JoinKind.Inner)
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 semantic model 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 shouldn't 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's 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
Source = Sql.Database("SqlServer01", "AdventureWorks"),
TableData = Source{[Schema=SchemaName,Item=TableName]}[Data]
in
TableData
Note
Query parameters are only supported for Import mode semantic models. DirectQuery/LiveConnect mode does not support query parameter definitions.
To ensure that a parameterized semantic model accesses the correct data, you must configure the mashup query parameters in the semantic model settings. You can also update the parameters programmatically by using the [Power BI REST API](/en-us/rest/api/power-bi/datasets/updateparametersingroup)
. The following screenshot shows the user interface to configure the query parameters for a semantic model that uses the above mashup query.

Refresh and dynamic data sources
--------------------------------
A _dynamic data source_ is a data source in which some or all of the information required to connect can't be determined until Power Query runs its query, because the data is generated in code or returned from another data source. Examples include: the instance name and database of a SQL Server database; the path of a CSV file; or the URL of a web service.
In most cases, Power BI semantic models that use dynamic data sources can't be refreshed in the Power BI service. There are a few exceptions in which dynamic data sources can be refreshed in the Power BI service, such as when using the RelativePath and Query options with the Web.Contents M function. Queries that reference Power Query parameters can also be refreshed.
To determine whether your dynamic data source can be refreshed, open the **Data source settings** dialog in **Power Query Editor**, and then select **Data sources in current file**. In the window that appears, look for the warning message, as shown in the following image:
Note
Some data sources may not be listed because of hand-authored queries.

If that warning is present in the **Data source settings** dialog that appears, then a dynamic data source that can't be refreshed in the Power BI service is present.
Important
Switching data sources using dynamic M query parameters also isn't supported in the Power BI service.
Configure scheduled refresh
---------------------------
Establishing connectivity between Power BI and your data sources is by far the most challenging task in configuring a data refresh. The remaining steps are relatively straightforward and include setting the refresh schedule and enabling refresh failure notifications. For step-by-step instructions, see the how-to guide [Configure scheduled refresh](refresh-scheduled-refresh)
.
### Setting a refresh schedule
The **Refresh** section is where you define the frequency and time slots to refresh a semantic model. As mentioned earlier, you can configure up to eight daily time slots if your semantic model is on shared capacity, or 48 time slots on Power BI Premium. The following screenshot shows a refresh schedule on a 12-hour interval.

Having configured a refresh schedule, the semantic model settings page informs you about the next refresh time, as in the screenshot above. If you want to refresh the data sooner, to test your gateway and data source configuration, for example, perform an on-demand refresh by using the **Refresh now** option on the semantic model settings page. On-demand refreshes don't affect the next scheduled refresh time.
Tip
Power BI does not have a monthly refresh interval option. However, you can use Power Automate to create a custom refresh interval that occurs monthly, as described in the following [Power BI blog post](https://powerbi.microsoft.com/blog/refresh-your-power-bi-dataset-using-microsoft-flow/)
.
Note also that the configured refresh time might not be the exact time when Power BI starts the next scheduled process. Power BI starts scheduled refreshes on a best-effort basis. 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
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.
### Getting refresh failure notifications
By default, Power BI sends refresh failure notifications to the semantic model owner through email, so that they can act in a timely manner should refresh issues occur. If the owner has the Power BI app on their mobile device, they'll also get the failure notification there. Power BI also sends an email notification when the service disables a scheduled refresh due to consecutive failures. Microsoft recommends that you leave the checkbox **Send refresh failure notification emails semantic model owner** enabled.
It's also a good idea to specify additional recipients for scheduled refresh failure notifications by using the **Email these contacts when the refresh fails** textbox. Specified recipients receive refresh failure notifications via email and push notifications to the mobile app, just like the semantic model owner does. Specified recipients might include a colleague taking care of your semantic models while you are on vacation, or the email alias of your support team taking care of refresh issues for your department or organization. Sending refresh failure notifications to others in addition to the semantic model owner helps ensure that issues get noticed and addressed in a timely manner.
Note
Push notifications to the mobile apps do not support group aliases.
Note that Power BI not only sends notifications on refresh failures but also when the service pauses a scheduled refresh due to inactivity. After two months, when no user has visited any dashboard or report built on the semantic model, Power BI considers the semantic model inactive. In this situation, Power BI sends an email message to the semantic model owner indicating that the service paused the refresh schedule for the semantic model. See the following screenshot for an example of such a notification.

To resume scheduled refresh, visit a report or dashboard built using this semantic model or manually refresh the semantic model using the **Refresh now** option.
Note
Sending refresh notifications to external users is not supported. The recipients you specify in the **Email these users when the refresh fails** textbox must have accounts in your Microsoft Entra tenant. This limitation applies to both semantic model refresh and dataflow refresh.
### Checking refresh status and history
In addition to failure notifications, it's a good idea to check your semantic models periodically for refresh errors. A quick way is to view the list of semantic models in a workspace. Semantic models 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 [Troubleshoot refresh scenarios](refresh-troubleshooting-refresh-scenarios)
.

The warning icon helps to indicate current semantic model issues, but it's 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 semantic model settings. You can also retrieve the refresh history programmatically by using the [Power BI REST API](/en-us/rest/api/power-bi/datasets/getrefreshhistoryingroup)
. By using a custom solution, you can monitor the refresh history of multiple semantic models in a centralized way.
Automatic page refresh
----------------------
Automatic page refresh works at a report page level, and allows report authors to set a refresh interval for visuals on a page that is only active when the page is being consumed. Automatic page refresh is only available for DirectQuery data sources. The minimum refresh interval depends on which type of workspace the report is published in, and the capacity admin settings for Premium workspaces and [embedded workspaces](../developer/embedded/embedded-capacity)
.
Learn more about automatic page refresh in the [automatic page refresh](../create-reports/desktop-automatic-page-refresh)
article.
Semantic model refresh history
------------------------------
Refresh attempts for Power BI semantic models might not always go smoothly, or they might take longer than expected. You can use the **Refresh history** page to help you diagnose why a refresh might not have happened as you expected.
Power BI automatically makes multiple attempts to refresh a semantic model if it experiences a refresh failure. Without insight into refresh history activities, it might just seem like a refresh is taking longer than expected. With the **Refresh history** page, you can see those failed attempts and gain insight into the reason for the failure.
The following screenshot shows a failed refresh, with details about each time Power BI automatically attempted to successfully complete the refresh.

You can also see when Power BI succeeds after previous attempts failed, as shown in the following image, which reveals that Power BI succeeded only after three previous failures. Notice the successful data refresh and query cache share the same index number, indicating they both were successful on the fourth attempt.

You can select the _Show_ link beside a failure to get more information about the failed refresh attempt, which can help with troubleshooting the issue.
In addition, each Power BI refresh attempt is divided into two operations:
* **Data** – Load data into the semantic model.
* **Query Cache** – Premium query caches and/or dashboard tiles refresh.
The following images show how **Refresh history** separates those operations and provides information about each.

Significant use of dashboard tiles or premium caching can increase refresh duration, since either can queue many queries after each refresh. You can either reduce the number of dashboards or [disable automatic cache refresh](/en-us/analysis-services/server-properties/general-properties)
setting to help reduce the number of queries.
The data and query cache phases are independent of each other, but run in sequence. The data refresh runs first, and when that succeeds, the query cache refresh runs. If the data refresh fails, the query refresh is not initiated. It's possible that the data refresh can run successfully, but the query cache refresh fails.
Refreshes made using the [XMLA endpoint](../enterprise/service-premium-connect-tools#semantic-model-refresh)
won't show attempt details in the **Refresh history** window.
Note
You can enhance monitoring with workspace monitoring. For more information, see [What is workspace monitoring?](/en-us/fabric/fundamentals/workspace-monitoring-overview)
Visualize semantic model refresh details
----------------------------------------
In the **Fabric Monitoring Hub** you can centrally monitor Microsoft Fabric activities. The hub displays refresh activities for all semantic models including the status of its most recent refresh. When selecting an activity name, you can access a dedicated **Semantic Model Refresh Detail** page that provides comprehensive information about the selected refresh activity.
The following image shows the **Fabric Monitoring Hub**, filtered for semantic models:
[](media/refresh-data/visualize-semantic-model-refresh-01.png#lightbox)
You can select a refresh activity to display its refresh detail page, with comprehensive information about the refresh activity:
[](media/refresh-data/visualize-semantic-model-refresh-02.png#lightbox)
The refresh activity page shows comprehensive details for a selected refresh activity, including capacity, gateway, start and end times, error details, and [multiple refresh attempts](#semantic-model-refresh-history)
.
### Access refresh details
You can access semantic model refresh details from multiple locations: the **Monitoring hub historical runs**, [semantic model refresh settings](#checking-refresh-status-and-history)
and [semantic model detail page](service-dataset-details-page)
.
The following image highlights where to click on the semantic model refresh settings window, to access refresh details:
[](media/refresh-data/visualize-semantic-model-refresh-03.png#lightbox)
In the following image, you can see where to click on the semantic model details page to access refresh details:
[](media/refresh-data/visualize-semantic-model-refresh-04.png#lightbox)
### View refresh metrics
For each refresh attempt, you can view the execution metrics by selecting the **Show** link in the **Execution details** column. Execution metrics can assist with troubleshooting or optimizing the semantic model refresh. Previously, this execution metrics data was accessible through **Log Analytics** or **Fabric Workspace Monitoring**.

### Link from external applications
You can link semantic model refresh details from external applications by constructing a URL with the workspace, semantic model, and refresh ID. The following line shows the structure of such URLs:
`https://app.powerbi.com/groups/{workspaceId}/datasets/{semanticModelId}/refreshdetails/{refreshId}`
For example, the following Fabric Notebook uses semantic link _sempy_ and Power BI API Get Refresh History to create a refresh detail URL for each run of a semantic model:
import sempy
import sempy.fabric as fabric
import pandas as pd
workspaceId = "[Your Workspace Id]"
semanticModelId = "[Your semantic model Id]"
client = fabric.FabricRestClient()
response = client.get(f"/v1.0/myorg/groups/{workspaceId}/datasets/{semanticModelId}/refreshes")
refreshHistory = pd.json_normalize(response.json()['value'])
refreshHistory["refreshLink"] = refreshHistory.apply(lambda x:f"https://app.powerbi.com/groups/{workspaceId}/datasets/{semanticModelId}/refreshdetails/{x['requestId']}", axis=1)
displayHTML(refreshHistory[["requestId", "refreshLink"]].to_html(render_links=True, escape=False))
The previous code generates a table with refresh IDs and their corresponding detail page URLs, as shown in the following image:

Refresh cancellation
--------------------
Stopping a semantic model refresh is useful when you want to stop a refresh of a large semantic model during peak time. Use the refresh cancellation feature to stop refreshing semantic models that reside on [Premium](../enterprise/service-premium-what-is)
, [Premium Per User (PPU)](../enterprise/service-premium-per-user-faq)
or [Power BI Embedded](../developer/embedded/embedded-analytics-power-bi)
capacities.
To cancel a semantic model refresh, you need to be a contributor, member, or an admin of the semantic model's workspace. Semantic model refresh cancellation only works with semantic models that use [Import mode](service-dataset-modes-understand#import-mode)
or [Composite mode](service-dataset-modes-understand#composite-mode)
.
Note
Semantic models created as part of datamarts aren't supported.
To start a refresh, go to the semantic model you want to refresh, then select **Refresh now**.

To stop a refresh, follow these steps:
1. Go to the semantic model that's refreshing and select **Cancel refresh**.

2. In the _Cancel refresh_ pop-up window, select **Yes**.

Best practices
--------------
Checking the refresh history of your semantic models 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 semantic models:
* Schedule your refreshes for less busy times, especially if your semantic models are on Power BI Premium. If you distribute the refresh cycles for your semantic models across a broader time window, you can help avoid peaks that might otherwise overtax available resources. Delays starting a refresh cycle are an indicator of resource overload. If a Premium capacity is 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 semantic model. You should also be aware that 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](desktop-use-directquery)
. These limitations might require you to use Import mode nonetheless. For large data volumes, consider the use of [aggregations in Power BI](../enterprise/aggregations-auto)
.
* Verify that your semantic model refresh time doesn't exceed the maximum refresh duration. Use Power BI Desktop to check the refresh duration. If it takes more than two hours, consider moving your semantic model to Power BI Premium. Your semantic model might not be refreshable on shared capacity. Also consider using [incremental refresh](incremental-refresh-overview)
for semantic models that are larger than 1 GB or that take several hours to refresh.
* Optimize your semantic models 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 semantic model.
* Limit the number of visuals on your dashboards, especially if you use [row-level security (RLS)](/en-us/fabric/security/service-admin-row-level-security)
. 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 semantic models 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 semantic models in Import mode and DirectQuery/LiveConnect semantic models so that the data imports during scheduled refresh don't impact the performance of reports and dashboards on top of DirectQuery/LiveConnect semantic models, 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.
Related content
---------------
* [Configure scheduled refresh](refresh-scheduled-refresh)
* [Troubleshooting refresh scenarios](refresh-troubleshooting-refresh-scenarios)
* [Troubleshoot gateways - Power BI](service-gateway-onprem-tshoot)
More questions? [Try asking the Power BI Community](https://community.powerbi.com/)
* * *
Feedback
--------
Was this page helpful?
Yes No
[Provide product feedback](https://ideas.fabric.microsoft.com/?forum=2d80fd4a-16cb-4189-896b-e0dac5e08b41)
| [Ask the community](https://community.fabric.microsoft.com/powerbi)
* * *
Additional resources
--------------------
---
# Configure scheduled refresh - Power BI | Microsoft Learn
Table of contents Exit focus mode
Ask Learn Ask Learn [Read in English](# "Read in English")
Save[](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/refresh-scheduled-refresh.md "Edit This Document")
Table of contents [Read in English](# "Read in English")
Add Add to plan [Edit](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/refresh-scheduled-refresh.md "Edit This Document")
* * *
#### Share via
[Facebook](#)
[x.com](#)
[LinkedIn](#)
[Email](#)
* * *
Print
* * *
Note
Access to this page requires authorization. You can try [signing in](#)
or changing directories.
Access to this page requires authorization. You can try changing directories.
Configure scheduled refresh
===========================
* Article
* 2024-08-15
* 10 contributors
Feedback
Note
After two months of inactivity, scheduled refresh on your semantic model is paused. For more information, see [_Scheduled refresh_](#scheduled-refresh)
later in this article.
This article describes the options available for scheduled refresh for the [On-premises data gateway (personal mode)](service-gateway-personal-mode)
and the [On-premises data gateway](service-gateway-onprem)
. You specify refresh options in the following areas of the Power BI service: **Gateway connection**, **Data source credentials**, and **Schedule refresh**. We'll look at each in turn. For more information about data refresh, including limitations on refresh schedules, see [Data refresh](refresh-data#data-refresh)
.
To get to the **Schedule refresh** screen:
1. Go to the workspace and select a semantic model from the workspace content list.
2. On the semantic model details page, select **Refresh** > **Schedule refresh**.

Gateway and cloud connections
-----------------------------
You'll see different options here depending on whether you have a personal gateway or enterprise gateway online and available.
If no gateway is available, you'll see **Gateway connection** disabled. You'll 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.
Data source credentials
-----------------------
### Power BI Gateway - Personal
If you're using the personal gateway to refresh data, you must supply the credentials to connect to the back-end data source. If you connected to an app from an online service, the credentials you entered to connect are carried over for scheduled refresh.

You're only required to sign in to a data source the first time you use refresh on that semantic model. Once entered, those credentials are retained with the semantic model.
Note
For some authentication methods, if the password you use to sign in to a data source expires or is changed, you need to change it for the data source in **Data source credentials** too.
If there's a problem, typically it's either the gateway is 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 semantic model settings. If the gateway service is offline, **Status** is where you see the error. If Power BI can't sign in to the data sources, you see an error in Data source credentials.
### On-premises data gateway
If you're using the on-premises data gateway to refresh data, you don't need to supply credentials, as they're 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 **Refresh** section is where you define the frequency and time slots to refresh the semantic model. Some data sources don't require a gateway to be configurable for refresh, while other data sources require a gateway.
In a DirectQuery scenario, when a semantic model qualifies for performance optimization, **Refresh** will be moved to the **Optimize performance** section.
Set the **Configure a refresh schedule** 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. Refresh can begin as early as five minutes before the scheduled refresh time.

Note
After two months of inactivity, scheduled refresh on your semantic model is paused. A semantic model is considered inactive when no user has visited any dashboard or report built on the semantic model. When scheduled refresh is paused, the semantic model owner is sent an email. The refresh schedule for the semantic model is then displayed as **disabled**. To resume scheduled refresh, revisit any dashboard or report built on the semantic model.
What's supported?
-----------------
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.
Tip
Power BI does not have a monthly refresh interval option. However, you can use Power Automate to create a custom refresh interval that occurs monthly, as described in the following [Power BI blog post](https://powerbi.microsoft.com/blog/refresh-your-power-bi-dataset-using-microsoft-flow/)
.
Certain semantic models are supported against different gateways for scheduled refresh.
### Power BI Gateway - Personal
**Power BI Desktop**
* All online data sources shown in Power BI Desktop's **Get data** and Power Query Editor.
* All on-premises data sources shown in Power BI Desktop's **Get data** and Power Query Editor except for Hadoop files (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 files (HDFS) and Microsoft Exchange.
* All online data sources shown in Power Pivot.
* All on-premises data sources shown in Power Pivot except for Hadoop files (HDFS) and Microsoft Exchange.
Note
In Excel 2016 and later, **Launch Power Query Editor** is available from **Get Data** in the **Data** ribbon.
### Power BI Gateway
For information about supported data sources, see [Power BI data sources](power-bi-data-sources)
.
Troubleshooting
---------------
Sometimes refreshing data might not go as expected, typically due to an issue connected with a gateway. See these gateway troubleshooting articles for tools and known issues.
* [Troubleshoot the on-premises data gateway](service-gateway-onprem-tshoot)
* [Troubleshoot Power BI gateway (personal mode)](service-admin-troubleshooting-power-bi-personal-gateway)
Related content
---------------
* [Data refresh in Power BI](refresh-data)
* [Use a personal gateway in Power BI](service-gateway-personal-mode)
* [On-premises data gateway (overview)](service-gateway-onprem)
More questions? [Try asking the Power BI Community](https://community.powerbi.com/)
* * *
Feedback
--------
Was this page helpful?
Yes No
[Provide product feedback](https://ideas.fabric.microsoft.com/?forum=2d80fd4a-16cb-4189-896b-e0dac5e08b41)
| [Ask the community](https://community.fabric.microsoft.com/powerbi)
* * *
Additional resources
--------------------
---
# Incremental refresh for semantic models in Power BI - Power BI | Microsoft Learn
Table of contents Exit focus mode
Ask Learn Ask Learn [Read in English](# "Read in English")
Save[](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/incremental-refresh-overview.md "Edit This Document")
Table of contents [Read in English](# "Read in English")
Add Add to plan [Edit](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/incremental-refresh-overview.md "Edit This Document")
* * *
#### Share via
[Facebook](#)
[x.com](#)
[LinkedIn](#)
[Email](#)
* * *
Print
* * *
Note
Access to this page requires authorization. You can try [signing in](#)
or changing directories.
Access to this page requires authorization. You can try changing directories.
Incremental refresh and real-time data for semantic models
==========================================================
* Article
* 2024-08-20
* 13 contributors
Feedback
Incremental refresh and real-time data for semantic models in Power BI provide efficient ways to handle dynamic data and improve model refresh performance. By automating partition creation and management, incremental refresh reduces the amount of data that needs to be refreshed and allows for the inclusion of real-time data. This article explains how to configure and use incremental refresh features in Power BI to capture fast-moving data and enhance performance.
Incremental refresh extends scheduled refresh operations by providing automated partition creation and management for semantic model tables that frequently load new and updated data. For most models, one or more tables contain transaction data that changes often and can grow exponentially, like a fact table in a relational or star database schema. An incremental refresh policy to partition the table, refreshing only the most recent import partitions, and optionally using another DirectQuery partition for real-time data can significantly reduce the amount of data that has to be refreshed. At the same time, this policy ensures that the latest changes at the data source are included in the query results.
With incremental refresh and real-time data:
* **Fewer refresh cycles for fast-changing data are needed.** DirectQuery mode gets the latest data updates as queries are processed, without requiring a high refresh cadence.
* **Refreshes are faster.** Only the most recent data that has changed needs to be refreshed.
* **Refreshes are more reliable.** Long-running connections to volatile data sources aren't necessary. Queries to source data run faster, reducing potential for network problems to interfere.
* **Resource consumption is reduced.** Less data to refresh reduces overall consumption of memory and other resources in both Power BI and data source systems.
* **Large semantic models are enabled.** Semantic models with potentially billions of rows can grow without the need to fully refresh the entire model with each refresh operation.
* **Setup is easy.** Incremental refresh _policies_ are defined in Power BI Desktop with just a few tasks. When Power BI Desktop publishes the report, the service automatically applies those policies with each refresh.
When you publish a Power BI Desktop model to the service, each table in the new model has a single partition. That single partition contains all rows for that table. If the table is large, say with tens of millions of rows or more, a refresh for that table can take a long time and consume an excessive amount of resources.
With incremental refresh, the service dynamically partitions and separates data that needs to be refreshed frequently from data that can be refreshed less frequently. Table data is filtered by using Power Query date/time parameters with the reserved, case-sensitive names `RangeStart` and `RangeEnd`. When you configure incremental refresh in Power BI Desktop, these parameters are used to filter only a small period of data that's loaded into the model. When Power BI Desktop publishes the report to the Power BI service, with the first refresh operation the service creates incremental refresh and historical partitions, and optionally a real-time DirectQuery partition based on the incremental refresh policy settings. The service then overrides the parameter values to filter and query data for each partition based on date/time values for each row.
With each subsequent refresh, the query filters return only those rows within the refresh period dynamically defined by the parameters. Those rows with a date/time within the refresh period are refreshed. Rows with a date/time no longer within the refresh period then become part of the historical period, which isn't refreshed. If a real-time DirectQuery partition is included in the incremental refresh policy, its filter is also updated so that it picks up any changes that occur after the refresh period. Both the refresh and historical periods are rolled forward. As new incremental refresh partitions are created, refresh partitions no longer in the refresh period become historical partitions. Over time, historical partitions become less granular as they're merged together. When a historical partition is no longer in the historical period defined by the policy, it's removed from the model entirely. This behavior is known as a _rolling window pattern_.

The beauty of incremental refresh is that the service handles all of it for you based on the incremental refresh policies you define. In fact, the process and partitions created from it aren't visible in the service. In most cases, a well-defined incremental refresh policy is all that's necessary to significantly improve model refresh performance. However, the real-time DirectQuery partition is only supported for models in Premium capacities. Power BI Premium also enables more advanced partition and refresh scenarios through the [XML for Analysis (XMLA) endpoint](/en-us/power-bi/enterprise/service-premium-connect-tools)
.
Requirements
------------
The next sections describe the supported plans and data sources.
### Supported plans
Incremental refresh is supported for Power BI Premium, Premium per user, Power BI Pro, and Power BI Embedded models.
Getting the latest data in real time with DirectQuery is only supported for Power BI Premium, Premium per user, and Power BI Embedded models.
### Supported data sources
Incremental refresh and real-time data works best for structured, relational data sources like SQL Database and Azure Synapse, but can also work for other data sources. In any case, your data source must support the following:
**Date filtering** - The data source must support some mechanism to filter data by date. For a relational source, this is typically a date column of the date/time or integer data type on the target table. The RangeStart and RangeEnd parameters, which must be the date/time data type, filter table data based on the date column. For date columns of integer surrogate keys in the form of `yyyymmdd`, you can create a function that converts the date/time value in the RangeStart and RangeEnd parameters to match the integer surrogate keys of the date column. To learn more, see [Configure incremental refresh and real-time data - Convert DateTime to integer](incremental-refresh-configure#convert-datetime-to-integer)
.
For other data sources, the RangeStart and RangeEnd parameters must be passed to the data source in some way that enables filtering. For file-based data sources where files and folders are organized by date, the RangeStart and RangeEnd parameters can be used to filter the files and folders to select which files to load. For web-based data sources, the RangeStart and RangeEnd parameters can be integrated into the HTTP request. For example, the following query can be used for incremental refresh of the traces from an AppInsights instance:
let
strRangeStart = DateTime.ToText(RangeStart,[Format="yyyy-MM-dd'T'HH:mm:ss'Z'", Culture="en-US"]),
strRangeEnd = DateTime.ToText(RangeEnd,[Format="yyyy-MM-dd'T'HH:mm:ss'Z'", Culture="en-US"]),
Source = Json.Document(Web.Contents("https://api.applicationinsights.io/v1/apps//query",
[Query=[#"query"="traces \
| where timestamp >= datetime(" & strRangeStart &") \
| where timestamp < datetime("& strRangeEnd &")\
",#"x-ms-app"="AAPBI",#"prefer"="ai.response-thinning=true"],Timeout=#duration(0,0,4,0)])),
TypeMap = #table(
{ "AnalyticsTypes", "Type" },
{
{ "string", Text.Type },
{ "int", Int32.Type },
{ "long", Int64.Type },
{ "real", Double.Type },
{ "timespan", Duration.Type },
{ "datetime", DateTimeZone.Type },
{ "bool", Logical.Type },
{ "guid", Text.Type },
{ "dynamic", Text.Type }
}),
DataTable = Source[tables]{0},
Columns = Table.FromRecords(DataTable[columns]),
ColumnsWithType = Table.Join(Columns, {"type"}, TypeMap , {"AnalyticsTypes"}),
Rows = Table.FromRows(DataTable[rows], Columns[name]),
Table = Table.TransformColumnTypes(Rows, Table.ToList(ColumnsWithType, (c) => { c{0}, c{3}}))
in
Table
When incremental refresh is configured, a Power Query expression that includes a date/time filter based on the RangeStart and RangeEnd parameters is executed against the data source. If the filter is specified in a query step after the initial source query, it's important that query folding combines the initial query step with the steps that reference the RangeStart and RangeEnd parameters. For example, in the following query expression, `Table.SelectRows` will fold because it immediately follows the `Sql.Database` step, and SQL Server supports folding:
let
Source = Sql.Database("dwdev02","AdventureWorksDW2017"),
Data = Source{[Schema="dbo",Item="FactInternetSales"]}[Data],
#"Filtered Rows" = Table.SelectRows(Data, each [OrderDateKey] >= Int32.From(DateTime.ToText(RangeStart,[Format="yyyyMMdd"]))),
#"Filtered Rows1" = Table.SelectRows(#"Filtered Rows", each [OrderDateKey] < Int32.From(DateTime.ToText(RangeEnd,[Format="yyyyMMdd"])))
in
#"Filtered Rows1"
There's no requirement for _final query_ to support folding. For example, in the following expression, we use a non-folding NativeQuery but integrate the RangeStart and RangeEnd parameters directly into SQL:
let
Query = "select * from dbo.FactInternetSales where OrderDateKey >= '"& Text.From(Int32.From( DateTime.ToText(RangeStart,"yyyyMMdd") )) &"' and OrderDateKey < '"& Text.From(Int32.From( DateTime.ToText(RangeEnd,"yyyyMMdd") )) &"' ",
Source = Sql.Database("dwdev02","AdventureWorksDW2017"),
Data = Value.NativeQuery(Source, Query, null, [EnableFolding=false])
in
Data
However, if the incremental refresh policy includes getting real-time data with DirectQuery, non-folding transformations can't be used. If it’s a pure Import mode policy without real-time data, the query mashup engine might compensate and apply the filter locally, which requires retrieving all rows for the table from the data source. This can cause incremental refresh to be slow, and the process can run out of resources either in the Power BI service or in an on-premises data gateway - effectively defeating the purpose of incremental refresh.
Because support for query folding is different for different types of data sources, verification should be performed to ensure the filter logic is included in the queries being run against the data source. In most cases, Power BI Desktop attempts to perform this verification for you when defining the incremental refresh policy. For SQL-based data sources such as SQL Database, Azure Synapse, Oracle, and Teradata, this verification is reliable. However, other data sources may be unable to verify without tracing the queries. If Power BI Desktop is unable to confirm the queries, a warning is shown in the Incremental refresh policy configuration dialog.

If you see this warning and want to verify the necessary query folding is occurring, use the Power Query Diagnostics feature, or trace queries by using a tool supported by the data source, such as SQL Profiler. If query folding isn't occurring, verify the filter logic is included in the query being passed to the data source. If not, it's likely the query includes a transformation that prevents folding.
Before configuring your incremental refresh solution, be sure to thoroughly read and understand [Query folding guidance in Power BI Desktop](../guidance/power-query-folding)
and [Power Query query folding](/en-us/power-query/power-query-folding)
. These articles can help you determine whether your data source and queries support query folding.
#### Single data source
When you configure incremental refresh and real-time data by using Power BI Desktop, or configure an advanced solution by using Tabular Model Scripting Language (TMSL) or Tabular Object Model (TOM) through the XMLA endpoint, _all partitions_, whether import or DirectQuery, must query data from a single source.
#### Other data source types
By using more custom query functions and query logic, incremental refresh can be used with other types of data sources if filters based on `RangeStart` and `RangeEnd` can be passed in a single query, like with data sources such as Excel workbook files stored in a folder, files in SharePoint, and RSS feeds. Keep in mind these are advanced scenarios that require further customization and testing beyond what is described here. Be sure to check the [Community](#community)
section later in this article for suggestions on how you can find more information about using incremental refresh for unique scenarios.
Time limits
-----------
Regardless of incremental refresh, Power BI Pro models have a refresh time limit of **two hours** and don't support getting real-time data with DirectQuery. For models in a Premium capacity, the time limit is **five hours**. Refresh operations are process- and memory-intensive. A full refresh operation can use as much as double the amount of memory required by the model alone, because the service maintains a snapshot of the model in memory until the refresh operation is complete. Refresh operations can also be process-intensive, consuming a significant amount of available CPU resources. Refresh operations must also rely on volatile connections to data sources, and the ability of those data source systems to quickly return query output. The time limit is a safeguard to limit over-consumption of your available resources.
Note
With Premium capacities, refresh operations performed through the XMLA endpoint have no time limit. To learn more, see [**Advanced incremental refresh with the XMLA endpoint**](incremental-refresh-xmla)
.
Because incremental refresh optimizes refresh operations at the partition level in the model, resource consumption can be significantly reduced. At the same time, even with incremental refresh, unless they go through the XMLA endpoint, refresh operations are bound by those same two-hour and five-hour limits. An effective incremental refresh policy not only reduces the amount of data processed with a refresh operation, but also reduces the amount of unnecessary historical data stored in your model.
Queries can also be limited by a default time limit for the data source. Most relational data sources allow overriding time limits in the Power Query M expression. For example, the following expression uses the [SQL Server data-access function](/en-us/powerquery-m/sql-database)
to set CommandTimeout to two 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"
For _very large_ models in Premium capacities that likely contain billions of rows, the initial refresh operation can be bootstrapped. Bootstrapping allows the service to create table and partition objects for the model, but doesn't load and process data into any of the partitions. By using SQL Server Management Studio, you can set partitions to be processed individually, sequentially, or in parallel, to both reduce the amount of data returned in a single query, and also bypass the five-hour time limit. To learn more, see [Advanced incremental refresh - Prevent timeouts on initial full refresh](incremental-refresh-xmla#prevent-timeouts-on-initial-full-refresh)
.
### Current date and time
By default, the current date and time is determined based on Coordinated Universal Time (UTC) at the time of refresh. For on-demand, scheduled and REST API refreshes, you can configure a different time zone under 'Refresh' that will be taken into account when determining the current date and time. For example, a refresh that occurs at 8:00 PM Pacific Time (US and Canada) with a time zone configured determines the current date and time based on Pacific Time, not UTC, which would return the next day.

Refresh operations not invoked through the Power BI service, such as the [XMLA TMSL refresh command](/en-us/analysis-services/tmsl/refresh-command-tmsl?view=power-bi-premium-current&preserve-view=true)
, do not consider the time zone configuration and default to UTC.
Configure incremental refresh and real-time data
------------------------------------------------
This section describes important concepts of configuring incremental refresh and real-time data. When you're ready for more detailed step-by-step instructions, see [Configure incremental refresh and real-time data](incremental-refresh-configure)
.
Configuring incremental refresh is done in Power BI Desktop. For most models, only a few tasks are required. However, keep the following points in mind:
* After publishing to the Power BI service, you can't publish the same model again from Power BI Desktop. Republishing removes any existing partitions and data already in the model. If you're publishing to a Premium capacity, subsequent metadata schema changes can be made with tools such as the open-source ALM Toolkit, or by using TMSL. To learn more, see [Advanced incremental refresh - Metadata-only deployment](incremental-refresh-xmla#metadata-only-deployment)
.
* After publishing to the Power BI service, you can't download the model back as a _.pbix_ to Power BI Desktop. Because models in the service can grow so large, it's impractical to download and open them on a typical desktop computer.
* When getting real-time data with DirectQuery, you can't publish the model to a non-Premium workspace. Incremental refresh with real-time data is only supported with Power BI Premium.
### Create parameters
To configure incremental refresh in Power BI Desktop, you first create two Power Query date/time parameters with the reserved, case-sensitive names `RangeStart` and `RangeEnd`. These parameters, defined in the Manage Parameters dialog in Power Query Editor, are initially used to filter the data loaded into the Power BI Desktop model table to include only those rows with a date/time within that period. `RangeStart` represents the oldest, or earliest date/time, and `RangeEnd` represents the newest, or latest date/time. After the model is published to the service, `RangeStart` and `RangeEnd` are overridden automatically by the service to query data defined by the refresh period specified in the incremental refresh policy settings.
For example, the FactInternetSales data source table averages 10,000 new rows per day. To limit the number of rows initially loaded into the model in Power BI Desktop, specify a two-day period between `RangeStart` and `RangeEnd`.

### Filter data
With the `RangeStart` and `RangeEnd` parameters defined, you apply custom date filters on your table's date column. The filters you apply select a subset of data that's loaded into the model when you select **Apply**.

With our FactInternetSales example, after creating filters based on the parameters and applying steps, two days of data (roughly 20,000 rows) are loaded into the model.
### Define policy
After filters have been applied and a subset of data has been loaded into the model, you define an incremental refresh policy for the table. After the model is published to the service, the policy is used by the service to create and manage table partitions and perform refresh operations. To define the policy, you use the **Incremental refresh and real-time data** dialog box to specify both required and optional settings.

#### Table
The **Select table** listbox defaults to the table you selected in Table view. Enable incremental refresh for the table with the slider. If the Power Query expression for the table doesn't include a filter based on the `RangeStart` and `RangeEnd` parameters, the toggle isn't available.
#### Required settings
The **Archive data starting before refresh date** setting determines the historical period in which rows with a date/time in that period are included in the model, plus rows for the current incomplete historical period, plus rows in the refresh period up to the current date and time.
For example, if you specify five _years_, the table stores the last five whole years of historical data in year partitions. The table will also include rows for the current year in quarter, month, or day partitions, up to and including the refresh period.
For models in Premium capacities, backdated historical partitions can be selectively refreshed at a granularity determined by this setting. To learn more, see [Advanced incremental refresh - Partitions](incremental-refresh-xmla#partitions)
.
The **Incrementally refresh data starting before refresh date** setting determines the incremental refresh period in which all rows with a date/time in that period are included in the refresh partitions and refreshed with each refresh operation.
For example, if you specify a refresh period of three days, with each refresh operation, the service overrides the `RangeStart` and `RangeEnd` parameters to create a query for rows with a date/time within a three-day period, with the beginning and ending dependent on the current date and time. Rows with a date/time in the last three days up to the current refresh operation time are refreshed. With this type of policy, you can expect our FactInternetSales model table in the service, which averages 10,000 new rows per day, to refresh roughly 30,000 rows with each refresh operation.
Specify a period that includes only the minimum number of rows required to ensure accurate reporting. When you define policies for more than one table, the same `RangeStart` and `RangeEnd` parameters must be used even if different store and refresh periods are defined for each table.
#### Optional settings
The **Get the latest data in real time with DirectQuery (Premium only)** setting enables fetching the latest changes from the selected table at the data source beyond the incremental refresh period by using DirectQuery. All rows with a date/time later than the incremental refresh period are included in a DirectQuery partition and fetched from the data source with every model query.
For example, if this setting is enabled, with each refresh operation, the service still overrides the `RangeStart` and `RangeEnd` parameters to create a query for rows with a date/time after the refresh period, with the beginning dependent on the current date and time. Rows with a date/time after the current refresh operation time are also included. With this type of policy, the FactInternetSales model table in the service includes the latest data updates.
The **Only refresh complete days** setting ensures all rows for the entire day are included in the refresh operation. This setting is optional _unless_ you enable the **Get the latest data in real time with DirectQuery (Premium only)** setting. For example, say your refresh is scheduled to run at 4:00 AM every morning. If new rows of data appear in the data source table during those four hours between midnight and 4:00 AM, you don't want to account for them. Some business metrics, like barrels per day in the oil and gas industry, make no sense with partial days. Another example is refreshing data from a financial system where data for the previous month is approved on the twelfth calendar day of the month. You could set the refresh period to one month and schedule the refresh to run on the twelfth day of the month. With this option selected, it would, for example, refresh January data on February 12.
Keep in mind, unless time zone under 'Refresh' is configured for a non-UTC one, refresh operations in the service run under UTC time, which can determine the effective date and complete periods.
The **Detect data changes** setting enables even more selective refresh. You can select a date/time column used to identify and refresh only those days where the data has changed. This setting assumes such a column exists in the data source, which is typically for auditing purposes. This column _shouldn't_ be the same column used to partition the data with the `RangeStart` and `RangeEnd` parameters. The maximum value of this column is evaluated for each of the periods in the incremental range. If it hasn't changed since the last refresh, there's no need to refresh the period, which could potentially further reduce the days incrementally refreshed from three to one.
The current design requires that the column to detect data changes is persisted and cached into memory. The following techniques can be used to reduce cardinality and memory consumption:
* Persist only the maximum value of the column at the time of refresh, perhaps by using a Power Query function.
* Reduce the precision to an acceptable level, given your refresh-frequency requirements.
* Define a custom query for detecting data changes by using the XMLA endpoint, and avoid persisting the column value altogether.
In some cases, enabling the **Detect data changes** option can be further enhanced. For example, you may want to avoid persisting a last-update column in the in-memory cache, or enable scenarios where a configuration/instruction table is prepared by extract-transform-load (ETL) processes for flagging only those partitions that need to be refreshed. In cases like these, for Premium capacities, use TMSL and/or the TOM to override the detect data changes behavior. To learn more, see [Advanced incremental refresh - Custom queries for detect data changes](incremental-refresh-xmla#custom-queries-for-detect-data-changes)
.
Publish
-------
After configuring the incremental refresh policy, you publish the model to the service. When publishing is complete, you can perform the initial refresh operation on the _model_.
Note
Semantic models with an incremental refresh policy to get the latest data in real time with DirectQuery can only be published to a Premium workspace.
For models published to workspaces assigned to Premium capacities, if you think the model will grow beyond 1 GB, you can improve refresh operation performance and ensure the model doesn't max out size limits by enabling the Large semantic model storage format setting _before_ performing the first refresh operation in the service. To learn more, see [Large models in Power BI Premium](../enterprise/service-premium-large-models)
.
Important
After Power BI Desktop publishes the model to the service, you can't download that _.pbix_ back.
Refresh
-------
After publishing to the service, you perform an initial refresh operation on the model. This refresh should be an individual (manual) refresh so you can monitor progress. The initial refresh operation can take quite a while to complete. Partitions must be created, historical data loaded, objects such as relationships and hierarchies built or rebuilt, and calculated objects recalculated.
Subsequent refresh operations, either individual or scheduled, are much faster because only the incremental refresh partitions are refreshed. Other processing operations must still occur, like merging partitions and recalculation, but it usually takes much less time than the initial refresh.
Automatic report refresh
------------------------
For reports that use a model with an incremental refresh policy to get the latest data in real time with DirectQuery, it's a good idea to enable automatic page refresh at a fixed interval or based on change detection so that the reports include the latest data without delay. To learn more, see [Automatic page refresh in Power BI](../create-reports/desktop-automatic-page-refresh)
.
Advanced incremental refresh
----------------------------
If your model is on a Premium capacity with an XMLA endpoint enabled, incremental refresh can be further extended for advanced scenarios. For example, you can use SQL Server Management Studio to view and manage partitions, bootstrap the initial refresh operation, or refresh backdated historical partitions. To learn more, see [Advanced incremental refresh with the XMLA endpoint](incremental-refresh-xmla)
.
Community
---------
Power BI has a vibrant community where MVPs, BI pros, and peers share expertise in discussion groups, videos, blogs, and more. When learning about incremental refresh, refer to these resources:
* [Power BI Community](https://community.powerbi.com/)
* [Search "Power BI incremental refresh" on Bing](https://www.bing.com/search?q=power+bi+incremental+refresh)
* [Search "Incremental refresh for files" on Bing](https://www.bing.com/search?q=incremental+refresh+for+files)
* [Search "Keep existing data using incremental refresh" on Bing](https://www.bing.com/search?q=keep+existing+data+using+incremental+refresh)
Related content
---------------
* [Configure incremental refresh for semantic models](incremental-refresh-configure)
* [Advanced incremental refresh with the XMLA endpoint](incremental-refresh-xmla)
* [Troubleshoot incremental refresh](incremental-refresh-troubleshoot)
* [Incremental refresh for dataflows](../transform-model/dataflows/dataflows-premium-features#incremental-refresh)
* * *
Feedback
--------
Was this page helpful?
Yes No
[Provide product feedback](https://ideas.fabric.microsoft.com/?forum=2d80fd4a-16cb-4189-896b-e0dac5e08b41)
| [Ask the community](https://community.fabric.microsoft.com/powerbi)
* * *
Additional resources
--------------------
---
# Troubleshoot refresh scenarios - Power BI | Microsoft Learn
Table of contents Exit focus mode
Ask Learn Ask Learn [Read in English](# "Read in English")
Save[](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/refresh-troubleshooting-refresh-scenarios.md "Edit This Document")
Table of contents [Read in English](# "Read in English")
Add Add to plan [Edit](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/refresh-troubleshooting-refresh-scenarios.md "Edit This Document")
* * *
#### Share via
[Facebook](#)
[x.com](#)
[LinkedIn](#)
[Email](#)
* * *
Print
* * *
Note
Access to this page requires authorization. You can try [signing in](#)
or changing directories.
Access to this page requires authorization. You can try changing directories.
Troubleshoot refresh scenarios
==============================
* Article
* 2024-09-25
* 12 contributors
Feedback
This article describes different scenarios you might encounter when refreshing data within the Power BI service.
Note
If you encounter a scenario that's not listed in this article, and if it's causing issues, you can ask for further assistance on the [community site](https://community.powerbi.com/)
, or you can create a [support ticket](https://powerbi.microsoft.com/support/)
.
You should always ensure that basic requirements for refresh are met and verified:
* Verify the gateway version is up to date.
* Verify the report has a gateway selected. If there's no gateway selected, the data source might have changed or might be missing.
After you confirm the 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 semantic models in Power BI. An admin uses the following area in the semantic model settings.

Refresh using Web connector doesn't work properly
-------------------------------------------------
If you have a Web connector script that's using the [**Web.Page**](/en-us/powerquery-m/web-page)
function, and you've updated your semantic model or report after November 18, 2016, you must use a gateway for refresh to work properly.
Unsupported data source for refresh
-----------------------------------
When you configure a semantic model, you might get an error indicating the semantic model uses an unsupported data source for refresh. For details, see [Troubleshooting unsupported data source for refresh](service-admin-troubleshoot-unsupported-data-source-for-refresh)
.
Dashboard doesn't reflect changes after refresh
-----------------------------------------------
Wait 10-15 minutes for a refresh to be reflected in the dashboard tiles. If it still doesn't show up, repin the visualization to the dashboard.
GatewayNotReachable when setting credentials
--------------------------------------------
You might encounter a `GatewayNotReachable` error when you try to set credentials for a data source, which can be the result of an outdated gateway. [Install the latest gateway](/en-us/data-integration/gateway/service-gateway-install)
and try again.
Processing Error: The following system error occurred: Type Mismatch
--------------------------------------------------------------------
This error could be an issue with your [M script](/en-us/powerquery-m/m-spec-introduction)
within your Power BI Desktop file or Excel workbook. It can also be due to an out-of-date Power BI Desktop version.
Tile refresh errors
-------------------
For a list of errors you might encounter with dashboard tiles, and explanations, see [Troubleshoot tile errors](refresh-troubleshooting-tile-errors)
.
Refresh fails when updating data from sources that use Microsoft Entra ID OAuth
-------------------------------------------------------------------------------
The Microsoft Entra ID OAuth token, used by many different data sources, expires in approximately one hour. Sometimes that token expires before the data has finished loading, 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 Microsoft Entra ID 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, OAuth might 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 SPO instance is so large that it runs over the two-hour data-load threshold, the Power BI service might report a data load time-out. This data load time-out also applies to other Microsoft Entra ID OAuth data sources.
For refresh to work properly when connecting to an **SPO** data source by using Microsoft Entra ID OAuth, you must use the same account that you use to sign in to the **Power BI service**.
If you want to connect to a data source from the Power BI service by using OAuth2, the data source must be in the same tenant as the Power BI service. Currently, multitenant connection scenarios aren’t supported with OAuth2.
Uncompressed data limits for refresh
------------------------------------
The maximum size for semantic models imported into the **Power BI service** is 1 GB. These semantic models are heavily compressed to ensure high performance. In addition, in shared capacity, the service places a limit of 10 GB on the amount of uncompressed data that is processed during refresh. This limit accounts for the compression, and therefore is higher than the 1-GB maximum semantic model size. Semantic models in Power BI Premium aren't subject to these limits. If refresh in the Power BI service fails for this reason, reduce the amount of data being imported to Power BI and try again.
Scheduled refresh time-out
--------------------------
Scheduled refreshes for imported semantic models time out after two hours. This time-out is increased to five hours for semantic models in Premium workspaces. If you encounter this limit, consider reducing the size or complexity of your semantic model, or consider refactoring the large semantic model into multiple smaller semantic models.
Scheduled refresh disabled
--------------------------
If a scheduled refresh fails four times in a row, Power BI disables the refresh. Address the underlying problem, and then re-enable the scheduled refresh.
However, if the semantic model resides in a workspace under Embedded capacity, and that capacity is switched off, the _first_ attempt at refresh will fail (since the capacity is switched off), and in this circumstance its scheduled refresh is immediately disabled.
Access to the resource is forbidden
-----------------------------------
This error can occur because of expired cached credentials. Clear your internet browser cache, then sign in to Power BI and go to `https://app.powerbi.com?alwaysPromptForContentProviderCreds=true` to force an update of your credentials.
Data refresh failure because of password change or expired credentials
----------------------------------------------------------------------
Data refresh can also fail due to expired cached credentials. Clear your internet browser cache, then sign in to Power BI and go to `https://app.powerbi.com?alwaysPromptForContentProviderCreds=true`, which forces an update of your credentials.
Refresh a column of the ANY type that contains TRUE or FALSE results in unexpected values
-----------------------------------------------------------------------------------------
When you create a report in Power BI Desktop that has an ANY data type column containing TRUE or FALSE values, the values of that column can differ between Power BI Desktop and the Power BI service after a refresh. In Power BI Desktop, the underlying engine converts the boolean values to strings, retaining TRUE or FALSE values. In the Power BI service, the underlying engine converts the values to objects, and then converts the values to -1 or 0.
Visuals created in Power BI Desktop by using such columns might behave or appear as designed prior to a refresh event, but might change (due to TRUE/FALSE being converted to -1/0) after the refresh event.
Resolve the error: Container exited unexpectedly with code 0x0000DEAD
---------------------------------------------------------------------
If you get the **Container exited unexpectedly with code 0x0000DEAD** error, try to disable the scheduled refresh and republish the semantic model.
Refresh operation throttled by Power BI Premium
-----------------------------------------------
A Premium capacity might throttle data refresh operations when too many semantic models are being processed concurrently. [Throttling](/en-us/fabric/enterprise/throttling)
can occur in Power BI Premium capacities. When a refresh operation is canceled, the following error messages are logged into the refresh history:
_You've exceeded the capacity limit for semantic model refreshes. Try again when fewer semantic models are being processed._
If the error occurs frequently, use the [schedule view](refresh-summaries#refresh-schedule)
to determine whether the scheduled refresh events are properly spaced. To understand the maximum number of concurrent refreshes allowed per SKU, review the [Capacities and SKUs](../enterprise/service-premium-what-is#capacities-and-skus)
table.
To resolve this error, you can modify your refresh schedule to perform the refresh operation when fewer semantic models are being processed. You can also increase the time between refresh operations for all semantic models in your refresh schedule on the affected Premium capacity. You can retry the operation if you're using custom [XMLA operations](/en-us/analysis-services/xmla/xml-for-analysis-xmla-reference)
.
_Capacity level limit exceeded._
This error indicates you have too many semantic models running refresh at the same time, based on the capacity your organization has purchased. You can retry the refresh operation, or reschedule the refresh time to address this error.
_Node level limit exceeded._
This error indicates a system error in Power BI Premium based on semantic models residing on a given physical node. You can retry the refresh operation, or reschedule the refresh time to address this error.
Dataflows or datamart failures in Premium workspaces
----------------------------------------------------
Some connectors aren't supported for dataflows and datamarts in Premium workspaces. When using an unsupported connector, you might receive the following error: _Expression.Error: The import "<"connector name">"_ matches no exports. Did you miss a module reference?
The following connectors aren't supported for dataflows and datamarts in Premium workspaces:
* Linkar
* Actian
* AmazonAthena
* AmazonOpenSearchService
* BIConnector
* DataVirtuality
* DenodoForPowerBI
* Exasol
* Foundry
* Indexima
* IRIS
* JethroODBC
* Kyligence
* MariaDB
* MarkLogicODBC
* OpenSearchProject
* QubolePresto
* SingleStoreODBC
* StarburstPresto
* TibcoTdv
The use of the previous list of connectors with dataflows or datamarts is only supported in workspaces that are not Premium.
There was a problem refreshing the dataflow, the gateway version you are using is not supported
-----------------------------------------------------------------------------------------------
This error occurs if the version of the on-premises data gateway being used to refresh your dataflow (Gen1 or Gen2) is out of support. Currently Microsoft supports only the [last six versions of the on-premises data gateway](/en-us/data-integration/gateway/service-gateway-monthly-updates)
. Update your gateway to the latest version, or to a supported version to resolve this issue. Use the [update an on-premises data gateway](/en-us/data-integration/gateway/service-gateway-update)
article for guidance on updating gateways.
Circular Dependency error related to Calculated Table utilize SummarizeColumns
------------------------------------------------------------------------------
In September 2024 a feature was enabled that allows _SummarizeColumns_ to be placed inside a measure and evaluated within any external filter context, which might introduce new dependencies if _SummarizeColumns_ is used in _CalculateTable_. These new dependencies might cause a circluar dependency error during model refresh.
If this error appears, the following steps can address the issue:
1. Identify all _CalculateTables_ that use _SummarizeColumns_
2. For each _SummarizeColumns_ expression, make the following changes:
For a _SummarizeColumns_ expression with _GB_ on _Product_ and _Geography_, for example:
SummarizeColumns(
Product[Color],
Geography[Country],
...
)
Add _Product_ and _Geography_ as filters into _SummarizeColumns_ so it looks like the following expression:
SummarizeColumns(
Product[Color],
Geography[Country],
Product,
Geography,
...
)
These steps remove the introduced blank row and restores the original behavior. If you have multiple calculated tables that uses _SummarizeColumns_, changes for all tables should be submitted together in a single transaction which requires the [Tabular Editor](https://www.sqlbi.com/tools/tabular-editor/)
to make the modifications, since Power BI Desktop cannot batch multiple table changes into a single transaction.
Related content
---------------
* [Data refresh in Power BI](refresh-data)
* [Configure scheduled refresh](refresh-scheduled-refresh)
* [Troubleshoot gateways - Power BI](service-gateway-onprem-tshoot)
* [Troubleshooting the Power BI gateway (personal mode)](service-admin-troubleshooting-power-bi-personal-gateway)
More questions? [Try asking the Microsoft Power BI Community](https://community.powerbi.com/)
.
* * *
Feedback
--------
Was this page helpful?
Yes No
[Provide product feedback](https://ideas.fabric.microsoft.com/?forum=2d80fd4a-16cb-4189-896b-e0dac5e08b41)
| [Ask the community](https://community.fabric.microsoft.com/powerbi)
* * *
Additional resources
--------------------
---
# Automate configuration of template app installation - Power BI | Microsoft Learn
Table of contents Exit focus mode
Ask Learn Ask Learn [Read in English](# "Read in English")
Save[](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/template-apps-auto-install.md "Edit This Document")
Table of contents [Read in English](# "Read in English")
Add Add to plan [Edit](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/template-apps-auto-install.md "Edit This Document")
* * *
#### Share via
[Facebook](#)
[x.com](#)
[LinkedIn](#)
[Email](#)
* * *
Print
* * *
Note
Access to this page requires authorization. You can try [signing in](#)
or changing directories.
Access to this page requires authorization. You can try changing directories.
Automated configuration of a template app installation
======================================================
* Article
* 2024-10-08
* 5 contributors
Feedback
Template apps are a great way for customers to start getting insights from their data. Template apps get them up and running quickly by connecting them to their data. The template apps provide them with prebuilt reports that they can customize if they so desire.
Customers aren't always familiar with the details of how to connect to their data. Having to provide these details when they install a template app can be a pain point for them.
If you are a data services provider and have created a template app to help your customers get started with their data on your service, you can make it easier for them to install your template app. You can automate the configuration of your template app's parameters. When the customer signs in to your portal, they select a special link you've prepared. This link:
* Launches the automation, which gathers the information it needs.
* Preconfigures the template app parameters.
* Redirects the customer to their Power BI account where they can install the app.
All they have to do is select **Install** and authenticate against their data source, and they're good to go!
The customer experience is illustrated here.

This article describes the basic flow, the prerequisites, the main steps, and the APIs you need to automate the configuration of a template app installation. If you want to dive in and get started, you can skip to the [tutorial](template-apps-auto-install-tutorial)
where you automate the configuration of the template app installation by using a simple sample application we've prepared that uses an Azure function.
Basic flow
----------
The basic flow for automating the configuration of a template app installation proceeds as follows:
1. The user signs in to the ISV's portal and selects the supplied link. This action initiates the automated flow. The ISV's portal prepares the user-specific configuration at this stage.
2. The ISV acquires an _app-only_ token based on a [service principal (app-only token)](../developer/embedded/embed-service-principal)
that's registered in the ISV's tenant.
3. Using [Power BI REST APIs](/en-us/rest/api/power-bi/)
, the ISV creates an _install ticket_, which contains the user-specific parameter configuration as prepared by the ISV.
4. The ISV redirects the user to Power BI by using a `POST` redirection method that contains the install ticket.
5. The user is redirected to their Power BI account with the install ticket and is prompted to install the template app. When the user selects **Install**, the template app is installed for them.
Note
While parameter values are configured by the ISV in the process of creating the install ticket, data source-related credentials are only supplied by the user in the final stages of the installation. This arrangement prevents them from being exposed to a third party and ensures a secure connection between the user and the template app data sources.
Prerequisites
-------------
To provide a preconfigured installation experience for your template app, the following prerequisites are required:
* A Power BI Pro license. If you're not signed up for Power BI Pro, [sign up for a free trial](https://powerbi.microsoft.com/pricing/)
before you begin.
* Your own Microsoft Entra tenant setup. For instructions on how to set one up, see [Create a Microsoft Entra tenant](../developer/embedded/create-an-azure-active-directory-tenant)
.
* A **service principal (app-only token)** registered in the preceding tenant. For more information, see [Embed Power BI content with service principal and an application secret](../developer/embedded/embed-service-principal)
. Make sure to register the application as a **server-side web application** app. You register a server-side web application to create an application secret. From this process, you need to save the _application ID_ (ClientID) and _application secret_ (ClientSecret) for later steps.
* A **parameterized template app** that's ready for installation. The template app must be created in the same tenant in which you register your application in Microsoft Entra ID. For more information, see [Template app tips](service-template-apps-tips)
or [Create a template app in Power BI](service-template-apps-create)
. From the template app, you need to note the following information for the next steps:
* _App ID_, _Package Key_, and _Owner ID_ as they appear in the installation URL at the end of the process of [defining the properties of the template app](service-template-apps-create#define-the-properties-of-the-template-app)
when the app was created. You can also get the same link by selecting **Get link** in the template app's [Release Management](service-template-apps-create#manage-the-template-app-release)
pane.
* _Parameter names_ as they're defined in the template app's semantic model. Parameter names are case-sensitive strings and can also be retrieved from the **Parameter Settings** tab when you [define the properties of the template app](service-template-apps-create#define-the-properties-of-the-template-app)
or from the semantic model settings in Power BI.
* To be able to test your automation work flow, add the service principal to the template app workspace as an Admin.
Note
You can test your preconfigured installation application on your template app if the template app is ready for installation, even if it isn't publicly available on AppSource yet. For users outside your tenant to be able to use the automated installation application to install your template app, the template app must be publicly available in [AppSource](https://appsource.microsoft.com/en-us/marketplace/apps?product=power-bi)
. Before you distribute your template app by using the automated installation application you're creating, be sure to [publish it to Partner Center](/en-us/azure/marketplace/partner-center-portal/create-power-bi-app-offer)
.
Main steps and APIs
-------------------
The main steps for automating the configuration of a template app installation, and the APIs you'll need, are described in the following sections. While most of the steps are done with [Power BI REST APIs](/en-us/rest/api/power-bi/)
, the code examples described here are made with the .NET SDK.
Step 1: Create a Power BI client object
---------------------------------------
Using Power BI REST APIs requires you to get an _access token_ for your [service principal](../developer/embedded/embed-service-principal)
from Microsoft Entra ID. You're required to get a [Microsoft Entra access token](../developer/embedded/generate-embed-token)
for your Power BI application before you make calls to the [Power BI REST APIs](/en-us/rest/api/power-bi/)
. To create the Power BI client with your access token, you need to create your Power BI client object, which allows you to interact with the Power BI REST APIs. You create the Power BI client object by wrapping the **AccessToken** with a **Microsoft.Rest.TokenCredentials** object.
using Microsoft.IdentityModel.Clients.ActiveDirectory;
using Microsoft.Rest;
using Microsoft.PowerBI.Api.V2;
var tokenCredentials = new TokenCredentials(authenticationResult.AccessToken, "Bearer");
// Create a Power BI client object. It's used to call Power BI APIs.
using (var client = new PowerBIClient(new Uri(ApiUrl), tokenCredentials))
{
// Your code goes here.
}
Step 2: Create an install ticket
--------------------------------
Create an install ticket, which is used when you redirect your users to Power BI. The API used for this operation is the **CreateInstallTicket** API.
* [Template Apps - Create Install Ticket](/en-us/rest/api/power-bi/template-apps/create-install-ticket)
A sample of how to create an install ticket for template app installation and configuration is available from the [InstallTemplateApp/InstallAppFunction.cs](https://github.com/microsoft/Template-apps-examples/blob/master/Developer%20Samples/Automated%20Install%20Azure%20Function/InstallTemplateAppSample/InstallTemplateApp/InstallAppFunction.cs)
file in the [sample application](https://github.com/microsoft/Template-apps-examples/tree/master/Developer%20Samples/Automated%20Install%20Azure%20Function/InstallTemplateAppSample)
.
The following code example shows how to use the template app **CreateInstallTicket** REST API.
using Microsoft.PowerBI.Api.V2;
using Microsoft.PowerBI.Api.V2.Models;
// Create Install Ticket Request.
InstallTicket ticketResponse = null;
var request = new CreateInstallTicketRequest()
{
InstallDetails = new List()
{
new TemplateAppInstallDetails()
{
AppId = Guid.Parse(AppId),
PackageKey = PackageKey,
OwnerTenantId = Guid.Parse(OwnerId),
Config = new TemplateAppConfigurationRequest()
{
Configuration = Parameters
.GroupBy(p => p.Name)
.ToDictionary(k => k.Key, k => k.Select(p => p.Value).Single())
}
}
}
};
// Issue the request to the REST API using .NET SDK.
InstallTicket ticketResponse = await client.TemplateApps.CreateInstallTicketAsync(request);
Step 3: Redirect users to Power BI with the ticket
--------------------------------------------------
After you've created an install ticket, you use it to redirect your users to Power BI to continue with the template app installation and configuration. You use a `POST` method redirection to the template app's installation URL, with the install ticket in its request body.
There are various documented methods of how to issue a redirection by using `POST` requests. Choosing one or another depends on the scenario and how your users interact with your portal or service.
A simple example, mostly used for testing purposes, uses a form with a hidden field, which automatically submits itself upon loading.
The following example of the [sample application](https://github.com/microsoft/Template-apps-examples/tree/master/Developer%20Samples/Automated%20Install%20Azure%20Function/InstallTemplateAppSample)
's response holds the install ticket and automatically redirects users to Power BI. The response for this Azure function is the same automatically self-submitting form that we see in the preceding HTML example.
...
return new ContentResult() { Content = RedirectWithData(redirectUrl, ticket.Ticket), ContentType = "text/html" };
}
...
public static string RedirectWithData(string url, string ticket)
{
StringBuilder s = new StringBuilder();
s.Append("");
s.AppendFormat("");
s.AppendFormat("");
return s.ToString();
}
Note
There are various methods of using `POST` browser redirects. You should always use the most secure method, which depends on your service needs and restrictions. Remember that some forms of insecure redirection can result in exposing your users or service to security issues.
Step 4: Move your automation to production
------------------------------------------
When the automation you've designed is ready, be sure to move it to production.
Related content
---------------
* Try our [tutorial](template-apps-auto-install-tutorial)
, which uses a simple Azure function to automate the configuration of a template app installation.
* More questions? [Try asking the Power BI Community](https://community.powerbi.com/)
.
* * *
Feedback
--------
Was this page helpful?
Yes No
[Provide product feedback](https://ideas.fabric.microsoft.com/?forum=2d80fd4a-16cb-4189-896b-e0dac5e08b41)
| [Ask the community](https://community.fabric.microsoft.com/powerbi)
* * *
Additional resources
--------------------
---
# Tutorial: Shape and combine data in Power BI Desktop - Power BI | Microsoft Learn
Table of contents Exit focus mode
Ask Learn Ask Learn [Read in English](# "Read in English")
Save[](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/desktop-shape-and-combine-data.md "Edit This Document")
Table of contents [Read in English](# "Read in English")
Add Add to plan [Edit](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/desktop-shape-and-combine-data.md "Edit This Document")
* * *
#### Share via
[Facebook](#)
[x.com](#)
[LinkedIn](#)
[Email](#)
* * *
Print
* * *
Note
Access to this page requires authorization. You can try [signing in](#)
or changing directories.
Access to this page requires authorization. You can try changing directories.
Tutorial: Shape and combine data in Power BI Desktop
====================================================
* Article
* 2024-09-20
* 7 contributors
Feedback
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 single query.
In this tutorial, you'll learn how to:
* Shape data by using Power Query Editor.
* Connect to different data sources.
* Combine those data sources, and create a data model to use in reports.
Power Query Editor in Power BI Desktop uses the right-click menus, and 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
----------
To shape data in Power Query Editor, you provide step-by-step instructions for Power Query Editor to adjust the data as it loads and presents the data. The original data source isn't affected; only this particular view of the data is adjusted, or _shaped_.
Power Query Editor records the steps you specify (such as rename a table, transform a data type, or delete a column). Each time this query connects to the data source, Power Query Editor carries out those steps so that the data is always shaped the way you specify. This process occurs whenever you use Power Query Editor, or for anyone who uses your shared query, such as on the Power BI service. Those steps are captured, sequentially, in the **Query Settings** pane, under **APPLIED STEPS**. We’ll go through each of those steps in this article.

1. Import the data from a web source. Select the **Get data** dropdown, then choose **Web**.

2. Paste this URL into the **From Web** dialog and select **OK**.
https://www.fool.com/research/best-states-to-retire

3. In the **Navigator** dialog, select the checkbox for the entry that starts with `Individual factor scores`, then choose **Transform Data**.

Tip
Some information in the tables from the previous URL may change or be updated occasionally. As a result, you may need to adjust the selections or steps in this article accordingly.
4. The Power Query Editor window opens. You can see the default steps applied so far, in the **Query Settings** pane under **APPLIED STEPS**.
* **Source**: Connecting to the website.
* **Extracted Table from Html**: Selecting the table.
* **Promoted Headers**: Changing the top row of data into column headers.
* **Changed Type**: Changing the column types, which are imported as text, to their inferred types.
[](media/desktop-shape-and-combine-data/power-query-editor-query-settings-dialog.png#lightbox)
5. Change the table name from the default `Individual factor scores...` to `Retirement Data`, then press **Enter**.

6. The existing data is ordered by a weighted score, as described on the [source webpage](https://www.fool.com/research/best-states-to-retire)
under _Methodology_. We'll then sort the table on this column to compare the custom score's ranking to the existing score.
7. From the **Add Column** ribbon, select **Custom Column**.

8. In the **Custom Column** dialog, in the **New column name** field, enter _New score_. For the **Custom column formula**, enter the following data:
( [Quality of life] + [Cost of housing] + [Public health] + [Crime] + [Taxes] + [Weather] + [#"Non-housing cost of living"] ) / 7
9. Make sure the status message is _No syntax errors have been detected_, then select **OK**.

10. In **Query Settings**, the **APPLIED STEPS** list now shows the new **Added Custom** step we just defined.

Adjust the data
---------------
Before we work with this query, let's make a few changes to adjust its data:
* Adjust the rankings by removing a column.
For example, assume **Weather** isn't a factor in our results. Removing this column from the query doesn't affect the other data.
* Fix any errors.
Because we removed a column, we need to adjust our calculations in the **New score** column by changing its formula.
* Sort the data.
Sort the data based on the **New score** column, and compare to the existing **Rank** column.
* Replace the data.
We'll highlight how to replace a specific value and how to insert an applied step.
These changes are described in the following steps.
1. To remove the **Weather** column, select the column, choose the **Home** tab from the ribbon, and then choose **Remove Columns**.

Note
The **New score** values haven't changed, due to the ordering of the steps. Power Query Editor records the steps sequentially, yet independently, of each other. To apply actions in a different sequence, you can move each applied step up or down.
2. Right-click a step to see its context menu.

3. Select **Move before** from the context menu to move up the last step, **Removed Columns**, to just above the **Added Custom** step. You can also use the mouse to move a step to the desired position.

4. Select the **Added Custom** step.
Notice the **New score** column now shows _Error_ rather than the calculated value.

There are several ways to get more information about each error. If you select the cell without clicking on the word _Error_, Power Query Editor displays the error information.

If you select the word _Error_ directly, Power Query Editor creates an **Applied Step** in the **Query Settings** pane and displays information about the error. Because we don't need to display error information anywhere else, select **Cancel**.
5. To fix the errors, there are two changes needed: removing the _Weather_ column name and changing the divisor from 7 to 6. You can make these changes in two ways:
1. Right-click the **Added Custom** step and select **Edit Settings**, or click on the gear icon next to the name of the step to bring up the **Custom Column** dialog you used to create the **New score** column. Edit the formula as described previously, until it looks like this:

2. Select the **New score** column, then display the column's data formula by enabling the **Formula Bar** checkbox from the **View** tab.
[](media/desktop-shape-and-combine-data/new-score-column-show-formula-bar.png#lightbox)
Edit the formula as described previously, until it looks like this, then press **Enter**.
= Table.AddColumn(#"Removed Columns", "New score", each ( [Quality of life] + [Cost of housing] + [Public health] + [Crime] + [Taxes] + [#"Non-housing cost of living"] ) / 6)
Power 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, in this tutorial we want to preserve all the data in the table.
6. Sort the data based on the **New score** column. First, select the last applied step, **Added Custom** to display the most recent data. Then, select the dropdown located next to the **New score** column header and choose **Sort Descending**.

The data is now sorted according to **New score**. You can select an applied step anywhere in the list, and continue shaping the data at that point in the sequence. Power Query Editor automatically inserts a new step directly after the currently selected applied step.
7. In **APPLIED STEPS**, select the step preceding the custom column, which is the **Removed Columns** step. Here we'll replace the value of the **Cost of housing** ranking in Oregon. Right-click the appropriate cell that contains Oregon's **Cost of housing** value, and then select **Replace Values**. Note which **Applied Step** is currently selected.

8. Select **Insert**.
Because we're inserting a step, Power Query Editor reminds us that subsequent steps could cause the query to break.

9. Change the data value to _100.0_.
Power Query Editor replaces the data for Oregon. When you create a new applied step, Power Query Editor names it based on the action, in this case, **Replaced Value**. If you have more than one step with the same name in your query, Power Query Editor appends an increasing number to each subsequent applied step's name.
10. Select the last **Applied Step**, **Sorted Rows**.
Notice the data has changed regarding Oregon's new ranking. This change occurs because we inserted the **Replaced Value** step in the correct location, before the **Added Custom** step.
We’ve now shaped our data to the extent we need to. Next let’s connect to another data source, and combine data.
Combine data
------------
The data about various states is interesting, and will be useful for building further analysis efforts and queries. However, most data about states 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.
There's another public data source that provides that association, 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 Power 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\_and\_territory\_abbreviations](https://en.wikipedia.org/wiki/List_of_U.S._state_and_territory_abbreviations)
_, and then select **OK**.
The Navigator displays the content of the website.

3. Select **Codes and abbreviations for U.S. states, federal district, territories, and other regions**.
Tip
It will take 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 following steps? Yes, we could create a _relationship_ between the two tables, and shape the data based on that relationship. The following example steps are helpful to learn for working with tables. However, relationships can help you quickly use data from multiple tables.
To get the data into shape, follow these steps:
1. Remove the top row. Because it's a result of the way that the webpage’s table was created, we don’t need it. From the **Home** ribbon, select **Remove Rows > Remove Top Rows**.

The **Remove Top Rows** dialog appears. Specify 1 row to remove.
2. Because the **Retirement Data** table doesn't have information for Washington DC or territories, we need to filter them from our list. Select the **Status of region** column's dropdown, then clear all checkboxes except **State** and **State (officially Commonwealth)**.

3. Remove all unneeded columns. Because we need only the mapping of each state to its official two-letter abbreviation (**Name** and **ANSI** columns), we can remove the other columns. First select the **Name** column, then hold down the **CTRL** key and select the **ANSI** column. From the **Home** tab on the ribbon, select **Remove Columns > Remove Other Columns**.

Note
The _sequence_ of applied steps in Power Query Editor is important, and affects how the data is shaped. It’s also important to consider how one step might impact another subsequent step. For example, if you remove a step from the applied steps, subsequent steps might not behave as originally intended.
Note
When you resize the Power 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 Power Query Editor window, the ribbon items expand to make the most use of the increased ribbon area.
4. 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 shows both options, but you only need to choose one.

5. Rename the columns to _State Name_ and _State Code_. To rename the table, enter _State Codes_ in the **Name** field in the **Query Settings** pane.

Combine queries
---------------
Now that we’ve shaped the _State Codes_ 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_.
* For one or more _columns_ that you’d like to add to another query, you _merge_ the queries.
* For one or more _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:
1. From the left pane of Power Query Editor, select the query _into which_ you want the other query to merge. In this case, it's **Retirement Data**.
2. Select **Merge Queries > Merge Queries** from the **Home** tab on the ribbon.

You might 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 _Retirement Data_ table, then select the **State Codes** query.
When you select a matching column, the **OK** button is enabled.

4. Select **OK**.
Power Query Editor creates a new 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 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 **State Codes.State Codes**.
Note
If you want to explore how to bring in the **State Codes** table, you can experiment a bit. If you don’t like the results, just delete that step from the **APPLIED STEPS** list in the **Query Settings** pane, and 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 was shaped to meet our needs. This query can be a basis for interesting data connections, such as housing cost statistics, quality of life, or crime rate in any state.
7. To apply your changes and close Power Query Editor, select **Close & Apply** from the **Home** ribbon tab.
The transformed semantic model appears in Power BI Desktop, ready to be used for creating reports.
Related content
---------------
For more information on Power BI Desktop and its capabilities, see the following resources:
* [What is Power BI Desktop?](../fundamentals/desktop-what-is-desktop)
* [Query overview in Power BI Desktop](../transform-model/desktop-query-overview)
* [Data sources in Power BI Desktop](desktop-data-sources)
* [Connect to data sources in Power BI Desktop](desktop-connect-to-data)
* [Perform common query tasks in Power BI Desktop](../transform-model/desktop-common-query-tasks)
* * *
Feedback
--------
Was this page helpful?
Yes No
[Provide product feedback](https://ideas.fabric.microsoft.com/?forum=2d80fd4a-16cb-4189-896b-e0dac5e08b41)
| [Ask the community](https://community.fabric.microsoft.com/powerbi)
* * *
Additional resources
--------------------
---
# Real-time streaming in Power BI - Power BI | Microsoft Learn
Table of contents Exit focus mode
Ask Learn Ask Learn [Read in English](# "Read in English")
Save[](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-real-time-streaming.md "Edit This Document")
Table of contents [Read in English](# "Read in English")
Add Add to plan [Edit](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-real-time-streaming.md "Edit This Document")
* * *
#### Share via
[Facebook](#)
[x.com](#)
[LinkedIn](#)
[Email](#)
* * *
Print
* * *
Note
Access to this page requires authorization. You can try [signing in](#)
or changing directories.
Access to this page requires authorization. You can try changing directories.
Real-time streaming in Power BI
===============================
* Article
* 2025-01-27
* 16 contributors
Feedback
Important
Creation of streaming models remains enabled until October 31, 2027. After that date, creation of new real-time semantic models **will no longer be supported**, including push semantic models, streaming semantic models, PubNub streaming semantic models, and streaming data tiles. **Your existing streaming semantic models will be unaffected.** For more information about the retirement of real-time streaming in Power BI, see the [blog post announcement](https://powerbi.microsoft.com/blog/announcing-the-retirement-of-real-time-streaming-in-power-bi/)
. Microsoft recommends users explore [Real-Time Intelligence in Microsoft Fabric](/en-us/fabric/real-time-intelligence/overview)
.
Power BI with real-time streaming helps 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 and use real-time streaming semantic models in Power BI.

Types of real-time semantic models
----------------------------------
First, it's important to understand the types of real-time semantic models that are designed to display in tiles and dashboards, and how those semantic models differ.
The following three types of real-time semantic models are designed for display on real-time dashboards:
* Push semantic model
* Streaming semantic model
* PubNub streaming semantic model
This section explains how these semantic models differ from one another. Later sections describe how to push data into each of these semantic models.
### Push semantic model
With a _push semantic model_, data is pushed into the Power BI service. When the semantic model is created, the Power BI service automatically creates a new database in the service to store the data.
Because there's an underlying database that stores the data as it arrives, you can create reports with the data. These reports and their visuals are just like any other report visuals. You can use all of Power BI's report-building features, such as Power BI visuals, data alerts, and pinned dashboard tiles.
Once you create a report using the push semantic model, you can pin any of the report visuals to a dashboard. On that dashboard, visuals update in real time whenever the data is updated. Within the Power BI service, the dashboard triggers a tile refresh every time new data is received.
There are two considerations to note about pinned tiles from a push semantic model:
* Pinning an entire report by using the **Pin live** option won't result in the data automatically being updated.
* Once you pin a visual to a dashboard, you can use **Q&A** to ask questions about the push semantic model in natural language. After you make a **Q&A** query, you can pin the resulting visual back to the dashboard, and that visual will also update in real time.
### Streaming semantic model
A _streaming semantic model_ also pushes data into the Power BI service, with an important difference: Power BI stores the data only into a temporary cache, which quickly expires. The temporary cache is used only to display visuals that have some transient history, such as a line chart that has a time window of one hour.
A streaming semantic model has no underlying database, so you can't build report visuals by using the data that flows in from the stream. Therefore, you can't use report functionality such as filtering, Power BI visuals, and other report functions.
The only way to visualize a streaming semantic model is to add a tile and use the streaming semantic model as a _custom streaming data_ source. The custom streaming tiles that are based on a streaming semantic model are optimized for quickly displaying real-time data. There's little latency between pushing the data into the Power BI service and updating the visual, because there's no need for the data to be entered into or read from a database.
In practice, it's best to use streaming semantic models and their accompanying streaming visuals in situations when it's critical to minimize the latency between pushing and visualizing data. You should have the data pushed in a format that can be visualized as-is, without any more aggregations. Examples of data that's ready as-is include temperatures and pre-calculated averages.
### PubNub streaming semantic model
With a _PubNub streaming semantic model_, the Power BI web client uses the [PubNub SDK](https://www.pubnub.com/docs/sdks)
to read an existing PubNub data stream. The Power BI service stores no data. Because the web client makes this call directly, if you allow only approved outbound traffic from your network, you must list traffic to PubNub as allowed. For instructions, see the [support article about approving outbound traffic for PubNub](https://support.pubnub.com/hc/en-us/articles/360051496672)
.
As with the streaming semantic model, the PubNub streaming semantic model has no underlying Power BI database. You can't build report visuals against the data that flows in, and can't use report functionality like filtering or Power BI visuals. You can visualize a PubNub streaming semantic model only by adding a tile to the dashboard and configuring a PubNub data stream as the source.
Tiles based on a PubNub streaming semantic model are optimized for quickly displaying real-time data. Since Power BI is directly connected to the PubNub data stream, there's little latency between pushing the data into the Power BI service and updating the visual.
### Streaming semantic model matrix
The following table describes the three types of semantic models for real-time streaming and lists their capabilities and limitations.
| Capability | Push | Streaming | PubNub |
| --- | --- | --- | --- |
| Dashboard tiles update in real time as data is pushed in | **Yes.**
For visuals built via reports and then pinned to the dashboard. | **Yes.**
For custom streaming tiles added directly to the dashboard. | **Yes.**
For custom streaming tiles added directly to the dashboard. |
| Dashboard tiles update with smooth animations | **No.** | **Yes.** | **Yes.** |
| Data stored permanently in Power BI for historic analysis | **Yes.** | **No.**
Data is temporarily stored for one hour to render visuals. | **No.** |
| Build Power BI reports on top of the data | **Yes.** | **No.** | **No.** |
| Max rate of data ingestion | **1 request**
**16 MB/request** | **5 requests**
**15 KB/request** | **N/A**
Data isn't being pushed into Power BI. |
| Limits on data throughput | **1M rows/hour** | None. | **N/A**
Data isn't being pushed into Power BI. |
Push data to semantic models
----------------------------
This section describes how to create and push data into the three primary types of real-time semantic models that you can use in real-time streaming.
You can push data into a semantic model by using the following methods:
* The Power BI REST APIs
* The Power BI streaming semantic model UI
* Azure Stream Analytics
### Use Power BI REST APIs to push data
You can use _Power BI REST APIs_ to create and send data to push semantic models and to streaming semantic models. When you create a semantic model by using Power BI REST APIs, the `defaultMode` flag specifies whether the semantic model is push or streaming.
If no `defaultMode` flag is set, the semantic model defaults to a push semantic model. If the `defaultMode` value is set to `pushStreaming`, the semantic model is both a push and streaming semantic model, and provides the benefits of both semantic model types.
Note
When you use semantic models with the `defaultMode` flag set to `pushStreaming`, if a request exceeds the 15 KB size restriction for a streaming semantic model, but is less than the 16 MB size restriction for a push semantic model, the request succeeds and the data updates in the push semantic model. However, any streaming tiles temporarily fail.
Once a semantic model is created, you can use the [PostRows](/en-us/rest/api/power-bi/pushdatasets/datasets_postrows)
REST APIs to push data. All requests to REST APIs are secured by using _Microsoft Entra ID OAuth_.
### Use the streaming semantic model UI to push data
In the Power BI service, you can create a semantic model by selecting the **API** approach, as shown in the following screenshot:

When you create the new streaming semantic model, you can enable **Historic data analysis**, as shown in the following screenshot. This selection has a significant impact.

When **Historic data analysis** is disabled, as it is by default, you create a streaming semantic model as described earlier. When **Historic data analysis** is enabled, the semantic model you create becomes both a streaming semantic model and a push semantic model. This setting is equivalent to using the Power BI REST APIs to create a semantic model with its `defaultMode` set to `pushStreaming`, as described earlier.
Note
Streaming semantic models created by using the Power BI service UI don't require Microsoft Entra authentication. In such semantic models, the semantic model owner receives a URL with a _rowkey_, which authorizes the requestor to push data into the semantic model without using a Microsoft Entra ID OAuth bearer token. However, the Microsoft Entra ID approach still works to push data into the semantic model.
### Use Azure Stream Analytics to push data
You can add Power BI as an output within Azure Stream Analytics, and then visualize those data streams in the Power BI service in real time. This section describes the technical details of that process.
Azure Stream Analytics uses the Power BI REST APIs to create its output data stream to Power BI, with `defaultMode` set to `pushStreaming`. The resulting semantic model can use both push and streaming. When you create the semantic model, Azure Stream Analytics sets the `retentionPolicy` flag to `basicFIFO`. With that setting, the database that supports the push semantic model stores 200,000 rows, and drops rows in a first-in first-out (FIFO) fashion.
Important
If your Azure Stream Analytics query results in very rapid output to Power BI, for example once or twice per second, Azure Stream Analytics begins batching the outputs into a single request. This batching might cause the request size to exceed the streaming tile limit, and streaming tiles might fail to render. In this case, the best practice is to slow the rate of data output to Power BI. For example, instead of a maximum value every second, request a maximum value over 10 seconds.
Set up your real-time streaming semantic model in Power BI
----------------------------------------------------------
To get started with real-time streaming, you choose one of the following ways to consume streaming data in Power BI:
* _Tiles_ with visuals from streaming data
* _Semantic models_ created from streaming data that persist in Power BI
For either option, you need to set up streaming data in Power BI. To get your real-time streaming semantic model working in Power BI:
1. In either an existing or new dashboard, select **Add a tile**.
2. On the **Add a tile** page, select **Custom Streaming Data**, and then select **Next**.

3. On the **Add a custom streaming data tile** page, you can select an existing semantic model, or select **Manage semantic models** to import your streaming semantic model if you already created one. If you don't have streaming data set up yet, select **Add streaming semantic model** to get started.

4. On the **New streaming semantic model** page, select **API**, **Azure Stream**, or **PubNub**, and then select **Next**.

Create a streaming semantic model
---------------------------------
There are three ways to create a real-time streaming data feed that Power BI can consume and visualize:
* Power BI REST API using a real-time streaming endpoint
* Azure Stream
* PubNub
This section describes the Power BI REST API and PubNub options, and explains how to create a streaming tile or semantic model from the streaming data source. You can then use the semantic model to build reports. For more information about the Azure Stream option, see [Power BI output from Azure Stream Analytics](/en-us/azure/stream-analytics/power-bi-output)
.
### Use the Power BI REST API
The Power BI REST API makes real-time streaming easier for developers. After you select **API** on the **New streaming semantic model** screen and select **Next**, you can provide entries that enable Power BI to connect to and use your endpoint. For more information about the API, see [Use the Power BI REST APIs](/en-us/rest/api/power-bi)
.

If you want Power BI to store the data this data stream sends, so you can do reporting and analysis on the collected data, enable **Historic data analysis**.
After you successfully create your data stream, you get a REST API URL endpoint. Your application can call the endpoint by using `POST` requests to push your streaming data to the Power BI semantic model. In your `POST` requests, ensure that the request body matches the sample JSON that the Power BI user interface provided. For example, wrap your JSON objects in an array.
Caution
For streaming semantic models you create in the Power BI service UI, the semantic model owner gets a URL that includes a _resource key_. This key authorizes the requestor to push data into the semantic model without using a Microsoft Entra ID OAuth bearer token. Keep in mind the implications of having a secret key in the URL when you work with this type of semantic model and method.
### Use PubNub
The integration of PubNub streaming with Power BI helps you create and use your low-latency PubNub data streams in Power BI. When you select **PubNub** on the **New streaming semantic model** screen and select **Next**, you see the following screen:

Important
You can secure PubNub channels by using a PubNub Access Manager (PAM) authentication key. This key is shared with all users who have access to the dashboard. For more information about PubNub access control, see [Access Manager](https://www.pubnub.com/docs/web-javascript/pam-security)
.
PubNub data streams are often high volume, and aren't always suitable for storage and historical analysis in their original form. To use Power BI for historical analysis of PubNub data, you must aggregate the raw PubNub stream and send it to Power BI, for example by using [Azure Stream Analytics](https://azure.microsoft.com/services/stream-analytics)
.
Example of real-time streaming in Power BI
------------------------------------------
Here's an example of how real-time streaming in Power BI works. This sample uses a publicly available stream from PubNub. Follow along with the example to see the value of real-time streaming for yourself.
1. In the Power BI service, select or create a new dashboard. At the top of the screen, select **Edit** > **Add a tile**.
2. On the **Add a tile** screen, select **Custom Streaming Data**, and then select **Next**.

3. On the **Add a custom streaming data tile** page, select **Add streaming semantic model**.

4. On the **New streaming semantic model** page, select **PubNub**, and then select **Next**.
5. On the next screen, enter a **Semantic model name**, enter the following values into the next two fields, and then select **Next**.
* **Sub-key:** _sub-c-99084bc5-1844-4e1c-82ca-a01b18166ca8_
* **Channel name:** _pubnub-sensor-network_

6. On the next screen, keep the automatically populated values, and select **Create**.

7. Back in your Power BI workspace, create a new dashboard, and at the top of the screen, select **Edit** > **Add a tile**.
8. Select **Custom Streaming Data**, and select **Next**.
9. On the **Add a custom streaming data tile** page, select your new streaming semantic model, and then select **Next**.
Play around with the sample semantic model. By adding value fields to line charts and adding other tiles, you can get a real-time dashboard that looks like the following screenshot:

Go on to create your own semantic models and stream live data to Power BI.
Questions and answers
---------------------
Here are some common questions and answers about real-time streaming in Power BI.
#### Can you use filters on push or streaming semantic models?
Streaming semantic models don't support filtering. For push semantic models, you can create a report, filter the report, and then pin the filtered visuals to a dashboard. However, there's no way to change the filter on the visual once it's on the dashboard.
You can pin the live report tile to the dashboard separately, and then you can change the filters. However, live report tiles won't update in real time as data is pushed in. You have to manually update the visual by selecting the **Refresh** icon at top right on the dashboard page.
When you apply filters to push semantic models that have `DateTime` fields with millisecond precision, equivalence operators aren't supported. Operators such as greater than > or less than < operate properly.
#### How do you see the latest value on push or streaming semantic models?
Streaming semantic models are designed to display the latest data. You can use the **Card** streaming visual type to easily see the latest numeric values. Card visuals don't support `DateTime` or `Text` data types.
For push semantic models, if you have a timestamp in the schema, you can try creating a report visual with the `last N` filter.
#### How can you do modeling on real-time semantic models?
Modeling isn't possible on a streaming semantic model, because the data isn't stored permanently. For a push semantic model, you can use the [create semantic model REST API](/en-us/rest/api/power-bi/push-datasets/datasets-post-dataset)
to create a semantic model with relationship and measures, and use the [update table REST APIs](/en-us/rest/api/power-bi/push-datasets/datasets-put-table)
to add measures to existing tables.
#### How can you clear all the values on a push or streaming semantic model?
On a push semantic model, you can use the [delete rows REST API](/en-us/rest/api/power-bi/push-datasets/datasets-delete-rows)
call. There's no way to clear data from a streaming semantic model, although the data will clear itself after an hour.
#### If you set up an Azure Stream Analytics output to Power BI but you don't see it in Power BI, what's wrong?
Take these steps to troubleshoot the issue:
1. Restart the Azure Stream Analytics job.
2. Try reauthorizing your Power BI connection in Azure Stream Analytics.
3. Make sure that you're checking the same workspace in the Power BI service that you specified for the Azure Stream Analytics output.
4. Make sure the Azure Stream Analytics query explicitly outputs to the Power BI output by using the `INTO` keyword.
5. Determine whether the Azure Stream Analytics job has data flowing through it. The semantic model is created only when data is being transmitted.
6. Look into the Azure Stream Analytics logs to see if there are any warnings or errors.
Automatic page refresh
----------------------
You can use automatic page refresh at a report page level to set a refresh interval for visuals that's only active when the page is being consumed. Automatic page refresh is available only for DirectQuery data sources. The minimum refresh interval depends on the type of workspace where the report is published and capacity admin settings for Premium workspaces.
For more information about automatic page refresh, see [Automatic page refresh in Power BI](../create-reports/desktop-automatic-page-refresh)
.
Considerations and limitations
------------------------------
The following limitations apply to using real time streaming:
* When using [PostDataset](/en-us/rest/api/power-bi/push-datasets/datasets-post-dataset)
or [PostDatasetInGroup](/en-us/rest/api/power-bi/push-datasets/datasets-post-dataset-in-group)
REST APIs, the _datasources_ section isn't applicable for Push datasets.
* Downloading of datasets or reports isn't supported for Streaming or Pubnub. Push models can only be downloaded as a live connect, but users must explicitly connect to the model in liveconnect mode, upload the report to service, and then download it in live connect mode only.
Related content
---------------
* [Overview of the Power BI REST API with real-time data](/en-us/rest/api/power-bi)
* [Load data in a Power BI streaming semantic model and build a dataflows monitoring report with Power BI](/en-us/power-query/dataflows/load-dataflow-metadata-into-power-bi-dataset)
* * *
Feedback
--------
Was this page helpful?
Yes No
[Provide product feedback](https://ideas.fabric.microsoft.com/?forum=2d80fd4a-16cb-4189-896b-e0dac5e08b41)
| [Ask the community](https://community.fabric.microsoft.com/powerbi)
* * *
Additional resources
--------------------
---
# Data types in Power BI Desktop - Power BI | Microsoft Learn
Table of contents Exit focus mode
Ask Learn Ask Learn [Read in English](# "Read in English")
Save[](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/desktop-data-types.md "Edit This Document")
Table of contents [Read in English](# "Read in English")
Add Add to plan [Edit](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/desktop-data-types.md "Edit This Document")
* * *
#### Share via
[Facebook](#)
[x.com](#)
[LinkedIn](#)
[Email](#)
* * *
Print
* * *
Note
Access to this page requires authorization. You can try [signing in](#)
or changing directories.
Access to this page requires authorization. You can try changing directories.
Data types in Power BI Desktop
==============================
* Article
* 2025-02-26
* 9 contributors
Feedback
This article describes data types that Power BI Desktop and Data Analysis Expressions (DAX) support.
When Power BI loads data, it tries to convert the data types of source columns into data types that support 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 converts the data column 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. In many cases DAX [implicitly converts data types](#implicit-and-explicit-data-type-conversion)
, but in some cases it doesn't. For instance, if a DAX function requires a **Date** data type, but the data type for your column is **Text**, the DAX function won't work correctly. So it's important and useful to use the correct data types for columns.
Determine and specify a column's data type
------------------------------------------
In Power BI Desktop, you can determine and specify a column's data type in the Power Query Editor, in Table view, or in Report view:
* In Power Query Editor, select the column and then select **Data Type** in the **Transform** group of the ribbon.

* In Table view or Report view, select the column, and then select the dropdown arrow next to **Data type** on the **Column tools** tab of the ribbon.

The Data type dropdown selection in Power Query Editor has two data types not present in Table view or Report view: **Date/Time/Timezone** and **Duration**. When you load a column with these data types into the Power BI model, a **Date/Time/Timezone** column converts into a **Date/time** data type, and a **Duration** column converts into a **Decimal number** data type.
The **Binary** data type isn't supported outside of the Power Query Editor. In the Power Query Editor, you can use the **Binary** data type when you load binary files if you convert it to other data types before loading it into the Power BI model. The **Binary** selection exists in the Table view and Report view menus for legacy reasons, but if you try to load **Binary** columns into the Power BI model, you might run into errors.
Number types
------------
Power BI Desktop supports three number types: **Decimal number**, **Fixed decimal number**, and **Whole number**.
You can use the Tabular Object Model (TOM) Column [DataType](/en-us/dotnet/api/microsoft.analysisservices.tabular.column.datatype#microsoft-analysisservices-tabular-column-datatype)
property to specify the [DataType](/en-us/dotnet/api/microsoft.analysisservices.tabular.datatype)
Enums for number types. For more information about programmatically modifying objects in Power BI, see [Program Power BI semantic models with the Tabular Object Model](/en-us/analysis-services/tom/tom-pbi-datasets?view=power-bi-premium-current&preserve-view=true)
.
### Decimal number
**Decimal number** is the most common number type, and can handle numbers with fractional values and whole numbers. **Decimal number** represents 64-bit (eight-byte) floating point numbers with negative values from _\-1.79E +308_ through _\-2.23E -308_, positive values from _2.23E -308_ through _1.79E +308_, and _0_. Numbers like _34_, _34.01_, and _34.000367063_ are valid decimal numbers.
The highest precision that the **Decimal number** type can represent is 15 digits. The decimal separator can occur anywhere in the number. This type corresponds to how Excel stores its numbers, and TOM specifies this type as `DataType.Double` Enum.
### Fixed decimal number
The **Fixed decimal number** data type has a fixed location for the decimal separator. The decimal separator always has four digits to its right, and allows for 19 digits of significance. The largest value the **Fixed decimal number** can represent is positive or negative _922,337,203,685,477.5807_.
The **Fixed decimal number** type is useful in cases where rounding might introduce errors. Numbers that have small fractional values can sometimes accumulate and force a number to be slightly inaccurate. The **Fixed decimal number** type can help you avoid these kinds of errors by truncating the values past the four digits to the right of decimal separator.
This data type corresponds to SQL Server’s **Decimal (19,4)**, or the **Currency** data type in Analysis Services and Power Pivot in Excel. TOM specifies this type as `DataType.Decimal` Enum.
### Whole number
**Whole number** represents a 64-bit (eight-byte) integer value. Because it's an integer, **Whole number** has no digits to the right of the decimal place. This type allows for 19 digits of positive or negative whole numbers between _\-9,223,372,036,854,775,807_ (_\-2^63+1_) and _9,223,372,036,854,775,806_ (_2^63-2_), so can represent the largest possible numbers of the numeric data types.
As with the **Fixed decimal** type, the **Whole number** type can be useful when you need to control rounding. TOM represents the **Whole number** data type as `DataType.Int64` Enum.
Note
The Power BI Desktop data model supports 64-bit integer values, but due to JavaScript limitations, the largest number Power BI visuals can safely express is _9,007,199,254,740,991_ (_2^53-1_). If your data model has larger numbers, you can reduce their size through calculations before you add them to visuals.
### Accuracy of number type calculations
Column values of **Decimal number** data type are stored as _approximate_ data types, according to the IEEE 754 Standard for floating point numbers. Approximate data types have inherent precision limitations, because instead of storing exact number values, they might store extremely close, or rounded, approximations.
Precision loss, or _imprecision_, can occur if the floating-point value can't reliably quantify the number of floating point digits. Imprecision can potentially appear as unexpected or inaccurate calculation results in some reporting scenarios.
Equality-related comparison calculations between values of **Decimal number** data type can potentially return unexpected results. Equality comparisons include equals `=`, greater than `>`, less than `<`, greater than or equal to `>=`, and less than or equal to `<=`.
This issue is most apparent when you use the [RANKX function](/en-us/dax/rankx-function-dax)
in a DAX expression, which calculates the result twice, resulting in slightly different numbers. Report users might not notice the difference between the two numbers, but the rank result can be noticeably inaccurate. To avoid unexpected results, you can change the column data type from **Decimal number** to either **Fixed decimal number** or **Whole number**, or do a forced rounding by using [ROUND](/en-us/dax/round-function-dax)
. The **Fixed decimal number** data type has greater precision, because the decimal separator always has four digits to its right.
Rarely, calculations that sum the values of a column of **Decimal number** data type can return unexpected results. This result is most likely with columns that have large amounts of both positive numbers and negative numbers. The sum result is affected by the distribution of values across rows in the column.
If a required calculation sums most of the positive numbers before summing most of the negative numbers, the large positive partial sum at the beginning can potentially skew the results. If the calculation happens to add balanced positive and negative numbers, the query retains more precision, and therefore returns more accurate results. To avoid unexpected results, you can change the column data type from **Decimal number** to **Fixed decimal number** or **Whole number**.
Date/time types
---------------
Power BI Desktop supports five Date/Time data types in the Power Query Editor. Both **Date/Time/Timezone** and **Duration** are converted during load into the data model, as follows:
**Date/Time** represents both a date and time value. The underlying _Date/Time_ value is stored as a _Decimal number_, so you can actually convert between the two. The time portion is stored as a fraction to whole multiples of 1/300 seconds (3.33 ms). The data type supports dates between years 1900 and 9999.
**Date** represents just a date with no time portion. A **Date** converts into the model as a **Date/Time** value with zero for the fractional value.
**Time** represents just a time with no date portion. A **Time** converts into the model as a **Date/Time** value with no digits to the left of the decimal point.
**Date/Time/Timezone** represents a UTC date/time with a timezone offset, and converts 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. A value of 09:00 loaded into the model in the USA displays as 09:00 wherever the report is opened or viewed.
**Duration** represents a length of time, and converts into a **Decimal number** when loaded into the model. Therefore, you can add or subtract the values from **Date/Time** values with correct results, and easily use it in visualizations that show magnitude.
Note
You can further format a converted **Date/Time** value in the model as **Date** or **Time** using the data types UI in Report, Table and Model view. Keep in mind that formatting doesn't change how data is stored in the model and any calculations or relationships are still evaluated with the **Date/Time** information stored, independent of formatting.
Text type
---------
The **Text** data type is a Unicode character data string, which can be letters, numbers, or dates represented in a text format. The practical maximum limit for string length is approximately 32,000 Unicode characters, based on Power BI's underlying Power Query engine, and its limits on **text** data type lengths. Text data types beyond the practical maximum limit are likely to result in errors.
The way Power BI stores text data can cause the data to display differently in certain situations. The next sections describe common situations that can cause **Text** data to change appearance slightly between querying data in Power Query Editor and loading it into Power BI.
### Case sensitivity
The engine that stores and queries data in Power BI is _case insensitive_, and treats different capitalization of letters as the same value. "A" is equal to "a". However, Power Query is _case sensitive_, where "A" isn't the same as "a". The difference in case sensitivity can lead to situations where text data changes capitalization seemingly inexplicably after loading into Power BI.
The following example shows order data: An **OrderNo** column that's unique for each order, and an **Addressee** column that shows the addressee name entered manually at order time. Power Query Editor shows several orders with the same **Addressee** names entered into the system with varying capitalizations.

After Power BI loads the data, capitalization of the duplicate names in the **Data** tab changes from the original entry into one of the capitalization variants.

This change happens because Power Query Editor is case sensitive, so it shows the data exactly as stored in the source system. The engine that stores data in Power BI is case insensitive, so it treats the lowercase and uppercase versions of a character as identical. Power Query data loaded into the Power BI engine can change accordingly.
The Power BI engine evaluates each row individually when it loads data, starting from the top. For each text column, such as **Addressee**, the engine stores a dictionary of unique values, to improve performance through data compression. The engine sees the first three values in the **Addressee** column as unique and stores them in the dictionary. After that, because the engine is case insensitive, it evaluates the names as identical.
The engine sees the name "Taina Hasu" as identical to "TAINA HASU" and "Taina HASU", so it doesn't store those variations, but refers to the first variation it stored. The name "MURALI DAS" appears in uppercase letters, because that's how the name appeared the first time the engine evaluated it when loading the data from top to bottom.
This image illustrates the evaluation process:

In the preceding example, the Power BI engine loads the first row of data, creates the **Addressee** dictionary, and adds _Taina Hasu_ to it. The engine also adds a reference to that value in the **Addressee** column on the table it loads. The engine does the same for the second and third rows, because these names aren't equivalent to the others when ignoring case.
For the fourth row, the engine compares the value against the names in the dictionary and finds the name. Since the engine is case insensitive, "TAINA HASU" and "Taina Hasu" are the same. The engine doesn't add a new name to the dictionary, but refers to the existing name. The same process happens for the remaining rows.
Important
Because the engine that stores and queries data in Power BI is case insensitive, take special care when you work in DirectQuery mode with a case-sensitive source. Power BI assumes that the source has eliminated duplicate rows. Because Power BI is case insensitive, it treats two values that differ only by case as duplicate, whereas the source might not treat them as such. In such cases, the final result is undefined.
To avoid this situation, if you use DirectQuery mode with a case-sensitive data source, normalize casing in the source query or in Power Query Editor.
### Leading and trailing spaces
The Power BI engine automatically trims any trailing spaces that follow text data, but doesn't remove leading spaces that precede the data. To avoid confusion, when you work with data that contains leading or trailing spaces, you should use the [Text.Trim](/en-us/powerquery-m/text-trim)
function to remove spaces at the beginning or end of the text. If you don't remove leading spaces, a relationship might fail to create because of duplicate values, or visuals might return unexpected results.
The following example shows data about customers: a **Name** column that contains the name of the customer and an **Index** column that's unique for each entry. The names appear within quotes for clarity. The customer name repeats four times, but each time with different combinations of leading and trailing spaces. These variations can occur with manual data entry over time.
| Row | Leading space | Trailing space | Name | Index | Text length |
| --- | --- | --- | --- | --- | --- |
| 1 | No | No | "Dylan Williams" | 1 | 14 |
| 2 | No | Yes | "Dylan Williams " | 10 | 15 |
| 3 | Yes | No | " Dylan Williams" | 20 | 15 |
| 4 | Yes | Yes | " Dylan Williams " | 40 | 16 |
In Power Query Editor, the resulting data appears as follows.

When you go to the **Table** tab in Power BI after you load the data, the same table looks like the following image, with the same number of rows as before.

However, a visual based on this data returns just two rows.

In the preceding image, the first row has a total value of _60_ for the **Index** field, so the first row in the visual represents the last two rows of the loaded data. The second row with total **Index** value of _11_ represents the first two rows. The difference in the number of rows between the visual and the data table is caused by the engine automatically removing or trimming trailing spaces, but not leading spaces. So the engine evaluates the first and second rows, and the third and fourth rows, as identical, and the visual returns these results.
This behavior can also cause error messages related to relationships, because duplicate values are detected. For example, depending on the configuration of your relationships, you might see an error similar to the following image:

In other situations, you might be unable to create a many-to-one or one-to-one relationship because duplicate values are detected.

You can trace these errors back to leading or trailing spaces, and resolve them by using [Text.Trim](/en-us/powerquery-m/text-trim)
, or **Format** > **Trim** under **Transform**, to remove the spaces in Power Query Editor.
True/false type
---------------
The **True/false** data type is a Boolean value of either _True_ or _False_. For the best and most consistent results, when you load a column that contains Boolean true/false information into Power BI, set the column type to **True/False**.
Power BI converts and displays data differently in certain situations. This section describes common cases of converting Boolean values, and how to address conversions that create unexpected results in Power BI.
In this example, you load data about whether your customers have signed up for your newsletter. A value of _TRUE_ indicates the customer has signed up for the newsletter, and a value of _FALSE_ indicates the customer hasn't signed up.
However, when you publish the report to the Power BI service, the newsletter signup status column shows _0_ and _\-1_ instead of the expected values of _TRUE_ or _FALSE_. The following steps describe how this conversion occurs, and how to prevent it.
The simplified query for this table appears in the following image:

The data type of the **Subscribed To Newsletter** column is set to **Any**, and as a result, Power BI loads the data into the model as **Text**.

When you add a simple visualization that shows the detailed information per customer, the data appears in the visual as expected, both in Power BI Desktop and when published to the Power BI service.

However, when you refresh the semantic model in the Power BI service, the **Subscribed To Newsletter** column in the visuals displays values as _\-1_ and _0_, instead of displaying them as _TRUE_ or _FALSE_:

If you republish the report from Power BI Desktop, the **Subscribed To Newsletter** column again shows _TRUE_ or _FALSE_ as you expect, but once a refresh occurs in the Power BI service, the values again change to show _\-1_ and _0_.
The solution to prevent this situation is to set any Boolean columns to type **True/False** in Power BI Desktop, and republish your report.

When you make the change, the visualization shows the values in the **Subscribed To Newsletter** column slightly differently. Rather than the text being all capital letters as entered in the table, only the first letter is capitalized. This change is one result of changing the column's data type.

Once you change the data type, republish to the Power BI service, and a refresh occurs, the report displays the values as _True_ or _False_, as expected.

To summarize, when working with Boolean data in Power BI, make sure your columns are set to the **True/False** data type in Power BI Desktop.
Blank type
----------
**Blank** is a DAX data type that represents and replaces SQL nulls. You can create a blank by using the [BLANK](/en-us/dax/blank-function-dax)
function, and test for blanks by using the [ISBLANK](/en-us/dax/isblank-function-dax)
logical function.
Binary type
-----------
You can use the **Binary** data type to represent any data with a binary format. In the Power Query Editor, you can use this data type when loading binary files if you convert it to other data types before you load it into the Power BI model.
Binary columns aren't supported in the Power BI data model. The **Binary** selection exists in the Table view and Report view menus for legacy reasons, but if you try to load binary columns to the Power BI model, you might 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.
Table type
----------
DAX uses a Table data type in many functions, such as aggregations and time intelligence calculations. Some functions require a reference to a table. Other functions return a table that you can then use as input to other functions.
In some functions that require a table as input, you can specify an expression that evaluates to a table. Some functions require a reference to a base table. For information about the requirements of specific functions, see the [DAX function reference](/en-us/dax/dax-function-reference)
.
Implicit and explicit data type conversion
------------------------------------------
Each DAX function has specific requirements for the types of data to use as inputs and outputs. For example, some functions require integers for some arguments and dates for others. Other functions require text or tables.
If the data in the column you specify as an argument is incompatible with the data type the function requires, DAX might return an error. However, wherever possible DAX attempts to implicitly convert the data to the required data type.
For example:
* If you type a date as a string, DAX parses the string and tries to cast it as one of the Windows date and time formats.
* You can add _TRUE + 1_ and get the result _2_, because DAX implicitly converts _TRUE_ to the number _1_, and does the operation _1+1_.
* If you add values in two columns with one value represented as text ("12") and the other as a number (12), DAX implicitly converts the string to a number, and then does the addition for a numeric result. The expression _\= "22" + 22_ returns _44_.
* If you try to concatenate two numbers, DAX presents them as strings, and then concatenates. The expression _\= 12 & 34_ returns _"1234"_.
### Tables of implicit data conversions
The operator determines the type of conversion DAX performs by casting the values it requires before doing the requested operation. The following tables list the operators, and the conversion DAX does on each data type when it pairs with the data type in the intersecting cell.
Note
These tables don't include **Text** data type. When a number is represented in a text format, in some cases Power BI tries to determine the number type and represent the data as a number.
#### Addition (+)
| | INTEGER | CURRENCY | REAL | Date/time |
| --- | --- | --- | --- | --- |
| **INTEGER** | INTEGER | CURRENCY | REAL | Date/time |
| **CURRENCY** | CURRENCY | CURRENCY | REAL | Date/time |
| **REAL** | REAL | REAL | REAL | Date/time |
| **Date/time** | Date/time | Date/time | Date/time | Date/time |
For example, if an addition operation uses a real number in combination with currency data, DAX converts both values to REAL and returns the result as REAL.
#### Subtraction (-)
In the following table, the row header is the minuend (left side) and the column header is the subtrahend (right side).
| | INTEGER | CURRENCY | REAL | Date/time |
| --- | --- | --- | --- | --- |
| **INTEGER** | INTEGER | CURRENCY | REAL | REAL |
| **CURRENCY** | CURRENCY | CURRENCY | REAL | REAL |
| **REAL** | REAL | REAL | REAL | REAL |
| **Date/time** | Date/time | Date/time | Date/time | Date/time |
For example, if a subtraction operation uses a date with any other data type, DAX converts both values to dates, and the return value is also a date.
Note
Data models support the unary operator, - (negative), but this operator doesn't change the data type of the operand.
#### Multiplication (\*)
| | INTEGER | CURRENCY | REAL | Date/time |
| --- | --- | --- | --- | --- |
| **INTEGER** | INTEGER | CURRENCY | REAL | INTEGER |
| **CURRENCY** | CURRENCY | REAL | CURRENCY | CURRENCY |
| **REAL** | REAL | CURRENCY | REAL | REAL |
For example, if a multiplication operation combines an integer with a real number, DAX converts both numbers 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.
| | INTEGER | CURRENCY | REAL | Date/time |
| --- | --- | --- | --- | --- |
| **INTEGER** | REAL | CURRENCY | REAL | REAL |
| **CURRENCY** | CURRENCY | REAL | CURRENCY | REAL |
| **REAL** | REAL | REAL | REAL | REAL |
| **Date/time** | REAL | REAL | REAL | REAL |
For example, if a division operation combines an integer with a currency value, DAX converts both values to real numbers, and the result is also a real number.
### Comparison operators
In comparison expressions, DAX considers Boolean values greater than string values, and string values greater than numeric or date/time values. Numbers and date/time values have the same rank.
DAX doesn't do any implicit conversions for Boolean or string values. BLANK or a blank value is converted to _0_, _""_, or _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".
DAX does implicit conversions for numeric or date/time types as the following table describes:
| Comparison
Operator | INTEGER | CURRENCY | REAL | Date/time |
| --- | --- | --- | --- | --- |
| **INTEGER** | INTEGER | CURRENCY | REAL | REAL |
| **CURRENCY** | CURRENCY | CURRENCY | REAL | REAL |
| **REAL** | REAL | REAL | REAL | REAL |
| **Date/time** | REAL | REAL | REAL | Date/Time |
### Blanks, empty strings, and zero values
DAX represents a null, blank value, empty cell, or missing value by the same new value type, a BLANK. You can also generate blanks by using the BLANK function, or test for blanks by using the ISBLANK function.
How operations such as addition or concatenation handle blanks depends on the individual function. The following table summarizes the differences between how DAX and Microsoft Excel formulas handle blanks.
| Expression | DAX | Excel |
| --- | --- | --- |
| BLANK + BLANK | BLANK | 0 (zero) |
| BLANK + 5 | 5 | 5 |
| BLANK \* 5 | BLANK | 0 (zero) |
| 5/BLANK | Infinity | Error |
| 0/BLANK | NaN | Error |
| BLANK/BLANK | BLANK | Error |
| FALSE OR BLANK | FALSE | FALSE |
| FALSE AND BLANK | FALSE | FALSE |
| TRUE OR BLANK | TRUE | TRUE |
| TRUE AND BLANK | FALSE | TRUE |
| BLANK OR BLANK | BLANK | Error |
| BLANK AND BLANK | BLANK | Error |
Related content
---------------
You can do all sorts of things with Power BI Desktop and data. For more information on Power BI capabilities, see the following resources:
* [What is Power BI Desktop?](../fundamentals/desktop-what-is-desktop)
* [Query overview in Power BI Desktop](../transform-model/desktop-query-overview)
* [Data sources in Power BI Desktop](desktop-data-sources)
* [Shape and combine data in Power BI Desktop](desktop-shape-and-combine-data)
* [Common query tasks in Power BI Desktop](../transform-model/desktop-common-query-tasks)
* * *
Feedback
--------
Was this page helpful?
Yes No
[Provide product feedback](https://ideas.fabric.microsoft.com/?forum=2d80fd4a-16cb-4189-896b-e0dac5e08b41)
| [Ask the community](https://community.fabric.microsoft.com/powerbi)
* * *
Additional resources
--------------------
---
# Power BI data sources - Power BI | Microsoft Learn
Table of contents Exit focus mode
Ask Learn Ask Learn [Read in English](# "Read in English")
Save[](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/power-bi-data-sources.md "Edit This Document")
Table of contents [Read in English](# "Read in English")
Add Add to plan [Edit](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/power-bi-data-sources.md "Edit This Document")
* * *
#### Share via
[Facebook](#)
[x.com](#)
[LinkedIn](#)
[Email](#)
* * *
Print
* * *
Note
Access to this page requires authorization. You can try [signing in](#)
or changing directories.
Access to this page requires authorization. You can try changing directories.
Power BI data sources
=====================
* Article
* 2024-09-06
* 22 contributors
Feedback
This article provides general information on Power BI data sources including considerations, limitations, and links to additional resources.
Power BI uses Power Query to connect to data sources. **Power BI data sources** are documented in the following article: [Power Query (including Power BI) connectors](/en-us/power-query/connectors/)
.
Each data source article in the Power Query documentation describes the capabilities of the data connector, such as whether DirectQuery is supported. The following image shows the **Capabilities supported** section for [Azure Data Explorer (Kusto)](/en-us/power-query/connectors/azure-data-explorer#capabilities-supported)
, where it states that DirectQuery is supported for the connector in Power BI. If DirectQuery (or any other capability) isn't listed, the capability isn't supported.

For a list of the connectors available in Power Query, see [Connectors in Power Query](/en-us/power-query/connectors/)
.
For information about dataflows in Power BI, see [Configure and consume a dataflow](../transform-model/dataflows/dataflows-configure-consume)
.
Considerations and limitations
------------------------------
* Many data connectors for Power BI Desktop require Internet Explorer 10 (or newer) for authentication.
* Some data sources are available in Power BI Desktop optimized for Power BI Report Server, but aren't supported when published to Power BI Report Server. See [Power BI report data sources in Power BI Report Server](../report-server/data-sources)
for the list of supported data sources.
* Power BI Desktop and the Power BI service might send multiple queries for any given query, to get schema information or the data itself, based in part on whether data is cached. This behavior is by design. For more information, see the Power Query article that describes [why a query might run multiple times](/en-us/power-query/multiple-queries)
.
Related content
---------------
The following articles provide more information about Power BI and connecting to data:
* [Connectors in Power Query](/en-us/power-query/connectors/)
* [Connect to data in Power BI Desktop](desktop-quickstart-connect-to-data)
* [Using DirectQuery in Power BI](desktop-directquery-about)
* [What is an on-premises data gateway?](service-gateway-onprem)
* [Power BI report data sources in Power BI Report Server](../report-server/data-sources)
* * *
Feedback
--------
Was this page helpful?
Yes No
[Provide product feedback](https://ideas.fabric.microsoft.com/?forum=2d80fd4a-16cb-4189-896b-e0dac5e08b41)
| [Ask the community](https://community.fabric.microsoft.com/powerbi)
* * *
Additional resources
--------------------
---
# Manage your data source - import and scheduled refresh - Power BI | Microsoft Learn
Table of contents Exit focus mode
Ask Learn Ask Learn [Read in English](# "Read in English")
Save[](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-gateway-enterprise-manage-scheduled-refresh.md "Edit This Document")
Table of contents [Read in English](# "Read in English")
Add Add to plan [Edit](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-gateway-enterprise-manage-scheduled-refresh.md "Edit This Document")
* * *
#### Share via
[Facebook](#)
[x.com](#)
[LinkedIn](#)
[Email](#)
* * *
Print
* * *
Note
Access to this page requires authorization. You can try [signing in](#)
or changing directories.
Access to this page requires authorization. You can try changing directories.
Manage your data source - import and scheduled refresh
======================================================
* Article
* 2023-03-07
* 8 contributors
Feedback
Note
We've split the on-premises data gateway docs into [content that's specific to Power BI](service-gateway-onprem)
and [general content that applies to all services](/en-us/data-integration/gateway/service-gateway-onprem)
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](/en-us/data-integration/gateway/service-gateway-install)
, you need to [add data sources](service-gateway-data-sources#add-a-data-source)
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.
Add a data source
-----------------
Select a data source type. All of the data source types listed can be used for scheduled refresh with the on-premises data gateway. Analysis Services, SQL Server, and SAP HANA can be used for scheduled refresh, DirectQuery, or live connections. For more information about how to add a data source, see [Add a data source](service-gateway-data-sources#add-a-data-source)
.

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](service-gateway-data-sources#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](service-gateway-data-sources#list-of-available-data-source-types)
.
After you fill in everything, select **Create**. If the action succeeds, you see _Created New data source._ You can now use this data source for scheduled refresh with your on-premises data.

### 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)](https://support.office.com/article/Privacy-levels-Power-Query-CC3EDE4D-359E-4B28-BC72-9BEE7900B540)
.

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.

Important
Upon republish, the data set owner must associate the dataset to a gateway and corresponding data source again. The previous association is not maintained after republishing.
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 don't see the gateway as available for scheduled refresh.
Related content
---------------
* [Troubleshooting the on-premises data gateway](/en-us/data-integration/gateway/service-gateway-tshoot)
* [Troubleshoot gateways - Power BI](service-gateway-onprem-tshoot)
More questions? Try the [Power BI Community](https://community.powerbi.com/)
.
* * *
Feedback
--------
Was this page helpful?
Yes No
[Provide product feedback](https://ideas.fabric.microsoft.com/?forum=2d80fd4a-16cb-4189-896b-e0dac5e08b41)
| [Ask the community](https://community.fabric.microsoft.com/powerbi)
* * *
Additional resources
--------------------
---
# Tips for authoring template apps in Power BI - Power BI | Microsoft Learn
Table of contents Exit focus mode
Ask Learn Ask Learn [Read in English](# "Read in English")
Save[](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-template-apps-tips.md "Edit This Document")
Table of contents [Read in English](# "Read in English")
Add Add to plan [Edit](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-template-apps-tips.md "Edit This Document")
* * *
#### Share via
[Facebook](#)
[x.com](#)
[LinkedIn](#)
[Email](#)
* * *
Print
* * *
Note
Access to this page requires authorization. You can try [signing in](#)
or changing directories.
Access to this page requires authorization. You can try changing directories.
Tips for authoring template apps in Power BI
============================================
* Article
* 2024-10-08
* 9 contributors
Feedback
When you're [authoring your template app](service-template-apps-create)
in Power BI, part of the process is the logistics of creating the workspace, testing it, and putting it into production. But the other important part is obviously authoring the report and the dashboard. You can break down the authoring process into several components. Working on these components helps you create the best possible template app:
* **Queries**. With queries, you [connect](desktop-connect-to-data)
and [transform](../transform-model/desktop-query-overview)
the data, and define [parameters](https://powerbi.microsoft.com/blog/deep-dive-into-query-parameters-and-power-bi-templates/)
.
* **Data model**. In the data model, you create [relationships](../transform-model/desktop-create-and-manage-relationships)
, [measures](../transform-model/desktop-measures)
, and Q&A improvements.
* **Report pages**. [Report pages](../create-reports/desktop-report-view)
include visuals and filters to provide insights into your data.
* **Dashboard** and **tiles**. [Dashboards](../consumer/end-user-dashboards)
and [tiles](../create-reports/service-dashboard-create)
offer an overview of the insights included.
* **Sample data**. A sample makes your app discoverable immediately after installation.
You might be familiar with each piece as existing Power BI features. When you build a template app, there are other things to consider for each piece. This article describes theses considerations along with tips other helpful information related to authoring template apps.
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.
### 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. We recommend exploring 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, see [Data Connectors](https://aka.ms/DataConnectors)
.
### Consider the source
The queries define the data that's included in the data model. Depending on the size of your system, these queries should also include filters to ensure your customers are dealing with a manageable size that fits your business scenario.
Power BI template apps can run multiple queries in parallel and for multiple users concurrently. Plan your throttling and concurrency strategy and ask us how to make your template app fault tolerant.
### Schema enforcement
Ensure your queries are resilient to changes in your system. Changes in schema can break the model during refresh. If the source could return null or a missing schema result for some queries, consider returning an empty table or a meaningful custom error message.
### Parameters
[Parameters](https://powerbi.microsoft.com/blog/deep-dive-into-query-parameters-and-power-bi-templates/)
in Power BI Desktop allow your users to provide input values that customize the data retrieved by the user. Think of the parameters up front to avoid rework after investing time to build detailed queries or reports.
Note
Template apps support all parameters except `Any` and `Binary`.
### Additional query tips
* Ensure that all columns are typed appropriately.
* Assign columns informative names. For more information, see [Q&A](#qa)
.
* For shared logic, consider using functions or queries.
* Privacy levels are currently not supported in the Power BI service. If you get a prompt about privacy levels, you might need to rewrite the query to use relative paths.
Data models
-----------
A well-defined data model ensures that 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, such as typing and column names, in the [queries](#queries)
.
### Q&A
The modeling also affects how well Q&A can provide results for your customers. Be sure to add synonyms to commonly used columns, and properly name your columns in the [queries](#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. In particular, set _No calculation_ when applicable, for unique values, for example.
* Set a data category, when applicable.
* Set relationships, as necessary.
Reports
-------
The report pages offer extra 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, with no overlapping.
* Ensure that the page layout is set to 4:3 or 16:9 mode.
* Ensure that all of the aggregations presented make numeric sense, for instance, averages or unique values.
* Check that slicing produces rational results.
* Include your logo on at least the top report.
* Ensure that elements are in the client's color scheme to the extent possible.
Note
A single template app cannot include more than 20 reports.
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 five to six small tiles wide.
* All dashboard tiles should have appropriate titles and subtitles.
* Consider groupings in the dashboard for different scenarios, either vertically or horizontally.
Sample data
-----------
A template app, as part of the app creation stage, wraps the cache data in the workspace as part of the app, which has the following benefits:
* 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 semantic model.
We recommend having quality sample data before creating the app to ensure that the app's report and dashboards are populated with data. Try to keep sample data size as small as possible.
Publishing on AppSource
-----------------------
Template apps can be published on AppSource. Follow these guidelines before submitting your app to AppSource:
* Make sure that you create a template app with engaging sample data that can help the installer understand what the app can do. Empty reports and dashboards won't be approved.
* Template apps support sample data-only apps.
* Have instructions for the validation team to follow that include credentials and parameters they can use to connect to the data.
* Your application must include an [app logo](service-template-apps-create#define-the-properties-of-the-template-app)
in Power BI and on your cloud partner portal (CPP) offer.
* Configure the [landing page](service-template-apps-create#define-the-properties-of-the-template-app)
.
* Make sure to follow the documentation about the [Power BI app offer](/en-us/azure/marketplace/partner-center-portal/create-power-bi-app-offer)
.
* If 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 that you can connect the semantic model and that the app experience is as you planned.
* Before uploading a PBIX file into the template workspace, make sure to unload any unnecessary connections.
* Follow Power BI [best design practices for reports and visuals](../create-reports/service-dashboards-design-tips)
to achieve maximum impact on your users and for getting approved for distribution.
Create a download link for the app
----------------------------------
After publishing the template app on AppSource, consider creating a download link from your website to either:
* The AppSource download page, which can be viewed by publicly. Get the link from your AppSource page.
* Power BI, which can be viewed by a Power BI user.
In order to redirect a user to the app's download link in Power BI, see the following code example: [GitHub repo](https://github.com/microsoft/Template-apps-examples)
.
[](https://app.powerbi.com/groups/me/getapps/services/pbi-contentpacks.pbiapps-github)
Automate parameter configuration during installation
----------------------------------------------------
If you're an ISV distributing your template app via your web service, you can create automation that configures template app parameters automatically when your customers install the app in their Power BI account. This approach makes things easier for your customers. It also increases the likelihood of a successful installation because they don't have to supply details that they might not know. For more information, see [Automated configuration of a template app installation](template-apps-auto-install)
.
Related content
---------------
* [What are Power BI template apps?](service-template-apps-overview)
* [Automated configuration of a template app installation](template-apps-auto-install)
* * *
Feedback
--------
Was this page helpful?
Yes No
[Provide product feedback](https://ideas.fabric.microsoft.com/?forum=2d80fd4a-16cb-4189-896b-e0dac5e08b41)
| [Ask the community](https://community.fabric.microsoft.com/powerbi)
* * *
Additional resources
--------------------
---
# Add or remove a gateway data source - Power BI | Microsoft Learn
Table of contents Exit focus mode
Ask Learn Ask Learn [Read in English](# "Read in English")
Save[](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-gateway-data-sources.md "Edit This Document")
Table of contents [Read in English](# "Read in English")
Add Add to plan [Edit](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-gateway-data-sources.md "Edit This Document")
* * *
#### Share via
[Facebook](#)
[x.com](#)
[LinkedIn](#)
[Email](#)
* * *
Print
* * *
Note
Access to this page requires authorization. You can try [signing in](#)
or changing directories.
Access to this page requires authorization. You can try changing directories.
Add or remove a gateway data source
===================================
* Article
* 2024-08-28
* 15 contributors
Feedback
Note
We've split the on-premises data gateway docs into [content that's specific to Power BI](service-gateway-onprem)
and [general content that applies to all services](/en-us/data-integration/gateway/service-gateway-onprem)
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](power-bi-data-sources)
, and each source has its own requirements. You can use a gateway for a single data source or multiple data sources. For this example, you learn how to add SQL Server as a data source. The steps are similar for other data sources. This article also tells you how to remove a data source, use it with scheduled refresh or DirectQuery, and manage user access.
You can also do most data source management operations by using APIs. For more information, see [REST APIs (Gateways)](/en-us/rest/api/power-bi/gateways)
.
If you don't have a gateway installed, [install an on-premises data gateway](/en-us/data-integration/gateway/service-gateway-install)
to get started.
Add a data source
-----------------
1. From the page header in the Power BI service, select the **Settings**  icon, and then select **Manage connections and gateways**.

2. Select **New** at the top of the screen to add a new data source.
3. On the **New connection** screen, select **On-premises**, provide the **Gateway cluster name** you want to create the connection on, provide a **Connection name**, and select the **Data Source Type**. For this example, choose **SQL Server**.
4. Enter information about the data source. For SQL Server, provide the **Server** and **Database**.

Note
To use the data source for Power BI reports and dashboards, the server and database names must match between Power BI Desktop and the data source you add to the gateway.
5. Select an **Authentication method** to use when connecting to the data source: **Basic**, **Windows**, or **OAuth2**. For SQL Server, choose **Windows** or **Basic** (SQL Authentication). Enter the credentials for your data source.

If you selected **OAuth2** authentication method:
* Any query that runs longer than the OAuth token expiration policy might fail.
* Cross-tenant Microsoft Entra accounts aren't supported.
If you selected **Windows** authentication method, make sure that account has access on the machine. If you're not sure, add _NT-AUTHORITY\\Authenticated Users (S-1-5-11)_ to the local machine **Users** group.
6. Optionally, under **Single sign-on**, you can configure [single sign-on (SSO)](service-gateway-sso-overview)
for your data source. Depending on your organization settings, for DirectQuery-based reports, you can configure **Use SSO via Kerberos for DirectQuery queries**, **Use SSO via Kerberos for DirectQuery And Import queries** or **Use SSO via Microsoft Entra ID for DirectQuery queries**. You can configure **Use SSO via Kerberos for DirectQuery And Import queries** for refresh-based reports.
If you use **Use SSO via Kerberos for DirectQuery queries** and use this data source for a DirectQuery-based report, the report uses the credentials of the user that signs in to the Power BI service. A refresh-based report uses the credentials that you enter in the **Username** and **Password** fields and the **Authentication method** you choose.
When you use **Use SSO via Kerberos for DirectQuery And Import queries**, you don't need to provide any credentials. If this data source is used for DirectQuery-based reports, the report uses the user mapped to the Microsoft Entra user that signs in to the Power BI service. A refresh-based report uses the dataset owner's security context.
For more information about **Use SSO via Kerberos for DirectQuery queries** and **Use SSO via Kerberos for DirectQuery And Import queries**, see [Overview of single sign-on (SSO) for on-premises data gateways in Power BI](service-gateway-sso-overview)
.
If you use **Use SSO via Microsoft Entra ID for DirectQuery queries** and use this data source for a DirectQuery-based report, the report uses the Microsoft Entra token of the user who signs into the Power BI service. A refresh-based report uses the credentials that you enter in the **Username** and **Password** fields and the **Authentication method** you choose. The **Use SSO via Microsoft Entra ID for DirectQuery queries** option is available only if the tenant admin allows Microsoft Entra SSO via the on-premises data gateway, and for the following data sources:
* SQL Server
* Azure Data Explorer
* Snowflake
For more information about **Use SSO via Microsoft Entra ID for DirectQuery queries**, see [Microsoft Entra single sign-on (SSO) for data gateway](/en-us/fabric/admin/service-admin-portal-integration#azure-ad-single-sign-on-sso-for-gateway)
.
Note
SSO for Import queries is available only for the SSO data sources that use [Kerberos constrained delegation](service-gateway-sso-kerberos)
.
7. Under **General** > **Privacy level**, optionally configure a [privacy level](https://support.office.com/article/Privacy-levels-Power-Query-CC3EDE4D-359E-4B28-BC72-9BEE7900B540)
for your data source. This setting doesn't apply to [DirectQuery](desktop-directquery-about)
.

8. Select **Create**. Under **Settings**, you see **Created new connection** if the process succeeds.

You can now use this data source to include data from SQL Server in your Power BI dashboards and reports.
Remove a data source
--------------------
You can remove a data source if you no longer use it. If you remove a data source, any dashboards and reports that rely on that data source stop working.
To remove a data source, select the data source from the **Connections** screen in **Manage Connections and Gateways**, and then select **Remove**.

Use the data source for scheduled refresh or DirectQuery
--------------------------------------------------------
After you create the data source, it's available to use with DirectQuery connections or through scheduled refresh. You can learn more about setting up scheduled refresh in [Configure scheduled refresh](refresh-scheduled-refresh)
.
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 format in the data source you configure for the gateway.
If your account is listed in the **Users** tab of the data source configured in the gateway, and the server and database name match, you see the gateway listed as **Running** under **Gateway connections** in the **Settings** for your data source. You can select **Scheduled refresh** to set up scheduled refresh for the data source.

Important
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.
Manage users
------------
After you add a data source to a gateway, you give users and security groups access to the specific data source, not the entire gateway. The access list for the data source controls only who is allowed to publish reports that include data from the data source. Report owners can create dashboards 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 either the stored credentials or SSO you selected while creating a data source.
### Add users to a data source
1. From the page header in the Power BI service, select the **Settings** icon, and then select **Manage connections and gateways**.
2. Select the data source where you want to add users.
3. Select **Manage users** from the top ribbon
4. On the **Manage users** screen, enter the users and/or security groups from your organization who can access the selected data source.
5. Select the new user name, and select the role to assign: **User**, **User with resharing**, or **Owner**.
6. Select **Share**, and the added member's name is added to the list of people who can publish reports that use this 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 **Manage 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 run by using these credentials. The credentials are encrypted securely with symmetric encryption, so that they can't be decrypted in the cloud. The credentials are sent to the machine that runs the on-premises gateway. This machine decrypts the credentials when the data sources are accessed.
List of available data source types
-----------------------------------
For information about which data sources the on-premises data gateway supports, see [Power BI data sources](power-bi-data-sources)
.
Note
MySQL is not supported on the personal on-premises data gateway.
Related content
---------------
* [Manage your data source - Analysis Services](service-gateway-enterprise-manage-ssas)
* [Manage your data source - SAP HANA](service-gateway-enterprise-manage-sap)
* [Manage your data source - SQL Server](service-gateway-enterprise-manage-sql)
* [Manage your data source - Oracle](service-gateway-onprem-manage-oracle)
* [Manage your data source - import and scheduled refresh](service-gateway-enterprise-manage-scheduled-refresh)
* [Guidance for deploying a data gateway](service-gateway-deployment-guidance)
More questions? Try the [Power BI Community](https://community.powerbi.com/)
.
* * *
Feedback
--------
Was this page helpful?
Yes No
[Provide product feedback](https://ideas.fabric.microsoft.com/?forum=2d80fd4a-16cb-4189-896b-e0dac5e08b41)
| [Ask the community](https://community.fabric.microsoft.com/powerbi)
* * *
Additional resources
--------------------
---
# Troubleshoot gateways - Power BI | Microsoft Learn
Table of contents Exit focus mode
Ask Learn Ask Learn [Read in English](# "Read in English")
Save[](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-gateway-onprem-tshoot.md "Edit This Document")
Table of contents [Read in English](# "Read in English")
Add Add to plan [Edit](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-gateway-onprem-tshoot.md "Edit This Document")
* * *
#### Share via
[Facebook](#)
[x.com](#)
[LinkedIn](#)
[Email](#)
* * *
Print
* * *
Note
Access to this page requires authorization. You can try [signing in](#)
or changing directories.
Access to this page requires authorization. You can try changing directories.
Troubleshoot gateways - Power BI
================================
* Article
* 2024-08-15
* 16 contributors
Feedback
Note
We've split the on-premises data gateway docs into [content that's specific to Power BI](service-gateway-onprem)
and [general content that applies to all services](/en-us/data-integration/gateway/service-gateway-onprem)
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 that might occur 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](https://community.powerbi.com)
. Or, you can create a [support ticket](https://powerbi.microsoft.com/support)
.
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](/en-us/data-integration/gateway/service-gateway-tshoot#collect-logs-from-the-on-premises-data-gateway-app)
.
### Bring your own Azure Relay
Gateways experiencing connectivity issues while using Bring Your Own Relay should ensure that Private Link is not enabled on the Relay, as this configuration is not supported.
Data sources
------------
Note
Not all data sources have dedicated articles detailing their connection settings or configuration. For many data sources and non-Microsoft connectors, connection options might vary between Power BI Desktop and the **Manage connections and gateways** configurations in the Power BI service. In such cases, the default settings provided are the currently supported scenarios for Power BI.
### 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 a message like the one that follows:
Login failed for user 'username'.
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 username and password have 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 message:
Cannot open database "AdventureWorks" requested by the login. The login failed. Login failed for user 'username'.
### Error: Unable to Connect. Details: "Unknown error in data gateway"
This error might occur for different reasons. Be sure to validate that you can connect to the data source from the machine that hosts the gateway. This situation could be the result of the server not being accessible.
Within **Show details**, you can see an error code of **DM\_GWPipeline\_UnknownError**.
You can also look in **Event Logs** > **Applications and Services Logs** > **On-premises data gateway Service** for more information. See [Event logs](/en-us/data-integration/gateway/service-gateway-tshoot#event-logs)
for a detailed depiction.
### Error: We encountered an error while trying to connect to . Details: "We reached the data gateway, but the gateway can't access the on-premises data source."
You were unable to connect to the specified data source. Be sure to validate the information provided for that data source.
Within **Show details**, you can see an error code of **DM\_GWPipeline\_Gateway\_DataSourceAccessError**.
If the underlying error message is similar to the one that follows, it means that the account you're using for the data source isn't a server admin for that Analysis Services instance. For more information, see [Grant server admin rights to an Analysis Services instance](/en-us/sql/analysis-services/instances/grant-server-admin-rights-to-an-analysis-services-instance)
.
The 'CONTOSO\account' value of the 'EffectiveUserName' XML for Analysis property is not valid.
If the underlying error message is similar to the one that follows, it could mean that the service account for Analysis Services might be missing the [Token-Groups-Global-And-Universal](/en-us/windows/win32/adschema/a-tokengroupsglobalanduniversal)
(TGGAU) directory attribute.
The username or password is incorrect.
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](https://support.microsoft.com/kb/331951)
.
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.
dsacls "CN=John Doe,CN=UserAccounts,DC=contoso,DC=com"
You want to see something similar to the following output in the results:
Allow BUILTIN\Windows Authorization Access Group
SPECIAL ACCESS for tokenGroupsGlobalAndUniversal
READ PROPERTY
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](service-gateway-data-sources#add-a-data-source)
. If the gateway doesn't appear in the admin portal under **Manage connections and gateways**, clear your browser cache or sign out of the service and then sign back in.
### Error: Your data source can't be refreshed because the credentials are invalid. Please update your credentials and try again.
You were able to connect to and refresh the dataset with no runtime errors for the connection, yet in the Power BI service this error bar appears. When the user attempts to update the credentials with known-good credentials, an error appears stating that the credentials supplied were invalid.
This error can occur when the gateway attempts a test connection, even if the credentials supplied are acceptable and the refresh operation is successful. It happens because when the gateway performs a connection test, it doesn't include any optional parameters during the connection attempt, and some data connectors, (Snowflake, for example) require optional connection parameters in order to connect.
When your refresh is completing properly and you don't experience runtime errors, you can ignore these test connection errors for data sources that require optional parameters.
Semantic models
---------------
### 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.
### Error: DM\_GWPipeline\_Gateway\_SpooledOperationMissing
A few different scenarios could be responsible for this error:
* The gateway process might have restarted while the dataset refresh was in progress.
* The gateway machine is cloned where the gateway is running. We should not clone the gateway machine.
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](/en-us/data-integration/gateway/service-gateway-tshoot#collect-logs-from-the-on-premises-data-gateway-app)
.
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 Microsoft Entra ID.
1. Browse to [https://developer.microsoft.com/graph/graph-explorer](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
4. Look for **userPrincipalName**.
If your Microsoft Entra UPN doesn't match your local Active Directory UPN, you can use the [Map user names](service-gateway-enterprise-manage-ssas#map-user-names-for-analysis-services-data-sources)
feature to replace it with a valid value. Or, you can work with either your Power BI admin or local Active Directory admin to get your UPN changed.
Kerberos
--------
If the underlying database server and on-premises data gateway aren't appropriately configured for [Kerberos constrained delegation](service-gateway-sso-kerberos)
, enable [additional logging](/en-us/data-integration/gateway/service-gateway-performance#slow-performing-queries)
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](/en-us/data-integration/gateway/service-gateway-tshoot#collect-logs-from-the-on-premises-data-gateway-app)
.
### ImpersonationLevel
The ImpersonationLevel is related to the server principal name (SPN) setup or the local policy setting.
[DataMovement.PipeLine.GatewayDataAccess] About to impersonate user DOMAIN\User (IsAuthenticated: True, ImpersonationLevel: Identification)
**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 (alias@domain.com). You see "Original UPN 'alias@domain.com' replaced with a new UPN 'alias@domain.com'" at the top of the error logs, as seen here:
[DM.GatewayCore] SingleSignOn Required. Original UPN 'alias@domain.com' replaced with new UPN 'alias@domain.com.'
**Solution**
* SAP HANA requires the impersonated user to use the sAMAccountName attribute (user alias) in Active Directory. 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 (alias@domain.com).

sAMAccount
AADEmail
### \[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.

Export logs for a support ticket
--------------------------------
Gateway logs are required for troubleshooting and creating a support ticket. Use the following steps to extract these logs.
1. Identify the gateway cluster.
If you're a dataset owner, first check the gateway cluster name associated with your dataset. In the following image, _IgniteGateway_ is the gateway cluster.

2. Check the gateway properties.
The gateway admin should then check the number of gateway members in the cluster and if load balancing is enabled.
If load balancing is enabled, then step 3 should be repeated for all gateway members. If it's not enabled, then exporting logs on the primary gateway is sufficient.
3. Retrieve and export the gateway logs.
Next, the gateway admin, who is also the administrator of the gateway system, should do the following steps:
a. Sign in to the gateway machine, and then launch the [on-premises data gateway app](/en-us/data-integration/gateway/service-gateway-app)
to sign in to the gateway.
b. Enable [additional logging](/en-us/data-integration/gateway/service-gateway-performance#slow-performing-queries)
.
c. Optionally, you can [enable the performance monitoring features](/en-us/data-integration/gateway/service-gateway-performance#enable-performance-logging)
and include performance logs to provide additional details for troubleshooting.
d. Run the scenario for which you're trying to capture gateway logs.
e. [Export the gateway logs](/en-us/data-integration/gateway/service-gateway-tshoot#collect-logs-from-the-on-premises-data-gateway-app)
.
Refresh history
---------------
When you use the gateway for a scheduled refresh, **Refresh history** 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 images show how you can get to the refresh history.
On the details page for the semantic model, select **Refresh** in the ribbon, then select **Refresh history**.

You can also access the **Refresh history** from the semantic model settings. Select **File** in the ribbon, then select **Settings**.


For more information about troubleshooting refresh scenarios, see [Troubleshoot refresh scenarios](refresh-troubleshooting-refresh-scenarios)
.
Related content
---------------
* [Troubleshoot the on-premises data gateway](/en-us/data-integration/gateway/service-gateway-tshoot)
* [Configure proxy settings for the on-premises data gateway](/en-us/data-integration/gateway/service-gateway-proxy)
* [Manage SQL Server Analysis Services data sources](service-gateway-enterprise-manage-ssas)
* [Manage your data source - SAP HANA](service-gateway-enterprise-manage-sap)
* [Manage a SQL Server data source](service-gateway-enterprise-manage-sql)
* [Manage your data source - import and scheduled refresh](service-gateway-enterprise-manage-scheduled-refresh)
More questions? Try the [Power BI Community](https://community.powerbi.com/)
.
* * *
Feedback
--------
Was this page helpful?
Yes No
[Provide product feedback](https://ideas.fabric.microsoft.com/?forum=2d80fd4a-16cb-4189-896b-e0dac5e08b41)
| [Ask the community](https://community.fabric.microsoft.com/powerbi)
* * *
Additional resources
--------------------
---
# Troubleshooting unsupported data source for refresh - Power BI | Microsoft Learn
Table of contents Exit focus mode
Ask Learn Ask Learn [Read in English](# "Read in English")
Save[](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-admin-troubleshoot-unsupported-data-source-for-refresh.md "Edit This Document")
Table of contents [Read in English](# "Read in English")
Add Add to plan [Edit](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-admin-troubleshoot-unsupported-data-source-for-refresh.md "Edit This Document")
* * *
#### Share via
[Facebook](#)
[x.com](#)
[LinkedIn](#)
[Email](#)
* * *
Print
* * *
Note
Access to this page requires authorization. You can try [signing in](#)
or changing directories.
Access to this page requires authorization. You can try changing directories.
Troubleshooting unsupported data source for refresh
===================================================
* Article
* 2025-02-26
* 7 contributors
Feedback
You might see an error when trying to configure a semantic model for scheduled refresh.
You cannot schedule refresh for this semantic model because it gets data from sources that currently don't support refresh.
This issue happens when the data source you used, within Power BI Desktop, isn't supported for refresh. You need to find the data source that you're using and compare that against the list of supported data sources at [Refresh data in Power BI](refresh-data)
.
Find the data source
--------------------
If you aren't sure what data source was used, you can find that using the following steps within Power BI Desktop.
1. In Power BI Desktop, make sure you are on the **Report** pane.

2. Select **Transform data** from the ribbon bar.

3. Select **Advanced Editor**.

4. Make note of the provider listed for the source. In this example, the provider is **ActiveDirectory**.

5. Compare the provider with the list of supported data sources found in [Power BI data sources](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](refresh-data#refresh-and-dynamic-data-sources)
.
Related content
---------------
* [Data Refresh](refresh-data)
* [Power BI Gateway - Personal](service-gateway-personal-mode)
* [On-premises data gateway](service-gateway-onprem)
* [Troubleshooting the On-premises data gateway](service-gateway-onprem-tshoot)
* [Troubleshooting the Power BI Gateway - Personal](service-admin-troubleshooting-power-bi-personal-gateway)
More questions? [Try asking the Power BI Community](https://community.powerbi.com/)
* * *
Feedback
--------
Was this page helpful?
Yes No
[Provide product feedback](https://ideas.fabric.microsoft.com/?forum=2d80fd4a-16cb-4189-896b-e0dac5e08b41)
| [Ask the community](https://community.fabric.microsoft.com/powerbi)
* * *
Additional resources
--------------------
---
# Query caching in Power BI Premium - Power BI | Microsoft Learn
Table of contents Exit focus mode
Ask Learn Ask Learn [Read in English](# "Read in English")
Save[](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/power-bi-query-caching.md "Edit This Document")
Table of contents [Read in English](# "Read in English")
Add Add to plan [Edit](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/power-bi-query-caching.md "Edit This Document")
* * *
#### Share via
[Facebook](#)
[x.com](#)
[LinkedIn](#)
[Email](#)
* * *
Print
* * *
Note
Access to this page requires authorization. You can try [signing in](#)
or changing directories.
Access to this page requires authorization. You can try changing directories.
Query caching in Power BI Premium or Power BI Embedded
======================================================
* Article
* 2024-05-21
* 10 contributors
Feedback
Organizations with Power BI Premium or Power BI Embedded can take advantage of _query caching_ to speed up reports associated with a semantic model. Query caching instructs the Power BI Premium or Power BI 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, for Import semantic models. It is not applicable DirectQuery or LiveConnect semantic models that use Azure Analysis Services or SQL Server Analysis Services.
The caching is performed the first time a user opens the report. The service only does query caching for the initial page that they land on. In other words, queries aren't cached when you interact with the report. Cached query results are specific to user and semantic model context and always respect security rules. The query cache respects [personal bookmarks](../consumer/end-user-bookmarks)
and [persistent filters](https://powerbi.microsoft.com/blog/announcing-persistent-filters-in-the-service/)
, so queries generated by a personalized report are cached. [Dashboard tiles](../create-reports/service-dashboard-tiles)
that are powered by the same queries also benefit once the query is cached. Performance especially benefits when a semantic model is accessed frequently and doesn't need to be refreshed often. Query caching can also reduce load on your capacity by reducing the overall number of queries.
You control query caching behavior on the **Settings** page for the semantic model in the Power BI service. It has three possible settings:
* **Capacity default**: Query caching Off
* **Off**: Don't use query caching for this semantic model.
* **On**: Use query caching for this semantic model.

Considerations and limitations
------------------------------
* When you change caching settings from **On** to **Off**, all previously saved query results for the semantic model are removed from the capacity cache. You can turn off caching either explicitly or by reverting to capacity default setting that an administrator sets to **Off**. Turning it off can introduce a small delay the next time any report runs queries against this semantic model. The delay is caused by those report queries running on demand and not applying saved results. Also, the required semantic model might need to be loaded into memory before it can service queries.
* The query cache is refreshed when Power BI performs a semantic model refresh. When the query cache is refreshed, Power BI must run queries against the underlying data models to get the latest results. If a large number of semantic models have query caching enabled and the Premium/Embedded capacity is under heavy load, some performance degradation might occur during cache refresh. Degradation results from the increased volume of queries being executed.
Related content
---------------
* [What is Power BI embedded analytics?](../developer/embedded/embedded-analytics-power-bi)
* * *
Feedback
--------
Was this page helpful?
Yes No
[Provide product feedback](https://ideas.fabric.microsoft.com/?forum=2d80fd4a-16cb-4189-896b-e0dac5e08b41)
| [Ask the community](https://community.fabric.microsoft.com/powerbi)
* * *
Additional resources
--------------------
---
# Use DirectQuery in Power BI Desktop - Power BI | Microsoft Learn
Table of contents Exit focus mode
Ask Learn Ask Learn [Read in English](# "Read in English")
Save[](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/desktop-use-directquery.md "Edit This Document")
Table of contents [Read in English](# "Read in English")
Add Add to plan [Edit](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/desktop-use-directquery.md "Edit This Document")
* * *
#### Share via
[Facebook](#)
[x.com](#)
[LinkedIn](#)
[Email](#)
* * *
Print
* * *
Note
Access to this page requires authorization. You can try [signing in](#)
or changing directories.
Access to this page requires authorization. You can try changing directories.
Use DirectQuery in Power BI Desktop
===================================
* Article
* 2024-09-06
* 11 contributors
Feedback
When you connect to any data source with Power BI Desktop, you can import a copy of the data. For some data sources, you can also connect directly to the data source without importing data by using DirectQuery. This article explains the differences between Import and DirectQuery connectivity modes and tells you how to connect to data sources using DirectQuery. It also covers the considerations and limitations of using DirectQuery, such as performance and security.
To determine whether a data source supports DirectQuery, view the full listing of available data sources found in the article [Connectors in Power Query](/en-us/power-query/connectors/)
, which also applies to Power BI. Select the article that describes the data source you're interested in from the list of supported connectors, then see the section in that connector's article titled **Capabilities supported**. If DirectQuery isn't listed in that section for the data source's article, DirectQuery isn't supported for that data connector.
Here are the differences between using Import and DirectQuery connectivity modes:
* **Import**: A copy of the data from the selected tables and columns imports into Power BI Desktop. As you create or interact with visualizations, Power BI Desktop uses the imported data. To see underlying data changes after the initial import or the most recent refresh, you must import the full semantic model again to refresh the data.
* **DirectQuery**: No data imports into Power BI Desktop. For relational sources, you can select tables and columns to appear in the Power BI Desktop **Data** pane. For multidimensional sources like SAP Business Warehouse (SAP BW), the dimensions and measures of the selected cube appear in the **Data** pane. As you create or interact with visualizations, Power BI Desktop queries the underlying data source, so you're always viewing current data.
With DirectQuery, when you create or interact with a visualization, you must query the underlying source. The time that's needed to refresh the visualization depends on the performance of the underlying data source. If the data needed to service the request was recently requested, Power BI Desktop uses the recent data to reduce the time required to show the visualization. Selecting **Refresh** from the **Home** ribbon refreshes all visualizations with current data.
Many data modeling and data transformations are available when using DirectQuery, although with some performance-based limitations. For more information about DirectQuery benefits, limitations, and recommendations, see [DirectQuery in Power BI](desktop-directquery-about)
.
DirectQuery benefits
--------------------
Some benefits of using DirectQuery include:
* DirectQuery lets you build visualizations over very large semantic models, where it would be infeasible to import all the data with pre-aggregation.
* DirectQuery reports always use current data. Seeing underlying data changes requires you to refresh the data, and reimporting large semantic models to refresh data could be infeasible.
* The 1-GB semantic model limitation doesn't apply with DirectQuery.
Connect using DirectQuery
-------------------------
To connect to a data source with DirectQuery:
1. In the **Home** group of the Power BI Desktop ribbon, select **Get data**, and then select a data source that DirectQuery supports, such as **SQL Server**.
2. In the dialog box for the connection, under **Data Connectivity mode**, select **DirectQuery**.

Publish to the Power BI service
-------------------------------
You can publish DirectQuery reports to the Power BI service, but you need to take extra steps for the Power BI service to open the reports.
* To connect the Power BI service to DirectQuery data sources other than Azure SQL Database, Azure Synapse Analytics (formerly SQL Data Warehouse), Amazon Redshift, and Snowflake Data Warehouse, install an [on-premises data gateway](service-gateway-onprem)
and register the data source.
* If you used DirectQuery with cloud sources like Azure SQL Database, Azure Synapse, Amazon Redshift, or Snowflake Data Warehouse, you don't need an on-premises data gateway. You still must provide credentials for the Power BI service to open the published report. Without credentials, an error occurs when you try to open a published report or explore a semantic model created with a DirectQuery connection.
To provide credentials for opening the report and refreshing the data:
1. In the Power BI service, go to the workspace and locate the semantic model that uses DirectQuery in the workspace content list.
2. Select the **More options** three horizontal dots icon next to the name of the semantic model, then choose **Settings**.
3. Under **Data source credentials**, provide the credentials to connect to the data source.
Note
If you used DirectQuery with an Azure SQL Database that has a private IP address, you need to use an on-premises gateway.
Considerations and limitations
------------------------------
Some Power BI Desktop features aren't supported in DirectQuery mode, or they have limitations. Some capabilities in the Power BI service, such as quick insights, also aren't available for semantic models that use DirectQuery. When you decide whether to use DirectQuery, consider these feature limitations. Also consider the following factors:
### Performance and load considerations
DirectQuery sends all requests to the source database, so the required refresh time for visuals depends on how long the underlying source takes to return results. Five seconds or less is the recommended response time for receiving requested data for visuals. Refresh times over 30 seconds produce an unacceptably poor experience for users consuming the report. A query that takes longer than four minutes times out in the Power BI service, and the user receives an error.
Load on the source database also depends on the number of Power BI users who consume the published report, especially if the report uses row-level security (RLS). The refresh of a non-RLS dashboard tile shared by multiple users sends a single query to the database, but refreshing a dashboard tile that uses RLS requires one query per user. The increased queries significantly increase load and potentially affect performance.
### 1 million-row limit
DirectQuery defines a 1 million-row limit for data returned from cloud data sources, which are any data sources that aren't on-premises. On-premises sources are limited to a defined payload of about 4 MB per row, depending on proprietary compression algorithm, or 16 MB for the entire visual. Premium capacities can set different maximum row limits, as described in the blog post [Power BI Premium new capacity settings](https://powerbi.microsoft.com/blog/five-new-power-bi-premium-capacity-settings-is-available-on-the-portal-preloaded-with-default-values-admin-can-review-and-override-the-defaults-with-their-preference-to-better-fence-their-capacity)
.
Power BI creates queries that are as efficient as possible, but some generated queries might retrieve too many rows from the underlying data source. For example, this situation can occur with a simple chart that includes a high cardinality column with the aggregation option set to **No Calculation**. The visual must have only columns with a cardinality below 1 million, or must apply the appropriate filters.
The row limit doesn't apply to aggregations or calculations used to select the semantic model DirectQuery returns, only to the rows returned. For example, the query that runs on the data source can aggregate 10 million rows. As long as the data returned to Power BI is less than 1 million rows, the query can accurately return the results. If the data is over 1 million rows, Power BI shows an error, except in Premium capacity with different admin-set limits. The error states: **The resultset of a query to external data source has exceeded the maximum allowed size of '1000000' rows.**
### Security considerations
By default, all users who consume a published report in the Power BI service connect to the underlying data source by using the credentials entered after publication. This situation is the same as for imported data. All users see the same data, regardless of any security rules that the underlying source defines.
If you need per-user security implemented with DirectQuery sources, either use RLS or configure Kerberos constrained authentication against the source. Kerberos isn't available for all sources. For more information, see [Row-level security (RLS) with Power BI](/en-us/fabric/security/service-admin-row-level-security)
and [Configure Kerberos-based SSO from Power BI service to on-premises data sources](service-gateway-sso-kerberos)
.
### Other DirectQuery limitations
Some other limitations of using DirectQuery include:
* If the Power Query Editor query is overly complex, an error occurs. To fix the error, you must either delete the problematic step in Power Query Editor, or switch to Import mode. Multidimensional sources like SAP BW can't use the Power Query Editor.
* Automatic date/time hierarchy is unavailable in DirectQuery. DirectQuery mode doesn't support date column drilldown by year, quarter, month, or day.
* For table or matrix visualizations, there's a 125-column limit for results that return more than 500 rows from DirectQuery sources. These results display a scroll bar in the table or matrix that lets you fetch more data. In that situation, the maximum number of columns in the table or matrix is 125. If you must include more than 125 columns in a single table or matrix, consider creating measures that use `MIN`, `MAX`, `FIRST`, or `LAST`, because they don't count against this maximum.
* You can't change from Import to DirectQuery mode. You can switch from DirectQuery mode to Import mode if you import all the necessary data. It's not possible to switch back, mostly because of the feature set that DirectQuery doesn't support. DirectQuery models over multidimensional sources, like SAP BW, can't be switched from DirectQuery to Import mode either, because of the different treatment of external measures.
* Calculated tables and calculated columns that reference a DirectQuery table from a data source with single sign-on (SSO) authentication are supported in the Power BI service with an assigned [shareable cloud connection](service-create-share-cloud-data-sources)
and/or [granular access control](service-create-share-cloud-data-sources#granular-access-control)
.
Related content
---------------
* [DirectQuery in Power BI](desktop-directquery-about)
* [Data sources supported by DirectQuery](power-bi-data-sources)
* [DirectQuery and SAP Business Warehouse](desktop-directquery-sap-bw)
* [DirectQuery and SAP HANA](desktop-directquery-sap-hana)
* [What is an on-premises data gateway?](service-gateway-onprem)
* [Use composite models in Power BI Desktop](../transform-model/desktop-composite-models)
* * *
Feedback
--------
Was this page helpful?
Yes No
[Provide product feedback](https://ideas.fabric.microsoft.com/?forum=2d80fd4a-16cb-4189-896b-e0dac5e08b41)
| [Ask the community](https://community.fabric.microsoft.com/powerbi)
* * *
Additional resources
--------------------
---
# Troubleshooting tile errors - Power BI | Microsoft Learn
Table of contents Exit focus mode
Ask Learn Ask Learn [Read in English](# "Read in English")
Save[](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/refresh-troubleshooting-tile-errors.md "Edit This Document")
Table of contents [Read in English](# "Read in English")
Add Add to plan [Edit](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/refresh-troubleshooting-tile-errors.md "Edit This Document")
* * *
#### Share via
[Facebook](#)
[x.com](#)
[LinkedIn](#)
[Email](#)
* * *
Print
* * *
Note
Access to this page requires authorization. You can try [signing in](#)
or changing directories.
Access to this page requires authorization. You can try changing directories.
Troubleshoot tile errors
========================
* Article
* 2024-11-04
* 6 contributors
Feedback
This article lists and explains the common errors that can occur with tile refresh in Power BI. If an error that's not listed causes you problems, you can ask for assistance on the [Power BI community site](https://community.powerbi.com/)
or file a [support ticket](https://powerbi.microsoft.com/support)
.
Error list
----------
The following list explains and offers solutions for common tile refresh errors.
* **Power BI encountered an unexpected error while loading the model. Please try again later.**
or
**Couldn't retrieve the data model. Please contact the dashboard owner to make sure the data sources and model exist and are accessible.**
Power BI couldn't access your data because the data source wasn't reachable. This issue can happen if the data source was removed, renamed, or moved, if the source is offline, or if permissions have changed. Check that the source is still in the specified location and you still have permission to access it. If that isn't the problem, the source might be slow. Try again later during a time when the load on the source is less. If it's an on-premises source, the data source owner might be able to provide more information.
* **You don't have permission to view this tile or open the workbook.**
Contact the dashboard owner to make sure the data sources and model exist and are accessible for your account.
* **Power BI visuals have been disabled by your administrator.**
Your Power BI administrator has disabled using Power BI visuals for your organization or your security group. You can't use Power BI visuals from the [Microsoft marketplace](https://appsource.microsoft.com/marketplace/apps?page=1&product=power-bi-visuals)
or import private visuals from a file. You can use only the pre-packed set of visuals.
* **Data shapes must contain at least one group or calculation that outputs data. Please contact the dashboard owner.**
There's no data to display because the query is empty. Try adding some fields from the field list to the visual and repinning it.
* **Can't display the data because Power BI can't determine the relationship between two or more fields.**
You'e trying to use two or more fields from tables that aren't related. You need to remove the unrelated fields from the visual and then create a relationship between the tables. Once you create the relationship, you can add the fields back to the visual. You can use Power BI Desktop or Power Pivot for Excel for this process. For more information, see [Create and manage relationships in Power BI Desktop](../transform-model/desktop-create-and-manage-relationships)
.
* **The groups in the primary axis and the secondary axis overlap. Groups in the primary axis can't have the same keys as groups in the secondary axis.**
This issue is usually transient, and typically happens when you're moving groups from rows to columns. The error should disappear when you finish moving all the groups. If you still see the message, try switching fields between the rows, columns, or axis legend, or try removing fields from the visual.
* **This visual has exceeded the available resources. Try filtering to decrease the amount of data displayed.**
The visual has tried to query too much data for Power BI to complete the result with available resources. Try filtering the visual to reduce the amount of data in the result.
* **We are not able to identify the following fields: {0}. Please update the visual with fields that exist in the semantic model.**
The field was probably deleted or renamed. You can remove the broken field from the visual, add a different field, and repin it.
* **Couldn't retrieve the data for this visual. Please try again later.**
This issue is usually transient. If you try again later and still see this message, [contact support](https://support.powerbi.com)
.
* Tiles continue to show unfiltered data after you enable single-sign on (SSO).
This issue can happen if the underlying semantic model uses DirectQuery mode or a Live Connection to Analysis Services through an on-premises data gateway. In this issue, the tiles continue to show unfiltered data after you enable SSO for the data source, until the next tile refresh. At the next tile refresh, Power BI uses SSO as configured, and the tiles show the data filtered according to the user identity.
To see the filtered data immediately, you can force a tile refresh. Select the **Refresh** icon at the upper right of a Power BI dashboard.
As a semantic model owner, you can also increase the tile refresh frequency to 15 minutes to accelerate tile refresh. Go to the workspace for the dashboard and locate the associated semantic model. Next to the semantic model's name, select the three horizontal dots icon to open the **More options** menu, then select **Settings**. On the **Semantic models** tab, expand **Refresh**, and under **Automatic dashboard tile and metric refresh**, change **Refresh frequency**. Make sure you reset the configuration to the original refresh frequency after Power BI does the next tile refresh.
Note
**Automatic dashboard tile and metric refresh** is available only for semantic models in DirectQuery or Live Connection modes. Semantic models in Import mode don't need a separate tile refresh because the tiles refresh automatically during the next scheduled data refresh.
Support contact
---------------
If you're still having problems, [contact support](https://support.powerbi.com)
and ask them to investigate further.
Related content
---------------
* [Troubleshoot the on-premises data gateway](service-gateway-onprem-tshoot)
* [Troubleshoot Power BI personal gateway](service-admin-troubleshooting-power-bi-personal-gateway)
* More questions? [Try the Power BI community site.](https://community.powerbi.com)
* * *
Feedback
--------
Was this page helpful?
Yes No
[Provide product feedback](https://ideas.fabric.microsoft.com/?forum=2d80fd4a-16cb-4189-896b-e0dac5e08b41)
| [Ask the community](https://community.fabric.microsoft.com/powerbi)
* * *
Additional resources
--------------------
---
# Troubleshoot incremental refresh and real-time data - Power BI | Microsoft Learn
Table of contents Exit focus mode
Ask Learn Ask Learn [Read in English](# "Read in English")
Save[](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/incremental-refresh-troubleshoot.md "Edit This Document")
Table of contents [Read in English](# "Read in English")
Add Add to plan [Edit](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/incremental-refresh-troubleshoot.md "Edit This Document")
* * *
#### Share via
[Facebook](#)
[x.com](#)
[LinkedIn](#)
[Email](#)
* * *
Print
* * *
Note
Access to this page requires authorization. You can try [signing in](#)
or changing directories.
Access to this page requires authorization. You can try changing directories.
Troubleshoot incremental refresh and real-time data
===================================================
* Article
* 2024-04-26
* 11 contributors
Feedback
There are two phases when implementing an incremental refresh and real-time data solution, the first being configuring parameters, filtering, and defining a policy in Power BI Desktop, and the second being the initial semantic model refresh operation and subsequent refreshes in the service. This article discusses troubleshooting separately for each of these phases.
Having partitioned the table in the Power BI service, it's important to keep in mind that incrementally refreshed tables that are also getting real-time data with DirectQuery are now operating in hybrid mode, meaning they operate in both import and DirectQuery mode. Any tables with relationships to such an incrementally refreshed hybrid table must use Dual mode so that they can be used in import and DirectQuery mode without performance penalties. Moreover, report visuals might cache results to avoid sending queries back to the data source, which would prevent the table from picking up the latest data updates in real time. The final troubleshooting section covers these hybrid-mode issues.
Before troubleshooting incremental refresh and real-time data, be sure to review [Incremental refresh for models and real-time data](incremental-refresh-overview)
and step-by-step information in [Configure incremental refresh and real-time data](incremental-refresh-configure)
.
Configuring in Power BI Desktop
-------------------------------
Most problems that occur when configuring incremental refresh and real-time data have to do with query folding. As described in [Incremental refresh for models overview - Supported data sources](incremental-refresh-overview#supported-data-sources)
, your data source must support query folding.
### Problem: Loading data takes too long
In Power Query Editor, after selecting **Apply**, loading data takes an excessive amount of time and computer resources. There are several potential causes.
#### Cause: Data type mismatch
This issue can be caused by a data type mismatch where `Date/Time` is the required data type for the `RangeStart` and `RangeEnd` parameters, but the table date column on which the filters are applied aren't `Date/Time` data type, or vice-versa. Both the parameters data type and the filtered data column must be `Date/Time` data type and the format must be the same. If not, the query can't be folded.
#### Solution: Verify data type
Verify the date/time column for the incremental refresh table is of `Date/Time` data type. If your table doesn't contain a column of `Date/Time` data type, but instead uses an integer data type, you can create a function that converts the date/time value in the `RangeStart` and `RangeEnd` parameters to match the integer surrogate key of the data source table. To learn more, see [Configure incremental refresh - Convert DateTime to integer](incremental-refresh-configure#convert-datetime-to-integer)
.
#### Cause: The data source doesn't support query folding
As described in [Incremental refresh and real-time data for models - Requirements](incremental-refresh-overview#requirements)
, incremental refresh is designed for data sources that support query folding. Make sure data source queries are being folded in Power BI Desktop before publishing to the service, where query folding issues can be significantly compounded. This approach is especially important when including real-time data in an incremental refresh policy because the real-time DirectQuery partition requires query folding.
#### Solution: Verify and test queries
In most cases, a warning is shown in the Incremental refresh policy dialog indicating if the query to be executed against the data source doesn't support query folding. However, in some cases it might be necessary to further ensure query folding is possible. If possible, monitor the query being passed to the data source by using a tool like SQL Profiler. A query with filters based on `RangeStart` and `RangeEnd` must be executed in a single query.
You can also specify a short date/time period in the `RangeStart` and `RangeEnd` parameters that include no more than a few thousand rows. If the load of filtered data from the data source to the model takes a long time and is process intensive, it likely means the query isn't being folded.
If you determine the query isn't being folded, refer to [Query folding guidance in Power BI Desktop](../guidance/power-query-folding)
and [Power Query query folding](/en-us/power-query/power-query-folding)
for help with identifying what might be preventing query folding and how, or if, the data source can even support query folding.
Semantic model refresh in the service
-------------------------------------
Troubleshooting incremental refresh issues in the service differ depending on the type of capacity your model has been published to. Semantic models on Premium capacities support using tools like SQL Server Management Studio (SSMS) to view and selectively refresh individual partitions. Power BI Pro models on the other hand don't provide tool access through the XMLA endpoint, so troubleshooting incremental refresh issues might require a little more trial and error.
### Problem: Initial refresh times out
Scheduled refresh for Power BI Pro models on a shared capacity have a time limit of two hours. This time limit is increased to five hours for models in a Premium capacity. Data source systems might also impose a query return size limit or query timeout.
#### Cause: Data source queries aren't being folded
While problems with query folding can usually be determined in Power BI Desktop before publishing to the service, it's possible that model refresh queries aren't being folded, leading to excessive refresh times and query mashup engine resource utilization. This situation happens because a query is created for every partition in the model. If the queries aren't being folded, and data isn't being filtered at the data source, the engine then attempts to filter the data.
#### Solution: Verify query folding
Use a tracing tool at the data source to determine the query being passed for each partition is a single query that includes a filter based on the RangeStart and RangeEnd parameters. If not, verify query folding is occurring in the Power BI Desktop model when loading a small filtered amount of data into the model. If not, get it fixed in the model first, perform a metadata only update to the model (by using XMLA endpoint), or if a Power BI Pro model on a shared capacity, delete the incomplete model in the service, republish, and try an initial refresh operation again.
If you determine queries aren't being folded, refer to [Query folding guidance in Power BI Desktop](../guidance/power-query-folding)
and [Power Query query folding](/en-us/power-query/power-query-folding)
for help with identifying what might be preventing query folding.
#### Cause: Data loaded into partitions is too large
#### Solution: Reduce model size
In many cases, the timeout is caused by the amount of data that must be queried and loaded into the model partitions exceeds the time limits imposed by the capacity. Reduce the size or complexity of your model, or consider breaking the model into smaller pieces.
#### Solution: Enable Large model storage format
For models published to Premium capacities, if the model grows beyond 1 GB or more, you can improve refresh operation performance and ensure the model doesn't max out size limits by enabling Large model storage format _before_ performing the first refresh operation in the service. To learn more, see [Large models in Power BI Premium](../enterprise/service-premium-large-models)
.
#### Solution: Bootstrap initial refresh
For models published to Premium capacities, you can bootstrap the initial refresh operation. Bootstrapping allows the service to create table and partition objects for the model, but not load and process historical data into any of the partitions. To learn more, see [Advanced incremental refresh - Prevent timeouts on initial full refresh](incremental-refresh-xmla#prevent-timeouts-on-initial-full-refresh)
.
#### Cause: Data source query timeout
Queries can be limited by a default time limit for the data source.
#### Solution: Override the time limit in the query expression
Many data sources allow overriding time limit in the query expression. To learn more, see [Incremental refresh for models - Time limits](incremental-refresh-overview#time-limits)
.
### Problem: Refresh fails because of duplicate values
#### Cause: Post dates have changed
With a refresh operation, only data that has changed at the data source is refreshed in the model. As the data is divided by a date, it's recommended that post (transaction) dates aren't changed.
If a date is changed accidentally, then two issues can occur: Users notice some totals changed in the historical data (that isn't supposed to happen), or during a refresh an error is returned indicating a unique value isn't in fact unique. For the latter, this situation can happen when the table with incremental refresh configured is used in a `1:N` relationship with another table as the `1` side and should have unique values. When the data is changed for a specific ID, that ID then appears in another partition and the engine detects the value isn't unique.
#### Solution: Refresh specific partitions
Where there's a business need to change some past data from the dates, a possible solution is to use SSMS to refresh all partitions from the point where the change is located up to the current refresh partition, thus keeping the `1` side of the relationship unique.
### Problem: Data is truncated
#### Cause: Data source query limit has been exceeded
Some data sources, like Azure Data Explorer, Log Analytics, and Application Insights, have a limit of 64 MB (compressed) on data that can be returned for an external query. Azure Data Explorer might return an explicit error, but for others like Log Analytics and Application Insights, the data returned is truncated.
#### Solution: Specify smaller refresh and store periods
Specify smaller refresh and store periods in the policy. For example, if you specified a refresh period of one year, and a query error is returned or data returned is truncated, try a refresh period of 12 _months_. You want to ensure queries for the current refresh partition or any historical partitions based on the Refresh and Store periods don't return more than 64 MB of data.
### Problem: Refresh fails because of partition-key conflicts
#### Cause: Date in the date column at the data source is updated
The filter on the date column is used to dynamically partition the data into period 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 isn't picked up, which can cause data refresh failures due to partition-key conflicts.
Hybrid mode in the service (Preview)
------------------------------------
When Power BI applies an incremental refresh policy with real-time data, it turns the incrementally refreshed table into a hybrid table that operates in both import and DirectQuery mode. Notice the DirectQuery partition at the end of the following partitions list of a sample table. The presence of a DirectQuery partition has implications for related tables and report visuals that query this table.
[](media/incremental-refresh-troubleshoot/hybrid-table-01.png#lightbox)
### Problem: Query performance is poor
#### Cause: Related tables aren't in Dual mode
Hybrid tables operating in both import and DirectQuery mode require any related tables to operating in Dual mode so that they can act as either cached or not cached, depending on the context of the query that's submitted to the Power BI model. Dual mode enables Power BI to reduce the number of limited relationships in the model and generate efficient data source queries to ensure good performance. Limited relationships can't be pushed to the data source requiring Power BI to retrieve more data than necessary. Because Dual tables can act as either DirectQuery or Import tables, this situation is avoided.
#### Solution: Convert related tables to Dual mode
When configuring an incremental refresh policy, Power BI Desktop reminds you to switch any related tables to Dual mode when you select **Get the latest data in real time with DirectQuery (Premium only)**. In addition, make sure you review all existing table relationships in Model View.
[](media/incremental-refresh-troubleshoot/hybrid-table-02.png#lightbox)
Tables currently operating in DirectQuery mode, are easily switched to Dual mode. In the table properties, under Advanced, select Dual from the Storage mode listbox. Tables currently operating in import mode, however, require manual work. Dual tables have the same functional constraints as DirectQuery tables. Power BI Desktop therefore can't convert import tables because they might rely on other functionality not available in Dual mode. You must manually recreate these tables in DirectQuery mode and then convert them to Dual mode. To learn more, see [Manage storage mode in Power BI Desktop](../transform-model/desktop-storage-mode)
.
### Problem: Report visuals don’t show the latest data
#### Cause: Power BI caches query results improve performance and reduce back-end load
By default, Power BI caches query results, so that queries of report visuals can be processed quickly even if they're based on DirectQuery. Avoiding unnecessary data source queries improves performance and reduces data source load, but it might also mean that the latest data changes at the source aren't included in the results.
#### Solution: Configure automatic page refresh
To keep fetching the latest data changes from the source, configure automatic page refresh for your reports in the Power BI service. Automatic page refresh can be performed in fixed intervals, such as five seconds or ten minutes. When that specific interval is reached, all visuals in that page send an update query to the data source and update accordingly. Alternatively, you can refresh visuals on a page based on detecting changes in the data. This approach requires a change detection measure that Power BI then uses to poll the data source for changes. Change detection is only supported in workspaces that are part of a Premium capacity. To learn more, see [Automatic page refresh in Power BI](../create-reports/desktop-automatic-page-refresh)
.
Related content
---------------
* [Data refresh in Power BI](refresh-data)
* [Advanced incremental refresh with the XMLA endpoint](incremental-refresh-xmla)
* [Incremental refresh for dataflows](../transform-model/dataflows/dataflows-premium-features#incremental-refresh)
* * *
Feedback
--------
Was this page helpful?
Yes No
[Provide product feedback](https://ideas.fabric.microsoft.com/?forum=2d80fd4a-16cb-4189-896b-e0dac5e08b41)
| [Ask the community](https://community.fabric.microsoft.com/powerbi)
* * *
Additional resources
--------------------
---
# Advanced incremental refresh and real-time data with the XMLA endpoint in Power BI - Power BI | Microsoft Learn
Table of contents Exit focus mode
Ask Learn Ask Learn [Read in English](# "Read in English")
Save[](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/incremental-refresh-xmla.md "Edit This Document")
Table of contents [Read in English](# "Read in English")
Add Add to plan [Edit](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/incremental-refresh-xmla.md "Edit This Document")
* * *
#### Share via
[Facebook](#)
[x.com](#)
[LinkedIn](#)
[Email](#)
* * *
Print
* * *
Note
Access to this page requires authorization. You can try [signing in](#)
or changing directories.
Access to this page requires authorization. You can try changing directories.
Advanced incremental refresh and real-time data with the XMLA endpoint
======================================================================
* Article
* 2023-11-10
* 9 contributors
Feedback
Semantic models in a Premium capacity with the [XMLA endpoint](../enterprise/service-premium-connect-tools)
enabled for read/write operations allow more advanced refresh, partition management, and metadata only deployments through tool, scripting, and API support. In addition, refresh operations through the XMLA endpoint aren't limited to [48 refreshes per day](refresh-data#data-refresh)
, and the [scheduled refresh time limit](refresh-troubleshooting-refresh-scenarios#scheduled-refresh-time-out)
isn't imposed.
Partitions
----------
Semantic model table partitions aren't visible and can't be managed by using Power BI Desktop or the Power BI service. For models in a workspace assigned to a Premium capacity, partitions can be managed through the XMLA endpoint by using tools like SQL Server Management Studio (SSMS), the open-source Tabular Editor, scripted with Tabular Model Scripting Language (TMSL), and programmatically with the Tabular Object Model (TOM).
When you first publish a model to the Power BI service, each table in the new model has one partition. For tables with no incremental refresh policy, that one partition contains all rows of data for that table, unless filters have been applied. For tables with an incremental refresh policy, that one initial partition only exists because Power BI hasn't yet applied the policy. You configure the initial partition in Power BI Desktop when you define the date/time range filter for your table based on the `RangeStart` and `RangeEnd` parameters, and any other filters applied in Power Query Editor. This initial partition contains only those rows of data that meet your filter criteria.
When you perform the _first_ refresh operation, tables with no incremental refresh policy refresh all rows contained in that table's default single partition. For tables with an incremental refresh policy, refresh and historical partitions are automatically created and rows are loaded into them according to the date/time for each row. If the incremental refresh policy includes getting data in real time, Power BI also adds a DirectQuery partition to the table.
This first refresh operation can take quite some time depending on the amount of data that needs to be loaded from the data source. The complexity of the model can also be a significant factor because refresh operations must do more processing and recalculation. This operation can be bootstrapped. For more information, see [Prevent timeouts on initial full refresh](#prevent-timeouts-on-initial-full-refresh)
.
Partitions are created for and named by period granularity: Years, quarters, months, and days. The most recent partitions, the _refresh_ partitions, contains rows in the refresh period you specify in the policy. Historical partitions contain rows by complete period up to the refresh period. If real time is enabled, a DirectQuery partition picks up any data changes that occurred after the end date of the refresh period. Granularity for refresh and historical partitions is dependent on the refresh and historical (store) periods you choose when defining the policy.
For example, if today's date is February 2, 2021 and our **FactInternetSales** table at the data source contains rows up through today, if our policy specifies to include real-time changes, refresh rows in the last one day refresh period, and store rows in the last three years historical period. Then with the first refresh operation, a DirectQuery partition is created for changes in the future, a new import partition is created for today's rows, a historical partition is created for yesterday, a whole day period, February 1, 2021. A historical partition is created for the previous whole month period (January 2021), a historical partition is created for the previous whole year period (2020), and historical partitions for 2019 and 2018 whole year periods are created. No whole quarter partitions are created because we haven't yet completed the first full quarter of 2021.

With each refresh operation, only the refresh period partitions are refreshed and the date filter of the DirectQuery partition is updated to include only those changes that occur after the current refresh period. A new refresh partition is created for new rows with a new date/time within the updated refresh period, and existing rows with a date/time already within existing partitions in the refresh period are refreshed with updates. Rows with a date/time older than the refresh period are no longer refreshed.
As whole periods close, partitions are merged. For example, if a one-day refresh period and three year historical store period is specified in the policy, on the first day of the month, all day partitions for the previous month are merged into a month partition. On the first day of a new quarter, all three previous month partitions are merged into a quarter partition. On the first day of a new year, all four previous quarter partitions are merged into a year partition.
A model always retains partitions for the entire historical store period plus whole period partitions up through the current refresh period. In the example, a full three years of historical data are retained in partitions for 2018, 2019, 2020, and also partitions for the 2021Q101 month period, the 2021Q10201 day period, and the current day refresh period partition. Because the example retains historical data for three _years_, the 2018 partition is retained until the first refresh on January 1, 2022.
With Power BI incremental refresh and real-time data, the service handles the partition management for you based on the policy. While the service can handle all of the partition management for you, by using tools through the XMLA endpoint, you can selectively refresh partitions individually, sequentially, or in parallel.
Refresh management with SQL Server Management Studio
----------------------------------------------------
SQL Server Management Studio (SSMS) can be used to view and manage partitions created by the application of incremental refresh policies. By using SSMS you can, for example, refresh a specific historical partition not in the incremental refresh period to perform a back-dated update without having to refresh all historical data. SSMS can also be used when bootstrapping to load historical data for large models by incrementally adding/refreshing historical partitions in batches.

### Override incremental refresh behavior
With SSMS, you also have more control over how to invoke refreshes by using [Tabular Model Scripting Language](/en-us/analysis-services/tmsl/tabular-model-scripting-language-tmsl-reference?view=power-bi-premium-current&preserve-view=true)
and the [Tabular Object Model](/en-us/analysis-services/tom/introduction-to-the-tabular-object-model-tom-in-analysis-services-amo?view=power-bi-premium-current&preserve-view=true)
. For example, in SSMS, in Object Explorer, right-click a table and then select the **Process Table** menu option, and then select the **Script** button to generate a TMSL refresh command.

These parameters can be used with the TMSL refresh command to override the default incremental refresh behavior:
* **applyRefreshPolicy**. If a table has an incremental refresh policy defined, `applyRefreshPolicy` determines if the policy is applied or not. If the policy isn't applied, a process full operation leaves partition definitions unchanged and all partitions in the table are fully refreshed. Default value is true.
* **effectiveDate**. If an incremental refresh policy is being applied, it needs to know the current date to determine rolling window ranges for the incremental refresh and historical periods. The `effectiveDate` parameter allows you to override the current date. This parameter is useful for testing, demos, and business scenarios where data is incrementally refreshed up to a date in the past or the future, for example, budgets in the future. The default value is the current date.
{
"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](/en-us/analysis-services/tmsl/refresh-command-tmsl?view=power-bi-premium-current&preserve-view=true)
.
Ensuring optimal performance
----------------------------
With each refresh operation, the Power BI service might send initialization queries to the data source for each incremental refresh partition. You might be able to improve incremental refresh performance by reducing the number of initialization queries by ensuring the following configuration:
* The table you configure incremental refresh for should get data from a single data source. If the table gets data from more than one data source, the number of queries sent by the service for each refresh operation is multiplied by the number of data sources, potentially reducing refresh performance. Ensure the query for the incremental refresh table is for a single data source.
* For solutions with both incremental refresh of import partitions and real-time data with Direct Query, _all partitions_ must query data from a single data source.
* If your security requirements allow, set the Data source privacy level setting to _Organizational_ or _Public_. By default, the privacy level is _Private_, however this level can prevent data from being exchanged with other cloud sources. To set the privacy level, select the **More options** menu and then choose **Settings** > **Data source credentials** > **Edit credentials** > **Privacy level setting for this data source**. If Privacy level is set in the Power BI Desktop model before publishing to the service, it isn't transferred to the service when you publish. You must still set it in semantic model settings in the service. To learn more, see [Privacy levels](../enterprise/desktop-privacy-levels)
.
* If using an On-premises Data Gateway, be sure you’re using version 3000.77.3 or higher.
Prevent timeouts on initial full refresh
----------------------------------------
After you publish to the Power BI service, the initial full refresh operation for the model creates partitions for the incremental refresh table, loads, and processes historical data for the entire period defined in the incremental refresh policy. For some models that load and process large amounts of data, the amount of time the initial refresh operation takes can exceed the refresh time limit imposed by the service or a query time limit imposed by the data source.
Bootstrapping the initial refresh operation allows the service to create partition objects for the incremental refresh table, but not load and process historical data into any of the partitions. SSMS is then used to selectively process partitions. Depending on the amount of data to be loaded for each partition, you can process each partition sequentially or in small batches to reduce the potential for one or more of those partitions to cause a timeout. The following methods work for any data source.
### Apply Refresh Policy
The open-source [Tabular Editor 2](https://github.com/otykier/TabularEditor/releases/)
tool provides an easy way to bootstrap an initial refresh operation. After publishing a model with an incremental refresh policy defined for it from Power BI Desktop to the service, connect to the model by using the XMLA endpoint in Read/Write mode. Run **Apply Refresh Policy** on the incremental refresh table. With only the policy applied, partitions are created but no data is loaded into them. Then connect with SSMS to refresh the partitions sequentially or in batches to load and process the data. For more information, see [Incremental refresh](https://docs.tabulareditor.com/te2/incremental-refresh.html)
in the Tabular editor documentation.

### Power Query filter for empty partitions
Prior to publishing the model to the service, in Power Query Editor, add another filter to the `ProductKey` column that filters out any value other than 0, effectively or filtering out _all_ data from the **FactInternetSales** table.

After selecting **Close & Apply** in Power Query Editor, defining the incremental refresh policy, and saving the model, the model is published to the service. From the service, the initial refresh operation is run on the model. Partitions for the **FactInternetSales** table are created according to the policy, but no data is loaded and processed because all data is filtered out.
After the initial refresh operation is complete, back in Power Query Editor, the other filter on the `ProductKey` column is removed. After selecting **Close & Apply** in Power Query Editor and saving the model, the model _is not published again_. If the model is published again, it overwrites the incremental refresh policy settings and forces a full refresh on the model when a subsequent refresh operation is performed from the service. Instead, perform a [metadata only deployment](#metadata-only-deployment)
by using the Application Lifecycle Management (ALM) Toolkit that removes the filter on the `ProductKey` column from the _model_. SSMS can then be used to selectively process partitions. When all partitions have been fully processed, which must include a process recalculation on all partitions, from SSMS, subsequent refresh operations on the model from the service refresh only the incremental refresh partitions.
Tip
Be sure to check out videos, blogs, and more provided by Power BI's community of BI experts.
* [Search for **"Prevent timeouts with incremental refresh"** on Bing](https://www.bing.com/video/search?q=prevent+timeouts+with+incremental+refresh)
.
To learn more about processing tables and partitions from SSMS, see [Process database, table, or partitions (Analysis Services)](/en-us/analysis-services/tabular-models/process-database-table-or-partition-analysis-services?view=power-bi-premium-current&preserve-view=true)
. To learn more about processing models, tables, and partitions by using TMSL, see [Refresh command (TMSL)](/en-us/analysis-services/tmsl/refresh-command-tmsl?view=power-bi-premium-current&preserve-view=true)
.
Custom queries for detect data changes
--------------------------------------
TMSL and TOM can be used to override the detected data changes behavior. Not only can this method be used to avoid persisting the last-update column in the in-memory cache, it can enable scenarios where a configuration or instruction table is prepared by extract, transform, and load (ETL) processes for flagging only the partitions that need to be refreshed. This method 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 period for backdated changes. Specifying 120 months instead of 10 years means data compression might not be quite as efficient, but avoids having to refresh a whole historical year, which would be more expensive when a month would be sufficient for a backdated change.
"refreshPolicy": {
"policyType": "basic",
"rollingWindowGranularity": "month",
"rollingWindowPeriods": 120,
"incrementalGranularity": "month",
"incrementalPeriods": 120,
"pollingExpression": "",
"sourceExpression": [\
"let ..."\
]
}
Tip
Be sure to check out videos, blogs, and more provided by Power BI's community of BI experts.
* [Search for **"Power BI Incremental refresh detect data changes"** on Bing](https://www.bing.com/videos/search?q=power+bi+incremental+refresh+detect+data+changes)
.
Metadata only deployment
------------------------
When publishing a new version of a _.pbix_ file from Power BI Desktop to a workspace, if a model with the same name already exists, you're prompted to replace the existing model.

In some cases, you might not want to replace the model, especially with incremental refresh. The model in Power BI Desktop could be much smaller than the one in the Power BI service. If the model in the Power BI service has an incremental refresh policy applied, it might have several years of historical data that will be lost if the model 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, which allows deployment of new objects without losing the historical data. For example, if you've added a few measures you can deploy only the new measures without needing to refresh the data, saving time.
For workspaces assigned to a Premium capacity configured for XMLA endpoint read/write, compatible tools enable metadata only deployment. For example, the ALM Toolkit is a schema diff tool for Power BI models 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](https://github.com/microsoft/Analysis-Services/releases)
. Step-by-step guidance on using ALM Toolkit isn't included in Microsoft documentation. ALM Toolkit documentation links and information on supportability are available on 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 model in the Power BI 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.

Adding an incremental refresh policy and real-time data programmatically
------------------------------------------------------------------------
You can also use the TMSL and TOM to add an incremental refresh policy to an existing model through the XMLA endpoint.
Note
To avoid compatibility issues, make sure you use the latest version of the Analysis Services client libraries. For example, to work with Hybrid policies, the version must be 19.27.1.8 or higher.
The process includes of the following steps:
1. Ensure the target model has the required minimum compatibility level. In SSMS, right-click the **\[model name\]** > **Properties** > **Compatibility Level**. To increase the compatibility level, either use a createOrReplace TMSL script or check the following TOM sample code for an example.
a. Import policy - 1550
b. Hybrid policy - 1565
2. Add the `RangeStart` and `RangeEnd` parameters to the model expressions. If necessary, also add a function to convert Date/Time values to date keys.
3. Define a `RefreshPolicy` object with the desired archiving (rolling window) and incremental refresh periods as well as a source expression that filters the target table based on the `RangeStart` and `RangeEnd` parameters. Set the refresh policy mode to _Import_ or _Hybrid_ depending on your real-time data requirements. Hybrid causes Power BI to add a DirectQuery partition to the table to fetch the latest changes from the data source that occurred after the last refresh time.
4. Add the refresh policy to the table and perform a full refresh so that Power BI partitions the table according to your requirements.
The following code sample demonstrates how to perform the previous steps by using TOM. If you want to use this sample as is, you must have a copy for the AdventureWorksDW database and import the **FactInternetSales** table into a model. The code sample assumes that the `RangeStart` and `RangeEnd` parameters and the `DateKey` function don't exist in the model. Just import the **FactInternetSales** table and publish the model to a workspace on Power BI Premium. Then update the `workspaceUrl` so that the code sample can connect to your model. Update any more code lines as necessary.
using System;
using TOM = Microsoft.AnalysisServices.Tabular;
namespace Hybrid_Tables
{
class Program
{
static string workspaceUrl = "";
static string databaseName = "AdventureWorks";
static string tableName = "FactInternetSales";
static void Main(string[] args)
{
using (var server = new TOM.Server())
{
// Connect to the dataset.
server.Connect(workspaceUrl);
TOM.Database database = server.Databases.FindByName(databaseName);
if (database == null)
{
throw new ApplicationException("Database cannot be found!");
}
if(database.CompatibilityLevel < 1565)
{
database.CompatibilityLevel = 1565;
database.Update();
}
TOM.Model model = database.Model;
// Add RangeStart, RangeEnd, and DateKey function.
model.Expressions.Add(new TOM.NamedExpression {
Name = "RangeStart",
Kind = TOM.ExpressionKind.M,
Expression = "#datetime(2021, 12, 30, 0, 0, 0) meta [IsParameterQuery=true, Type=\"DateTime\", IsParameterQueryRequired=true]"
});
model.Expressions.Add(new TOM.NamedExpression
{
Name = "RangeEnd",
Kind = TOM.ExpressionKind.M,
Expression = "#datetime(2021, 12, 31, 0, 0, 0) meta [IsParameterQuery=true, Type=\"DateTime\", IsParameterQueryRequired=true]"
});
model.Expressions.Add(new TOM.NamedExpression
{
Name = "DateKey",
Kind = TOM.ExpressionKind.M,
Expression =
"let\n" +
" Source = (x as datetime) => Date.Year(x)*10000 + Date.Month(x)*100 + Date.Day(x)\n" +
"in\n" +
" Source"
});
// Apply a RefreshPolicy with Real-Time to the target table.
TOM.Table salesTable = model.Tables[tableName];
TOM.RefreshPolicy hybridPolicy = new TOM.BasicRefreshPolicy
{
Mode = TOM.RefreshPolicyMode.Hybrid,
IncrementalPeriodsOffset = -1,
RollingWindowPeriods = 1,
RollingWindowGranularity = TOM.RefreshGranularityType.Year,
IncrementalPeriods = 1,
IncrementalGranularity = TOM.RefreshGranularityType.Day,
SourceExpression =
"let\n" +
" Source = Sql.Database(\"demopm.database.windows.net\", \"AdventureWorksDW\"),\n" +
" dbo_FactInternetSales = Source{[Schema=\"dbo\",Item=\"FactInternetSales\"]}[Data],\n" +
" #\"Filtered Rows\" = Table.SelectRows(dbo_FactInternetSales, each [OrderDateKey] >= DateKey(RangeStart) and [OrderDateKey] < DateKey(RangeEnd))\n" +
"in\n" +
" #\"Filtered Rows\""
};
salesTable.RefreshPolicy = hybridPolicy;
model.RequestRefresh(TOM.RefreshType.Full);
model.SaveChanges();
}
Console.WriteLine("{0}{1}", Environment.NewLine, "Press [Enter] to exit...");
Console.ReadLine();
}
}
}
Related content
---------------
* [Partitions in tabular models](/en-us/analysis-services/tabular-models/partitions-ssas-tabular?view=power-bi-premium-current&preserve-view=true)
* [External tools in Power BI Desktop](../transform-model/desktop-external-tools)
* [Configure scheduled refresh](refresh-scheduled-refresh)
* [Troubleshoot incremental refresh and real-time data](incremental-refresh-troubleshoot)
* * *
Feedback
--------
Was this page helpful?
Yes No
[Provide product feedback](https://ideas.fabric.microsoft.com/?forum=2d80fd4a-16cb-4189-896b-e0dac5e08b41)
| [Ask the community](https://community.fabric.microsoft.com/powerbi)
* * *
Additional resources
--------------------
---
# Automate template app installation with an Azure function - Power BI | Microsoft Learn
Table of contents Exit focus mode
Ask Learn Ask Learn [Read in English](# "Read in English")
Save[](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/template-apps-auto-install-tutorial.md "Edit This Document")
Table of contents [Read in English](# "Read in English")
Add Add to plan [Edit](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/template-apps-auto-install-tutorial.md "Edit This Document")
* * *
#### Share via
[Facebook](#)
[x.com](#)
[LinkedIn](#)
[Email](#)
* * *
Print
* * *
Note
Access to this page requires authorization. You can try [signing in](#)
or changing directories.
Access to this page requires authorization. You can try changing directories.
Tutorial: Automate configuration of template app installation using an Azure function
=====================================================================================
* Article
* 2024-10-10
* 6 contributors
Feedback
Template apps are a great way for customers to start getting insights from their data. Template apps get them up and running quickly by connecting them to their data. The template apps provide customers with prebuilt reports that they can customize if they so desire.
Customers aren't always familiar with the details of how to connect to their data. Having to provide these details when they install a template app can be a pain point for them.
If you're a data services provider and have created a template app to help your customers get started with their data on your service, you can make it easier for them to install your template app. You can automate the configuration of your template app's parameters.
When the customer signs in to your portal, they select a special link you've prepared. This link:
* Launches the automation, which gathers the information it needs.
* Preconfigures the template app parameters.
* Redirects the customer to their Power BI account where they can install the app.
All they have to do is select **Install** and authenticate against their data source, and they're good to go!
The customer experience is illustrated here.

In this tutorial, you'll use an automated installation Azure Functions sample that we've created to preconfigure and install your template app. This sample has deliberately been kept simple for demonstration purposes. It encapsulates the setup of an Azure function to use Power BI APIs for installing a template app and automatically configuring it for your users.
For more information about the general automation flow and the APIs that the app uses, see [Automate configuration of a template app installation](template-apps-auto-install)
.
Our simple application uses an Azure function. For more information about Azure Functions, see the [Azure Functions documentation](/en-us/azure/azure-functions/)
.
Basic flow
----------
The following basic flow lists what the application does when the customer launches it by selecting the link in your portal.
1. The user signs in to the ISV's portal and selects the supplied link. This action initiates the flow. The ISV's portal prepares the user-specific configuration at this stage.
2. The ISV acquires an _app-only_ token based on a [service principal (app-only token)](../developer/embedded/embed-service-principal)
that's registered in the ISV's tenant.
3. Using [Power BI REST APIs](/en-us/rest/api/power-bi/)
, the ISV creates an _install ticket_, which contains the user-specific parameter configuration as prepared by the ISV.
4. The ISV redirects the user to Power BI by using a `POST` redirection method, which contains the install ticket.
5. The user is redirected to their Power BI account with the install ticket and is prompted to install the template app. When the user selects **Install**, the template app is installed for them.
Note
While parameter values are configured by the ISV in the process of creating the install ticket, data source-related credentials are only supplied by the user in the final stages of the installation. This arrangement prevents them from being exposed to a third party and ensures a secure connection between the user and the template app data sources.
Prerequisites
-------------
* Your own Microsoft Entra tenant setup. For instructions on how to set one up, see [Create a Microsoft Entra tenant](../developer/embedded/create-an-azure-active-directory-tenant)
.
* A [service principal (app-only token)](../developer/embedded/embed-service-principal)
registered in the preceding tenant.
* A parameterized [template app](service-template-apps-overview)
that's ready for installation. The template app must be created in the same tenant in which you register your application in Microsoft Entra ID. For more information, see [Tips for authoring template apps](service-template-apps-tips)
or [Create a template app in Power BI](service-template-apps-create)
.
* To be able to test your automation work flow, add the service principal to the template app workspace as an Admin.
* A Power BI Pro license. If you're not signed up for Power BI Pro, [sign up for a free trial](https://powerbi.microsoft.com/pricing/)
before you begin.
Set up your template apps automation development environment
------------------------------------------------------------
Before you continue setting up your application, follow the instructions in [Quickstart: Create an Azure Functions app with Azure App Configuration](/en-us/azure/azure-app-configuration/quickstart-azure-functions-csharp)
to develop an Azure function along with an Azure app configuration. Create your app configuration as described in the article.
### Register an application in Microsoft Entra ID
Create a service principal as described in [Embed Power BI content with service principal and an application secret](../developer/embedded/embed-service-principal)
.
Make sure to register the application as a **server-side web application**. You register a server-side web application to create an application secret.
Save the _application ID_ (ClientID) and _application secret_ (ClientSecret) for later steps.
You can go through the [Embedding setup tool](https://aka.ms/embedsetup/AppOwnsData)
to quickly get started creating an app registration. If you're using the [Power BI App Registration Tool](https://app.powerbi.com/embedsetup)
, select the **Embed for your customers** option.
Add the service principal to the template app workspace as an Admin so that you'll be able to test your automation work flow.
Template app preparation
------------------------
After you've created your template app and it's ready for installation, save the following information for the next steps:
* _App ID_, _Package Key_, and _Owner ID_ as they appear in the installation URL at the end of the [Define the properties of the template app](service-template-apps-create#define-the-properties-of-the-template-app)
process when the app was created.
You can also get the same link by selecting **Get link** in the template app's [Release Management pane](service-template-apps-create#manage-the-template-app-release)
.
* _Parameter names_ as they're defined in the template app's semantic model. Parameter names are case-sensitive strings. They can also be retrieved from the **Parameter Settings** tab when you [define the properties of the template app](service-template-apps-create#define-the-properties-of-the-template-app)
or from the semantic model settings in Power BI.
Note
You can test your preconfigured installation application on your template app if the template app is ready for installation, even if it isn't publicly available on AppSource yet. For users outside your tenant to be able to use the automated installation application to install your template app, the template app must be publicly available in [AppSource](https://appsource.microsoft.com/en-us/marketplace/apps?product=power-bi)
. Before you distribute your template app by using the automated installation application you're creating, be sure to [publish it to Partner Center](/en-us/azure/marketplace/partner-center-portal/create-power-bi-app-offer)
.
Install and configure your template app
---------------------------------------
In this section, you'll use an automated installation Azure Functions sample that we created to preconfigure and install your template app. This sample has deliberately been kept simple for demonstration purposes. It allows you to use an [Azure function](/en-us/azure/azure-functions/functions-overview)
and [Azure App Configuration](/en-us/azure/azure-app-configuration/overview)
to easily deploy and use the automated installation API for your template apps.
### Download [Visual Studio](https://www.visualstudio.com/)
(version 2017 or later)
Download [Visual Studio](https://www.visualstudio.com/)
(version 2017 or later). Make sure to download the latest [NuGet package](https://www.nuget.org/profiles/powerbi)
.
### Download the automated installation Azure Functions sample
Download the [automated installation Azure Functions sample](https://github.com/microsoft/Template-apps-examples)
from GitHub to get started.

### Set up your Azure app configuration
To run this sample, you need to set up your Azure app configuration with the values and keys as described here. The keys are the **application ID**, the **application secret**, and your template app's **appId**, **packageKey**, and **ownerId** values. See the following sections for information about how to get these values.
The keys are also defined in the **Constants.cs** file.
| Configuration key | Meaning |
| --- | --- |
| TemplateAppInstall:Application:AppId | **appId** from the [installation URL](#get-the-template-app-properties) |
| TemplateAppInstall:Application:PackageKey | **packageKey** from the [installation URL](#get-the-template-app-properties) |
| TemplateAppInstall:Application:OwnerId | **ownerId** from the [installation URL](#get-the-template-app-properties) |
| TemplateAppInstall:ServicePrincipal:ClientId | Service principal [application ID](#get-the-application-id) |
| TemplateAppInstall:ServicePrincipal:ClientSecret | Service principal [application secret](#get-the-application-secret) |
| | |
The **Constants.cs** file is shown here.

#### Get the template app properties
Fill in all relevant template app properties as they're defined when the app is created. These properties are the template app's **appId**, **packageKey**, and **ownerId** values.
To get the preceding values, follow these steps:
1. Sign in to [Power BI](https://app.powerbi.com)
.
2. Go to the application's original workspace.
3. Open the **Release Management** pane.

4. Select the app version, and get its installation link.

5. Copy the link to the clipboard.

6. This installation URL holds the three URL parameters whose values you need. Use the **appId**, **packageKey**, and **ownerId** values for the application. A sample URL will be similar to what is shown here.
https://app.powerbi.com/Redirect?action=InstallApp&appId=66667...9cccc0000&packageKey=b2df4b...dLpHIUnum2pr6k&ownerId=aaaa...22222&buildVersion=5
#### Get the application ID
Fill in the **applicationId** information with the application ID from Azure. The **applicationId** value is used by the application to identify itself to the users from which you're requesting permissions.
To get the application ID, follow these steps:
1. Sign in to the [Azure portal](https://portal.azure.com)
.
2. From the portal menu, select **All services**.
3. On the All services page, in the **Identity** section, select > **App registrations**.
4. Select the application that needs the **application ID**.

5. There's an application ID that's listed as a GUID. Use this application ID as the **applicationId** value for the application.

#### Get the application secret
Fill in the **ApplicationSecret** information from the **Keys** section of your **App registrations** section in Azure. This attribute works when you use the [service principal](../developer/embedded/embed-service-principal)
.
To get the application secret, follow these steps:
1. Sign in to the [Azure portal](https://portal.azure.com)
.
2. From the portal menu, select **All services**.
3. On the All services page, in the **Identity** section, select > **App registrations**.

4. Select **Certificates and secrets** under **Manage**.
5. Select **New client secret**.
6. Enter a name in the **Description** box, and select a duration. Then select **Add** to get the value for your application, which you'll see under the **Value** heading for the client secret.
Test your function locally
--------------------------
Follow the steps as described in [Run the function locally](/en-us/azure/azure-functions/functions-create-your-first-function-visual-studio#run-the-function-locally)
to run your function.
Configure your portal to issue a `POST` request to the URL of the function. An example is `POST http://localhost:7071/api/install`. The request body should be a JSON object that describes key-value pairs. Keys are _parameter names_ as defined in Power BI Desktop. Values are the desired values to be set for each parameter in the template app.
Note
In production, parameter values are deduced for each user by your portal's intended logic.
The desired flow should be:
1. The portal prepares the request, per user or session.
2. The `POST /api/install` request is issued to your Azure function. The request body consists of key-value pairs. The key is the parameter name. The value is the desired value to be set.
3. If everything is configured properly, the browser should automatically redirect to the customer's Power BI account and show the automated installation flow.
4. Upon installation, parameter values are set as configured in steps 1 and 2.
Related content
---------------
### Publish your project to Azure
To publish your project to Azure, follow the instructions in the [Azure Functions documentation](/en-us/azure/azure-functions/functions-create-your-first-function-visual-studio#publish-the-project-to-azure)
. Then you can integrate template app automated installation APIs into your product and begin testing it in production environments.
* * *
Feedback
--------
Was this page helpful?
Yes No
[Provide product feedback](https://ideas.fabric.microsoft.com/?forum=2d80fd4a-16cb-4189-896b-e0dac5e08b41)
| [Ask the community](https://community.fabric.microsoft.com/powerbi)
* * *
Additional resources
--------------------
---
# Quickstart: Connect to data in Power BI Desktop - Power BI | Microsoft Learn
Table of contents Exit focus mode
Ask Learn Ask Learn [Read in English](# "Read in English")
Save[](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/desktop-quickstart-connect-to-data.md "Edit This Document")
Table of contents [Read in English](# "Read in English")
Add Add to plan [Edit](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/desktop-quickstart-connect-to-data.md "Edit This Document")
* * *
#### Share via
[Facebook](#)
[x.com](#)
[LinkedIn](#)
[Email](#)
* * *
Print
* * *
Note
Access to this page requires authorization. You can try [signing in](#)
or changing directories.
Access to this page requires authorization. You can try changing directories.
Quickstart: Connect to data in Power BI Desktop
===============================================
* Article
* 2025-02-26
* 5 contributors
Feedback
In this quickstart, you connect to data using Power BI Desktop, which is the first step in building data models and creating reports.
[](media/desktop-quickstart-connect-to-data/what-is-desktop_01.png#lightbox)
If you're not signed up for Power BI, [sign up for a free trial](https://app.powerbi.com/signupredirect?pbi_source=web)
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](https://powerbi.microsoft.com/desktop)
directly, or you can get it from [the Microsoft Store](https://aka.ms/pbidesktopstore)
.
* [Download this sample Excel workbook](https://go.microsoft.com/fwlink/?LinkID=521962)
, 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.
Launch Power BI Desktop
-----------------------
Once you install Power BI Desktop, launch the application so it's running on your local computer. You're presented with a Power BI tutorial. Follow the tutorial or close the dialog to start with a blank canvas. The canvas is where you create visuals and reports from your data.
[](media/desktop-quickstart-connect-to-data/qs-connect-data_01.png#lightbox)
Connect to data
---------------
With Power BI Desktop, you can connect to many different types of data. These sources include basic data sources, such as a Microsoft Excel file. You can connect to online services that contain all sorts of data, such as Salesforce, Microsoft Dynamics, Azure Blob Storage, and many more.
To connect to data, from the **Home** ribbon select **Get data**.

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](#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.
[](media/desktop-quickstart-connect-to-data/qs-connect-data_05.png#lightbox)
Once you make your selections, select **Load** to import the data into Power BI Desktop.
View data in the Fields pane
----------------------------
Once you load the tables, the **Fields** pane shows you the data. You can expand each table by selecting the arrow beside its name. In the following image, the _financials_ table is expanded, showing each of its fields.
[](media/desktop-quickstart-connect-to-data/qs-connect-data_06.png#lightbox)
And that's it! You've connected to data in Power BI Desktop, loaded that data, and now you can see all the available fields within those tables.
Related content
---------------
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](../fundamentals/desktop-getting-started)
* * *
Feedback
--------
Was this page helpful?
Yes No
[Provide product feedback](https://ideas.fabric.microsoft.com/?forum=2d80fd4a-16cb-4189-896b-e0dac5e08b41)
| [Ask the community](https://community.fabric.microsoft.com/powerbi)
* * *
Additional resources
--------------------
---
# Semantic model details page - Power BI | Microsoft Learn
Table of contents Exit focus mode
Ask Learn Ask Learn [Read in English](# "Read in English")
Save[](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-dataset-details-page.md "Edit This Document")
Table of contents [Read in English](# "Read in English")
Add Add to plan [Edit](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-dataset-details-page.md "Edit This Document")
* * *
#### Share via
[Facebook](#)
[x.com](#)
[LinkedIn](#)
[Email](#)
* * *
Print
* * *
Note
Access to this page requires authorization. You can try [signing in](#)
or changing directories.
Access to this page requires authorization. You can try changing directories.
Semantic model details
======================
* Article
* 2024-11-04
* 6 contributors
Feedback
The semantic model details page helps you explore, monitor, and leverage semantic models. When you select a semantic model in the [data hub](service-data-hub)
, a workspace, or other place in Power BI, the details page for that semantic model opens.
This article provides an overview of the semantic model details page in Power BI, explaining its features, functionalities, and how you can interact with it.
[](media/service-dataset-details-page/dataset-details-page-inline-and-expanded.png#lightbox)
The semantic model details page:
* Shows you metadata about the semantic model, including description, endorsement, and sensitivity.
* Provides actions that you can perform on the semantic model, such as share, refresh, Analyze in Excel, and more.
* Lists the reports and scorecards that are built on top of the semantic model.
The page header displays the semantic model name and endorsement (if any). To contact the semantic model owner or semantic model certifier (if any), select the header, then select the name of the owner.
Supported actions
-----------------
The semantic model details page enables you to perform a number of actions. The actions available vary from user to user depending on their permissions on the data item, and thus not all actions are available for all users.
| Action | Description | On Action bar, choose: |
| --- | --- | --- |
| **Download this file** | Downloads the .pbix file for this semantic model. | **File > Download this file** |
| **Manage permissions** | Opens the manage semantic model permissions page. | **File > Manage permissions** |
| **Settings** | Opens the semantic model settings page. | **File > Settings** |
| **Refresh now** | Launches a refresh of the semantic model. | **Refresh > Refresh now** |
| **Schedule refresh** | Opens the semantic model settings page where you can set scheduled refresh. | **Refresh > Schedule refresh** |
| **Refresh history** | Opens the Refresh history screen. | **Refresh > Refresh history**. |
| **Share** | Opens the **Share semantic model** dialog. | **Share**, or use the [Share this data tile](#share-this-data)
. |
| **Explore this data** | Opens the formatted table editing canvas. | **Explore this data > Explore this data**, or use the [Explore this data tile](#explore-this-data)
. |
| **Auto-create a report** | Creates a report based on the semantic model's data. | **Explore this data > Auto-create a report**, or use the [Explore this data tile](#explore-this-data)
. |
| **Create a blank report** | Opens the report editing canvas where you can create a new report based on the semantic model. | **Explore this data > Create a blank report**, or use the [Explore this data tile](#explore-this-data)
. |
| **Create a paginated report** | Opens the paginated report editing canvas. | Use the command from the dropdown on the [Explore this data tile](#explore-this-data)
. |
| **Analyze in Excel** | Launches [Analyze in Excel](../collaborate-share/service-analyze-in-excel#analyze-in-excel)
using this semantic model. | **Analyze in Excel** |
| **Open workspace lineage** | Opens the [lineage view](../collaborate-share/service-data-lineage)
for the semantic model. | **Lineage > Open workspace lineage** |
| **Impact analysis** | Opens the [impact analysis side pane](../collaborate-share/service-dataset-impact-analysis)
for this semantic model. | **Lineage > Impact analysis** |
| **Chat in Teams** | Invite people to start [chatting in Teams](../collaborate-share/service-share-report-teams)
. People you invite will receive a Teams chat message from you with a link to this semantic model details page. If they have access to the semantic model, the link will open this semantic model details page in Teams. | **... > Chat in Teams** |
| **Show tables** | Opens a side panel showing the semantic model's tables. In the tables view you can create table previews by selecting desired columns. | **... > Show tables** |
View semantic model metadata
----------------------------

The semantic model details section shows:
* The name of the workspace where the item is located.
* The exact time of the last refresh.
* Endorsement status and certifier (if certified).
* Sensitivity (if set).
* Description (if any). You can create or edit the description from here.
See what already exists
-----------------------
The see what already exists section shows you all the reports and scorecards that are built on the semantic model. You can create a copy of an item by selecting the three horizontal dots icon in the line for the semantic model to open the **More options** menu, then selecting **Save a copy**.
The columns in the list of related reports are:
* **Name**: Report name. If the name ends with (template), it means that this report has been specially constructed to be used as a template. For example, "Sales (template)".
* **Type**: Item type, for example, report or scorecard.
* **Relation**: Relation to the semantic model, for example, downstream.
* **Location**: The name of the workspace where the related item is located.
* **Refreshed**: The date when the item was last refreshed.
* **Endorsement**: Endorsement status.
* **Sensitivity**: Sensitivity label (if set).
Explore this data
-----------------
To create a report based on the semantic model, select the **Explore this data** button on this tile or select the dropdown and choose the desired option.

* **Explore this data**: Opens the formatted table editing canvas.
* **Auto-create a report**: Creates a report based on the semantic model's data.
* **Create a blank report**: Opens the report editing canvas to a new report built on the semantic model. When you save your new report, it will be saved in the workspace that contains the semantic model if you have write permissions on that workspace. If you don't have write permissions on the workspace, or if you're a free user and the semantic model resides in a Premium-capacity workspace, the new report will be saved in _My workspace_.
* **Create a paginated report**: Opens the paginated report editing canvas.
Share this data
---------------
You can share the semantic model with other users in your organization. Selecting the **Share semantic model** button opens the [Share semantic model dialog](service-datasets-share)
, where you can choose which permissions to grant on the semantic model.

Data preview
------------
Data preview enables you to view a selected table or columns from the semantic model. You can also export the data to supported file formats or create a [paginated report](../paginated-reports/web-authoring/paginated-formatted-table)
.
### Prerequisites
* The semantic model can be inside Premium or non-Premium workspaces. Classic workspaces aren't supported. [Read about workspaces](../collaborate-share/service-new-workspaces)
.
* You need [Build permission](service-datasets-build-permissions)
for the semantic model.
### Select data to preview
To preview a semantic models's data from the semantic model details page, select a table or columns on the **Tables** side panel.

If you don't see the side panel, select **Show tables** on the action bar.

An entirely filled and checked parent checkbox on the semantic model's table indicates that all its sub-tables and columns have been selected. A partially filled parent checkbox with no check mark means that only a subset of them has been selected.

When you select a table or columns in a table, they'll be displayed on the **Table preview** page that opens.

Table preview might not show all of the data you've selected. To see more, you can [export](#export-data)
or build a [paginated report](#build-a-paginated-report)
.
#### Show query
Show query enables you to copy the DAX query used to create the table preview to the clipboard. This makes it possible to reuse the query for future actions.

#### Back
At any time, you can return to the semantic model details page by selecting the **Back** button on the action bar. Selecting the Back button clears all your selections and brings you back to semantic model details page.
Note
Table preview is intended to quickly explore the underlying data of tables within your semantic model. You cannot view measures or select more than one table or columns across tables. You can select [**Create paginated report**](#build-a-paginated-report)
for that.
### Export data
Select the **Export** button on the Table preview page to export the data to one of the supported file formats.

### Build a paginated report
Select the **Create paginated report** button to open the [editor](../paginated-reports/web-authoring/paginated-formatted-table)
.
Note
Data will change from underlying data to summarized data. You can switch to underlying data using **More options** next to the table name in the Data pane.
In the editor you can select multiple tables, measure, fields across tables, apply table styles, change aggregates, and so on.

You can then export the report to any of the supported file formats, and the file will be saved to your default downloads folder. Or you can save it as a [paginated report](../paginated-reports/paginated-reports-report-builder-power-bi)
to a workspace of your choice. Paginated reports fully preserve your report formatting.
### Switch from summarized to underlying data in the editor
Select **More options (...)** to switch from **Summarized data** to **Underlying data**.

Considerations and limitations
------------------------------
Streaming datasets do not have a details page.
Related content
---------------
* [Use semantic models across workspaces](service-datasets-across-workspaces)
* [Create reports based on semantic models from different workspaces](service-datasets-discover-across-workspaces)
* [Endorse your semantic model](../collaborate-share/service-endorse-content)
* Questions? [Try asking the Power BI Community](https://community.powerbi.com/)
* * *
Feedback
--------
Was this page helpful?
Yes No
[Provide product feedback](https://ideas.fabric.microsoft.com/?forum=2d80fd4a-16cb-4189-896b-e0dac5e08b41)
| [Ask the community](https://community.fabric.microsoft.com/powerbi)
* * *
Additional resources
--------------------
---
# DirectQuery in Power BI - Power BI | Microsoft Learn
Table of contents Exit focus mode
Ask Learn Ask Learn [Read in English](# "Read in English")
Save[](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/desktop-directquery-about.md "Edit This Document")
Table of contents [Read in English](# "Read in English")
Add Add to plan [Edit](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/desktop-directquery-about.md "Edit This Document")
* * *
#### Share via
[Facebook](#)
[x.com](#)
[LinkedIn](#)
[Email](#)
* * *
Print
* * *
Note
Access to this page requires authorization. You can try [signing in](#)
or changing directories.
Access to this page requires authorization. You can try changing directories.
DirectQuery in Power BI
=======================
* Article
* 2024-08-13
* 18 contributors
Feedback
In Power BI Desktop or the Power BI service, you can connect to many different data sources in different ways. You can _import_ data to Power BI, which is the most common way to get data. You can also connect directly to some data in its original source repository, which is called _DirectQuery_. This article primarily discusses DirectQuery capabilities.
This article describes:
* The different Power BI data connectivity options.
* Guidance about when to use DirectQuery rather than import.
* Limitations and implications of using DirectQuery.
* Recommendations for successfully using DirectQuery.
* How to diagnose DirectQuery performance issues.
The article focuses on the DirectQuery workflow when you create a report in Power BI Desktop, but also covers connecting through DirectQuery in the Power BI service.
Note
DirectQuery is also a feature of SQL Server Analysis Services. That feature shares many details with DirectQuery in Power BI, but there are also important differences. This article primarily covers DirectQuery with Power BI, not SQL Server Analysis Services.
For more information about using DirectQuery with SQL Server Analysis Services, see [Use composite models in Power BI Desktop)](../transform-model/desktop-composite-models)
. You can also download the PDF [DirectQuery in SQL Server 2016 Analysis Services](https://download.microsoft.com/download/F/6/F/F6FBC1FC-F956-49A1-80CD-2941C3B6E417/DirectQuery%20in%20Analysis%20Services%20-%20Whitepaper.pdf)
.
Power BI data connectivity modes
--------------------------------
Power BI connects to a large number of varied data sources, such as:
* Online services like Salesforce and Dynamics 365.
* Databases like SQL Server, Access, and Amazon Redshift.
* Simple files in Excel, JSON, and other formats.
* Other data sources like Spark, websites, and Microsoft Exchange.
You can import data from these sources into Power BI. For some sources, you can also connect using DirectQuery. For a summary of the sources that support DirectQuery, see [Power BI data sources](power-bi-data-sources)
. DirectQuery-enabled sources are primarily sources that can deliver good interactive query performance.
You should import data into Power BI wherever possible. Importing takes advantage of Power BI's high-performance query engine and provides a highly interactive, fully featured experience.
If you can't meet your goals by importing data, for example, if the data changes frequently and reports must reflect the latest data, consider using DirectQuery. DirectQuery is feasible only when the underlying data source can provide interactive query results in less than five seconds for a typical aggregate query, and can handle the generated query load. Carefully consider the limitations and implications of using DirectQuery.
Power BI import and DirectQuery capabilities evolve over time. Changes that provide more flexibility when using imported data let you import more often, and eliminate some of the drawbacks of using DirectQuery. Regardless of improvements, the performance of the underlying data source is a major consideration when using DirectQuery. If an underlying data source is slow, using DirectQuery for that source remains infeasible.
The following sections cover these three options for connecting to data: import, DirectQuery, and live connection. The remainder of the article focuses on DirectQuery.
### Import connections
When you connect to a data source like SQL Server and import data in Power BI Desktop, the following connectivity conditions are present:
* When you initially use **Get data**, each set of tables you select defines a query that returns a set of data. You can edit those queries before loading the data, for example, to apply filters, aggregate the data, or join different tables.
* Upon load, all the data defined by the queries imports into the Power BI cache.
* Building a visual within Power BI Desktop queries the cached data. The Power BI store ensures the query is fast, and that all changes to the visual reflect immediately.
* Visuals don't reflect changes to the underlying data in the data store. You need to reimport to refresh the data.
* Publishing the report to the Power BI service as a _.pbix_ file creates and uploads a semantic model that includes the imported data. You can then schedule data refresh to reimport the data daily, for example. Depending on the location of the original data source, it might be necessary to configure an on-premises data gateway for the refresh.
* Opening an existing report or authoring a new report in the Power BI service queries the imported data again, ensuring interactivity.
* You can pin visuals or entire report pages as dashboard tiles in the Power BI service. The tiles automatically refresh whenever the underlying semantic model refreshes.
### DirectQuery connections
When you use DirectQuery to connect to a data source in Power BI Desktop, the following data connectivity conditions are present:
* You use **Get data** to select the source. For relational sources, you can still select a set of tables that define a query that logically returns a set of data. For multidimensional sources like SAP Business Warehouse (SAP BW), you select only the source.
* Upon load, no data is imported into the Power BI store. Instead, when you build a visual, Power BI Desktop sends queries to the underlying data source to retrieve the necessary data. The time it takes to refresh the visual depends on the performance of the underlying data source.
* Any changes to the underlying data aren't immediately reflected in existing visuals. It's still necessary to refresh. Power BI Desktop resends the necessary queries for each visual, and updates the visual as necessary.
* Publishing the report to the Power BI service creates and uploads a semantic model, the same as for import. However, that semantic model includes no data.
* Opening an existing report or authoring a new report in the Power BI service queries the underlying data source to retrieve the necessary data. Depending upon the location of the original data source, it might be necessary to configure an on-premises data gateway to get the data.
* You can pin visuals or entire report pages as dashboard tiles. To ensure that opening a dashboard is fast, the tiles automatically refresh on a schedule, for example every hour. You can control refresh frequency depending on how frequently the data changes and the importance of seeing the latest data.
* When you open a dashboard, the tiles reflect the data at the time of the last refresh, not necessarily the latest changes made to the underlying source. You can refresh an open dashboard to ensure that it's current.
### Live connections
When you connect to SQL Server Analysis Services, you can choose to import the data or use a _live connection_ to the selected data model. Using a live connection is similar to DirectQuery. No data is imported, and the underlying data source is queried to refresh visuals.
For example, when you use import to connect to SQL Server Analysis Services, you define a query against the external SQL Server Analysis Services source, and import the data. If you connect live, you don't define a query, and the entire external model shows in the fields list.
This situation also applies when you connect to the following sources, except there's no option to import the data:
* Power BI semantic models, for example connecting to a Power BI semantic model that's already published to the service, to author a new report over it.
* Microsoft Dataverse.
When you publish SQL Server Analysis Services reports that use live connections, the behavior in the Power BI service is similar to DirectQuery reports in the following ways:
* Opening an existing report or authoring a new report in the Power BI service queries the underlying SQL Server Analysis Services source, possibly requiring an on-premises data gateway.
* Dashboard tiles automatically refresh on a schedule, such as every hour.
A live connection also differs from DirectQuery in several ways. For example, live connections always pass the identity of the user opening the report to the underlying SQL Server Analysis Services source.
DirectQuery use cases
---------------------
Connecting with DirectQuery can be useful in the following scenarios. In several of these cases, leaving the data in its original source location is necessary or beneficial.
DirectQuery in Power BI offers the greatest benefits in the following scenarios:
* The data changes frequently, and you need near real-time reporting.
* You need to handle large data without having to pre-aggregate.
* The underlying source defines and applies security rules.
* Data sovereignty restrictions apply.
* The source is a multidimensional source containing measures, such as SAP BW.
### Data changes frequently, and you need near real-time reporting
You can refresh models with imported data at most once per hour, or more frequently with Power BI Pro or Power BI Premium subscriptions. If the data is continually changing, and it's necessary for reports to show the latest data, using import with scheduled refresh might not meet your needs. You can stream data directly into Power BI, although there are limits on the data volumes supported for this case.
Using DirectQuery means that opening or refreshing a report or dashboard always shows the latest data in the source. The dashboard tiles can also be updated more frequently, as often as every 15 minutes.
### Data is very large
If the data is very large, it's not feasible to import all of it. DirectQuery requires no large transfer of data, because it queries data in place. However, large data might also make the performance of queries against that underlying source too slow.
You don't always have to import full, detailed data. The Power Query Editor makes it easy to pre-aggregate data during import. Technically, it's possible to import exactly the aggregate data you need for each visual. While DirectQuery is the simplest approach to large data, importing aggregate data might offer a solution if the underlying data source is too slow for DirectQuery.
These details relate to using Power BI alone. For more information about using large models in Power BI, see [large semantic models in Power BI Premium](../enterprise/service-premium-large-models)
. There's no restriction on how frequently the data can be refreshed.
### The underlying source defines security rules
When you import data, Power BI connects to the data source by using the current user's Power BI Desktop credentials, or the credentials configured for scheduled refresh from the Power BI service. In publishing and sharing reports that have imported data, you must be careful to share only with users allowed to see the data, or you must define row-level security as part of the semantic model.
DirectQuery lets a report viewer's credentials pass through to the underlying source, which applies security rules. DirectQuery supports single sign-on (SSO) to Azure SQL data sources, and through a data gateway to on-premises SQL servers. For more information, see [Overview of single sign-on (SSO) for on-premises data gateways in Power BI](service-gateway-sso-overview)
.
### Data sovereignty restrictions apply
Some organizations have policies around data sovereignty, meaning that data can't leave the organization premises. This data presents issues for solutions based on data import. With DirectQuery, the data remains in the underlying source location. However, even with DirectQuery, the Power BI service keeps some caches of data at the visual level, because of scheduled refresh of tiles.
### The underlying data source uses measures
An underlying data source such as SAP HANA or SAP BW contains _measures_. Measures mean that imported data is already at a certain level of aggregation, as defined by the query. A visual that asks for data at a higher-level aggregate, such as **TotalSales** by **Year**, further aggregates the aggregate value. This aggregation is fine for additive measures, such as **Sum** and **Min**, but can be an issue for non-additive measures, such as **Average** and **DistinctCount**.
Easily getting the correct aggregate data needed for a visual directly from the source requires sending queries per visual, as in DirectQuery. When you connect to SAP BW, choosing DirectQuery allows this treatment of measures. For more information, see [DirectQuery and SAP BW](desktop-directquery-sap-bw)
.
Currently DirectQuery over SAP HANA treats data the same as a relational source, and produces behavior similar to import. For more information, see [DirectQuery and SAP HANA](desktop-directquery-sap-hana)
.
DirectQuery limitations
-----------------------
Using DirectQuery has some potentially negative implications. Some of these limitations differ slightly depending on the exact source you use. The following sections list general implications of using DirectQuery, and limitations related to performance, security, transformations, modeling, and reporting.
### General implications
Some general implications and limitations of using DirectQuery follow:
* **If data changes, you must refresh to show the latest data.** Given the use of caches, there's no guarantee that visuals always show the latest data. For example, a visual might show transactions in the past day. A slicer change might refresh the visual to show transactions for the past two days, including recent, newly arrived transactions. But returning the slicer to its original value could result in it again showing the cached previous value. Select **Refresh** to clear any caches and refresh all the visuals on the page to show the latest data.
* **If data changes, there's no guarantee of consistency between visuals.** Different visuals, whether on the same page or on different pages, might be refreshed at different times. If the data in the underlying source is changing, there's no guarantee that each visual shows the data at the same point in time.
Given that more than one query might be required for a single visual, for example to obtain the details and the totals, even consistency within a single visual isn't guaranteed. To guarantee this consistency would require the overhead of refreshing all visuals whenever any visual refreshed, along with using costly features like snapshot isolation in the underlying data source.
You can mitigate this issue to a large extent by selecting **Refresh** to refresh all of the visuals on the page. Even for Import mode, there's a similar problem of maintaining consistency when you import data from more than one table.
* **You must refresh in Power BI Desktop to reflect schema changes.** After a report is published, **Refresh** in the Power BI service refreshes the visuals in the report. But if the underlying source schema changes, the Power BI service doesn't automatically update the available fields list. If tables or columns are removed from the underlying source, it might result in query failure upon refresh. To update the fields in the model to reflect the changes, you must open the report in Power BI Desktop and choose **Refresh**.
* **A limit of 1 million rows can return on any query.** There's a fixed limit of 1 million rows that can return in any single query to the underlying source. This limit generally has no practical implications, and visuals won't display that many points. However, the limit can occur in cases where Power BI doesn't fully optimize the queries sent, and requests some intermediate result that exceeds the limit.
The limit can also occur while building a visual, on the path to a more reasonable final state. For example, including **Customer** and **TotalSalesQuantity** could hit this limit if there are more than 1 million customers, until you apply some filter. The error that returns is: **The resultset of a query to external data source has exceeded the maximum allowed size of '1000000' rows.**
Note
Premium capacities let you exceed the one million-row limit. For more information, see [Max Intermediate Row Set Count](../enterprise/service-admin-premium-workloads#max-intermediate-row-set-count)
.
* **You can't change a model from import to DirectQuery mode.** You can switch a model from DirectQuery mode to Import mode if you import all the necessary data. It's not possible to switch back to DirectQuery mode, primarily because of the feature set that DirectQuery mode doesn't support. For multidimensional sources like SAP BW, you can't switch from DirectQuery to Import mode either, because of the different treatment of external measures.
### Performance and load implications
When you use DirectQuery, the overall experience depends on the performance of the underlying data source. If refreshing each visual, for example after changing a slicer value, takes less than five seconds, the experience is reasonable, although it might feel sluggish compared to the immediate response with imported data. If the slowness of the source causes individual visuals to take longer than tens of seconds to refresh, the experience becomes unreasonably poor. Queries might even time out.
Along with the performance of the underlying source, the load placed on the source also impacts performance. Each user who opens a shared report, and each dashboard tile that refreshes, sends at least one query per visual to the underlying source. The source must be able to handle such a query load while maintaining reasonable performance.
### Security implications
Unless the underlying data source uses SSO, a DirectQuery report always uses the same fixed credentials to connect to the source once it's published to the Power BI service. Immediately after you publish a DirectQuery report, you must configure the credentials of the user to use. Until you configure the credentials, trying to open the report in the Power BI service results in an error.
Once you provide the user credentials, Power BI uses those credentials for whoever opens the report, the same as for imported data. Every user sees the same data, unless row-level security is defined as part of the report. You must pay the same attention to sharing the report as for imported data, even if there are security rules defined in the underlying source.
* Connecting to Power BI semantic models and Analysis Services in DirectQuery mode always uses SSO, so the security is similar to live connections to Analysis Services.
* Alternate credentials aren't supported when making DirectQuery connections to SQL Server from Power BI Desktop. You can use your current Windows credentials or database credentials.
* You can use multiple data sources in a DirectQuery model by using [composite models](../transform-model/desktop-composite-models)
. When you use multiple data sources, it's important to understand the [security implications](../transform-model/desktop-composite-models#security-implications)
of how data moves back and forth between the underlying data sources.
### Data transformation limitations
DirectQuery limits the data transformations you can apply within Power Query Editor. With imported data, you can easily apply a sophisticated set of transformations to clean and reshape the data before using it to create visuals. For example, you can parse JSON documents, or pivot data from a column to a row form. These transformations are more limited in DirectQuery.
When you connect to an online analytical processing (OLAP) source like SAP BW, you can't define any transformations, and the entire external model is taken from the source. For relational sources like SQL Server, you can still define a set of transformations per query, but those transformations are limited for performance reasons.
Any transformations must be applied on every query to the underlying source, rather than once on data refresh. Transformations must be able to reasonably translate into a single native query. If you use a transformation that's too complex, you get an error saying that either it must be deleted or the connection model must be switched to import.
Also, the **Get Data** dialog or Power Query Editor use subselects within the queries they generate and send to retrieve data for a visual. Queries defined in Power Query Editor must be valid within this context. In particular, it's not possible to use a query with common table expressions, nor one that invokes stored procedures.
### Modeling limitations
The term _modeling_ in this context means the act of refining and enriching raw data as part of authoring a report using the data. Examples of modeling include:
* Defining relationships between tables.
* Adding new calculations, like calculated columns and measures.
* Renaming and hiding columns and measures.
* Defining hierarchies.
* Defining column formatting, default summarization, and sort order.
* Grouping or clustering values.
You can still make many of these model enrichments when you use DirectQuery, and use the principle of enriching the raw data to improve later consumption. However, some modeling capabilities aren't available or are limited with DirectQuery. The limitations are applied to avoid performance issues.
The following limitations are common to all DirectQuery sources. More limitations might apply to individual sources.
* **No built-in date hierarchy:** With imported data, every date/datetime column also has a built-in date hierarchy available by default. For example, if you import a table of sales orders that includes a column **OrderDate**, and you use **OrderDate** in a visual, you can choose the appropriate date level to use, such as year, month, or day. This built-in date hierarchy isn't available with DirectQuery. If there's a **Date** table available in the underlying source, as is common in many data warehouses, you can use the Data Analysis Expressions (DAX) time-intelligence functions as usual.
* **Date/time support only to the seconds level:** For semantic models that use time columns, Power BI issues queries to the underlying DirectQuery source only up to the seconds detail level, not milliseconds. Remove milliseconds data from your source columns.
* **Limitations in calculated columns:** Calculated columns can only be intra-row, that is they can refer only to values of other columns of the same table, without using any aggregate functions. Also, the allowed DAX scalar functions, such as `LEFT()`, are limited to those functions that can be pushed to the underlying source. The functions vary depending upon the exact capabilities of the source. Functions that aren't supported aren't listed in autocomplete when authoring the DAX query for a calculated column, and result in an error if used.
* **No support for parent-child DAX functions:** When in DirectQuery mode, it's not possible to use the family of `DAX PATH()` functions that usually handle parent-child structures, such as charts of accounts or employee hierarchies.
* **No clustering:** When you use DirectQuery, you can't use the clustering capability to automatically find groups.
### Reporting limitations
Almost all reporting capabilities are supported for DirectQuery models. As long as the underlying source offers a suitable level of performance, you can use the same set of visualizations as for imported data.
One general limitation is that the maximum length of data in a text column for DirectQuery semantic models is 32,764 characters. Reporting on longer texts results in an error.
The following Power BI reporting capabilities can cause performance issues in DirectQuery-based reports:
* **Measure filters:** Visuals that use measures or aggregates of columns can contain filters in those measures. For example, the following graphic shows **SalesAmount** by **Category**, but only for categories with more than **20M** of sales.

This approach causes two queries to be sent to the underlying source:
* The first query retrieves the categories that meet the condition **SalesAmount** greater than 20 million.
* The second query retrieves the necessary data for the visual, which includes the categories that met the `WHERE` condition.
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 if there are more than a million categories.
* **TopN filters:** You can define advanced filters to filter on only the top or bottom `N` values ranked by some measure. For example, filters can include the top 10 categories. This approach again sends two queries to the underlying source. However, the first query returns 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 one million-row limit on query results.
* **Median:** Any aggregation, such as `Sum` or `Count Distinct`, is pushed to the underlying source. However, the `median` aggregate isn't usually supported by the underlying source. For `median`, the detail data is retrieved from the underlying source, and the median is calculated from the returned results. This approach is reasonable for calculating the median over a relatively small number of results.
Performance issues or query failures can arise if the cardinality is large because of the one million-row limit. For example, querying for **Median Country/Region Population** might be reasonable, but **Median Sales Price** might not be reasonable.
* **Advanced text filters like 'contains':** Advanced filtering on a text column allows filters like `contains` and `begins with`. These filters can result in degraded performance for some data sources. In particular, don't use the default `contains` filter if you need 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 making a single selection. Allowing multi-selection in filters can cause performance issues. For example, if the user selects 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.
* **Totals on table visuals:** By default, tables and matrices display totals and subtotals. In many cases, getting the values for such totals requires sending separate queries to the underlying source. This requirement applies whenever you use `DistinctCount` aggregation, or in all cases that use DirectQuery over SAP BW or SAP HANA. You can switch off such totals by using the **Format** pane.
DirectQuery recommendations
---------------------------
This section provides high-level guidance on how to successfully use DirectQuery, given its implications.
### Underlying data source performance
Validate that simple visuals refresh within five seconds, providing a reasonable interactive experience. If visuals take longer than 30 seconds to refresh, it's likely that further issues following report publication will make the solution unworkable.
If queries are slow, examine the queries sent to the underlying source, and the reason for the slow performance. For more information, see [Performance diagnostics](#performance-diagnostics)
.
This article doesn't cover the wide range of database optimization recommendations across the full set of potential underlying sources. The following standard database practices apply to most situations:
* For better performance, base relationships on integer columns rather than joining columns of other data types.
* Create the appropriate indexes. Index creation generally means using column store indexes in sources that support them, for example SQL Server.
* Update any necessary statistics in the source.
### Model design
When you define the model, follow this guidance:
* **Avoid complex queries in Power Query Editor.** Power Query Editor translates a complex query into a single SQL query. The single query appears in the subselect of every query sent to that table. If that query is complex, it might result in performance issues on every query sent. You can get the actual SQL query for a set of steps by right-clicking the last step under **Applied steps** in Power Query Editor and choosing **View Native Query**.
* **Keep measures simple.** At least initially, limit measures to simple aggregates. If the measures operate in a satisfactory manner, you can define more complex measures, but pay attention to performance.
* **Avoid relationships on calculated columns.** In databases where you need to do multi-column joins, Power BI doesn't allow basing relationships on multiple columns as the primary key or foreign key. The common workaround is to concatenate the columns by using a calculated column, and base the join on that column.
This workaround is reasonable for imported data, but for DirectQuery it results in a join on an expression. That result usually prevents using any indexes, and leads to poor performance. The only workaround is to actually materialize the multiple columns into a single column in the underlying data source.
* **Avoid relationships on 'uniqueidentifier' columns.** Power BI doesn't natively support a `uniqueidentifier` datatype. Defining a relationship between `uniqueidentifier` columns results in a query with a join that involves a cast. Again, this approach commonly leads to poor performance. The only workaround is to materialize columns of an alternative type in the underlying data source.
* **Hide the 'to' column on relationships.** The `to` column on relationships is commonly the primary key on the `to` table. That column should be hidden, but if hidden, it doesn't appear in the fields list and can't be used in visuals. Often the columns on which relationships are based are actually _system columns_, for example surrogate keys in a data warehouse. It's still best to hide such columns.
If the column has meaning, introduce a calculated column that's visible and that has a simple expression of being equal to the primary key, for example:
ProductKey_PK (Destination of a relationship, hidden)
ProductKey (= [ProductKey_PK], visible)
ProductName
...
* **Examine all calculated columns and data type changes.** You can use calculated tables when you use DirectQuery with [composite models](../transform-model/desktop-composite-models#calculated-tables)
. These capabilities aren't necessarily harmful, but they result in queries that contain expressions rather than simple references to columns. Those queries might result in indexes not being used.
* **Avoid bidirectional cross filtering on relationships.** Using bidirectional cross filtering can lead to query statements that don't perform well. For more information about bidirectional cross filtering, see [Enable bidirectional cross filtering for DirectQuery in Power BI Desktop](../transform-model/desktop-bidirectional-filtering)
, or download the [Bidirectional cross-filtering](https://download.microsoft.com/download/2/7/8/2782DF95-3E0D-40CD-BFC8-749A2882E109/Bidirectional%20cross-filtering%20in%20Analysis%20Services%202016%20and%20Power%20BI.docx)
white paper. The examples in the paper are for SQL Server Analysis Services, but the fundamental points also apply to Power BI.
* **Experiment with setting _Assume referential integrity_.** The **Assume referential integrity** setting on relationships enables queries to use `INNER JOIN` rather than `OUTER JOIN` statements. This guidance generally improves query performance, although it depends on the specifics of the data source.
* **Don't use the relative date filtering in Power Query Editor.** It's possible to define relative date filtering in Power Query Editor. For example, you can filter to the rows where the date is in the last 14 days.

However, this filter translates into a filter based on a fixed date, such as the time the query was authored, as you can see in the native query.

This data is probably not what you want. To ensure the filter is applied based on the date at the time the report runs, apply the date filter in the report. You can create a calculated column that calculates the number of days ago by using the `DAX DATE()` function, and use that calculated column in the filter.
### Report design
When you create a report that uses a DirectQuery connection, follow this guidance:
* **Consider using query reduction options:** Power BI provides report options to send fewer queries, and to disable certain interactions that cause a poor experience if the resulting queries take a long time to run. These options apply when you interact with your report in Power BI Desktop, and also apply when users consume the report in the Power BI service.
To access these options in Power BI Desktop, go to **File** > **Options and settings** > **Options** and select **Query reduction**.

Selections on the **Query reduction** screen let you show an **Apply** button for slicers or filter selections. No queries are sent until you select the **Apply** button on the filter or slicer. The queries then use your selections to filter the data. This button lets you make several slicer and filter selections before you apply them.
* **Apply filters first:** Always apply any applicable filters at the start of building a visual. For example, rather than drag in **TotalSalesAmount** and **ProductName**, and then filter to a particular year, apply the filter on **Year** at the beginning.
Each step of building a visual sends a query. Although it's possible to make another change before the first query completes, this approach still leaves unnecessary load on the underlying source. Applying filters early generally makes those intermediate queries less costly. Failing to apply filters early can result in hitting the one 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 the visuals on the page refresh. There's a limit on the number of parallel queries. As the number of visuals increases, some visuals refresh serially, which increases the time it takes to refresh the page. Therefore, it's best to 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, if you select **1999** on the pie chart, the column chart is cross highlighted to show the sales by category for **1999**.

Cross filtering and cross highlighting in DirectQuery require queries to be submitted to the underlying source. You should switch off this interaction if the time taken to respond to users' selections is unreasonably long.
You can use the **Query reduction** settings to disable cross highlighting throughout your report, or on a case-by-case basis. For more information, see [How visuals cross filter each other in a Power BI report](../consumer/end-user-interactions)
.
### Maximum number of connections
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. To change the maximum number for the current file in Power BI Desktop, go to **File** > **Options and Settings** > **Options**, and select **DirectQuery** in the **Current File** section of the left pane.

The setting is enabled only 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 that report.
Increasing **Maximum connections per data source** allows sending more queries, up to the maximum number specified, 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. A higher limit results in more load on the underlying source, so the setting isn't guaranteed to improve overall performance.
Once you publish a report to the Power BI service, the maximum number of concurrent queries also depends on fixed limits set on the target environment where the report is published. Power BI, Power BI Premium, and Power BI Report Server impose different limits. The table below lists the upper limits of the active connections per data source for each Power BI environment. These limits apply to cloud data sources and on-premises data sources such as SQL Server, Oracle, and Teradata.
| Environment | Upper limit per data source |
| --- | --- |
| Power BI Pro | 10 active connections |
| Power BI Premium | Depends on [semantic model SKU limitation](../enterprise/service-premium-what-is#semantic-model-sku-limitation) |
| Power BI Report Server | 10 active connections |
Note
The maximum number of DirectQuery connections setting applies to all DirectQuery sources when you enable [enhanced metadata](desktop-enhanced-dataset-metadata)
, which is the default setting for all models created in Power BI Desktop.
DirectQuery in the Power BI service
-----------------------------------
All DirectQuery data sources are supported from Power BI Desktop, and some sources are also available directly from within the Power BI service. A business user can use Power BI to connect to their data in Salesforce, for example, and immediately get a dashboard, without using Power BI Desktop.
Only the following two DirectQuery-enabled sources are available directly in the Power BI service:
* Spark
* Azure Synapse Analytics (formerly SQL Data Warehouse)
Even for these two sources, it's still best to start DirectQuery use within Power BI Desktop. While it's easy to initially make the connection in the Power BI service, there are limitations on further enhancing the resulting report. For example, in the service it's not possible to create any calculations, or use many analytical features, or refresh the metadata to reflect changes to the underlying schema.
The performance of a DirectQuery report in the Power BI service depends on the degree of load placed on the underlying data source. The load depends on:
* The number of users that share the report and dashboard.
* The complexity of the report.
* Whether the report defines row-level security.
### Report behavior in the Power BI service
When you open a report in the Power BI service, all the visuals on the currently visible page refresh. Each visual requires at least one query to the underlying data source. Some visuals might require more than one query. For example, a visual might show aggregate values from two different fact tables, or contain a more complex measure, or contain totals of a non-additive measure like **Count Distinct**. Moving to a new page refreshes those visuals. Refreshing sends a new set of queries to the underlying source.
Every user interaction on the report might result in visuals being refreshed. For example, selecting a different value on a slicer requires sending a new set of queries to refresh all of the affected visuals. The same is true for selecting a visual to cross highlight other visuals, or changing a filter. Similarly, creating or editing a report requires queries to be sent for each step on the path to produce the final visual.
There's some caching of results. The refresh of a visual is instantaneous if the exact same results were recently obtained. If row-level security is defined, these caches aren't shared across users.
Using DirectQuery imposes some important limitations in some of the capabilities the Power BI service offers for published reports:
* **Quick insights aren't supported:** Power BI quick insights search different subsets of your semantic model while applying a set of sophisticated algorithms to discover potentially interesting insights. Because quick insights require high-performance queries, this feature isn't available on semantic models that use DirectQuery.
* **Using Explore in Excel results in poor performance:** You can explore a semantic model by using the **Explore in Excel** capability, which lets you create pivot tables and pivot charts in Excel. This capability is supported for semantic models that use DirectQuery, but performance is slower than creating visuals in Power BI. If using Excel is important for your scenarios, account for this issue in deciding whether to use DirectQuery.
* **Excel doesn't show hierarchies:** For example, when you use [Analyze in Excel](../collaborate-share/service-analyze-in-excel)
, Excel doesn't show any hierarchies defined in Azure Analysis Services models or Power BI semantic models that use DirectQuery.
### Dashboard refresh
In the Power BI service, you can pin individual visuals or entire pages to dashboards as tiles. Tiles that are based on DirectQuery semantic models refresh automatically by sending queries to the underlying data sources on a schedule. By default, semantic models refresh every hour, but you can configure the refresh schedule intervals between weekly and every 15 minutes as part of the semantic model settings.
If no [row-level security](/en-us/fabric/security/service-admin-row-level-security)
is defined in the model, each tile is refreshed once, and the results are shared across all users. If you use row-level security, each tile requires separate queries per user to be sent to the underlying source.
There can be a large multiplier effect. A dashboard with 10 tiles, shared with 100 users, created on a semantic model using DirectQuery with row-level security, results in at least 1,000 queries being sent to the underlying data source for every refresh. Give careful consideration to the use of row-level security and the configuration of the refresh schedule.
### Query timeouts
A timeout of four minutes applies to individual queries in the Power BI service. Queries that take longer than four minutes fail. This limit is intended to prevent issues caused by overly long execution times. You should use DirectQuery only for sources that can provide interactive query performance.
When the timeout limit is reached, visuals fail to load with the following error: `The query has exceeded the available resources. Try filtering to decrease the amount of data requested. The XML for Analysis request timed out before it was completed. Timeout value: 225 sec`.
Performance diagnostics
-----------------------
This section describes how to diagnose performance issues, or how to get more detailed information to optimize your reports.
Start diagnosing 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 Power BI Desktop environment.
This approach initially eliminates certain components, such as the Power BI gateway. If the performance issues don't occur in Power BI Desktop, you can investigate the specifics of the report in the Power BI service.
The Power BI Desktop [Performance analyzer](../create-reports/desktop-performance-analyzer)
is a useful tool for identifying issues. Try to isolate any issues to one visual, rather than many visuals on a page. If a single visual on a Power BI Desktop page is sluggish, use the **Performance analyzer** to analyze the queries that Power BI Desktop sends to the underlying source.
You can also view traces and diagnostic information that some underlying data sources emit. Even if there are no traces from the source, the trace file might contain useful details of how a query runs and how you can improve it. You can use the following process to view the queries Power BI sends and their execution times.
### Use SQL Server Profiler to see queries
By default, Power BI Desktop logs events during a given session to a trace file called _FlightRecorderCurrent.trc_. The trace file is in the Power BI Desktop folder for the current user, in a folder called _AnalysisServicesWorkspaces_.
For some DirectQuery sources, this trace file includes all queries sent to the underlying data source. The following data sources send queries to the log:
* SQL Server
* Azure SQL Database
* Azure Synapse Analytics (formerly SQL Data Warehouse)
* Oracle
* Teradata
* SAP HANA
You can read the trace files by using the _SQL Server Profiler_, part of the free download [SQL Server Management Studio](/en-us/sql/ssms/download-sql-server-management-studio-ssms)
.

To open the trace file for the current session:
1. During a Power BI Desktop session, select **File** > **Options and settings** > **Options**, and then select **Diagnostics**.
2. Under **Crash Dump Collection**, select **Open crash dump/traces folder**.

The _Power BI Desktop\\Traces_ folder opens.
3. Navigate to the parent folder and then to the _AnalysisServicesWorkspaces_ folder, which contains one workspace folder for every open instance of Power BI Desktop. These folders are named with an integer suffix, such as _AnalysisServicesWorkspace2058279583_. The workspace folder is deleted when the associated Power BI Desktop session ends.
Inside the workspace folder for the current Power BI session, the _\\Data_ folder contains the _FlightRecorderCurrent.trc_ trace file. Make a note of the location.
4. Open SQL Server Profiler and select **File** > **Open** > **Trace File**.
5. Navigate to or enter the path to the trace file for the current Power BI session and open _FlightRecorderCurrent.trc_.
SQL Server Profiler displays all events from the current session. The following screenshot highlights a group of events for a query. Each query group has the following events:
* A `Query Begin` and `Query End` event, which represent the start and end of a DAX query generated by changing a visual or filter in the Power BI UI, or from filtering or transforming data in the Power Query Editor.
* One or more pairs of `DirectQuery Begin` and `DirectQuery End` events, which represent queries sent to the underlying data source as part of evaluating the DAX query.
[](media/desktop-directquery-about/directquery-about_08.png#lightbox)
Multiple DAX queries can run in parallel, so events from different groups can be interleaved. You can use the `ActivityID` value to determine which events belong to the same group.
The following columns are also of interest:
* **TextData:** The textual detail of the event. For `Query Begin` and `Query End` events, the detail is the DAX query. For `DirectQuery Begin` and `DirectQuery End` events, the detail is the SQL query sent to the underlying source. The **TextData** for the currently selected event also appears in the pane at the bottom of the screen.
* **EndTime:** The time when the event completed.
* **Duration:** The duration, in milliseconds, it took to run the DAX or SQL query.
* **Error:** Whether an error occurred, in which case the event also displays in red.
To capture a trace to help diagnose a potential performance issue:
1. Open a single Power BI Desktop session, to avoid the confusion of multiple workspace folders.
2. Do the set of actions of interest in Power BI Desktop. Include a few more actions, to ensure that the events of interest are flushed into the trace file.
3. Open SQL Server Profiler and examine the trace. Remember that closing Power BI Desktop deletes the trace file. Also, further actions in Power BI Desktop don't immediately appear. You must close and reopen the trace file to see new events.
Keep individual sessions reasonably small, perhaps 10 seconds of actions, not hundreds. This approach makes it easier to interpret the trace file. There's also a limit on the size of the trace file. For long sessions, there's a chance of early events being dropped.
### Understand the format of queries
The general format of Power BI Desktop queries uses subselects for each table they reference. The Power Query Editor query defines the subselect queries. For example, assume you have the following [TPC-DS](https://www.tpc.org/tpcds/default5.asp)
tables in SQL Server:

Running the following query:
SalesAmount (SUMX(Web_Sales, [ws_sales_price]*[ws_quantity]))
by Item[i_category]
for Date_dim[d_year] = 2000
Results in the following visual in Power BI:

Refreshing that visual produces the SQL query in the following image. There are three subselect queries for `Web_Sales`, `Item`, and `Date_dim`, which each return all the columns on the respective table, even though the visual references only four columns.

Power Query Editor defines the exact subselect queries. This use of subselect queries hasn't been shown to affect performance for the data sources DirectQuery supports. Data sources like SQL Server optimize away the references to the other columns.
Power BI uses this pattern because the analyst provides the SQL query directly. Power BI uses the query as provided, without any attempt to rewrite it.
Related content
---------------
For more information about DirectQuery in Power BI, see:
* [Use DirectQuery in Power BI Desktop](desktop-use-directquery)
This article described aspects of DirectQuery that are common across all data sources. See the following articles for details about specific sources:
* [DirectQuery and SAP HANA](desktop-directquery-sap-hana)
* [DirectQuery and SAP BW](desktop-directquery-sap-bw)
* [Use DirectQuery for Power BI semantic models and Analysis Services](desktop-directquery-datasets-azure-analysis-services)
* * *
Feedback
--------
Was this page helpful?
Yes No
[Provide product feedback](https://ideas.fabric.microsoft.com/?forum=2d80fd4a-16cb-4189-896b-e0dac5e08b41)
| [Ask the community](https://community.fabric.microsoft.com/powerbi)
* * *
Additional resources
--------------------
---
# Configure incremental refresh for Power BI semantic models - Power BI | Microsoft Learn
Table of contents Exit focus mode
Ask Learn Ask Learn [Read in English](# "Read in English")
Save[](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/incremental-refresh-configure.md "Edit This Document")
Table of contents [Read in English](# "Read in English")
Add Add to plan [Edit](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/incremental-refresh-configure.md "Edit This Document")
* * *
#### Share via
[Facebook](#)
[x.com](#)
[LinkedIn](#)
[Email](#)
* * *
Print
* * *
Note
Access to this page requires authorization. You can try [signing in](#)
or changing directories.
Access to this page requires authorization. You can try changing directories.
Configure incremental refresh and real-time data
================================================
* Article
* 2024-12-03
* 8 contributors
Feedback
This article describes how to configure incremental refresh and real-time data for **semantic models**. To learn about configuring incremental refresh for dataflows, see [Premium features of dataflows - Incremental refresh](../transform-model/dataflows/dataflows-premium-features#incremental-refresh)
.
Configuring incremental refresh includes creating RangeStart and RangeEnd parameters, applying filters, and defining an incremental refresh policy. After publishing to the Power BI service, you'll perform an initial refresh operation on the model. The initial refresh operation and subsequent refresh operations apply the incremental refresh policy you defined. Before completing these steps, be sure you fully understand the functionality described in [Incremental refresh and real-time data for semantic models](incremental-refresh-overview)
.
Create parameters
-----------------
In this task, you'll use Power Query Editor to create RangeStart and RangeEnd parameters with default values. The default values apply only when filtering the data to be loaded into the model in Power BI Desktop. The values you enter should include only a small amount of the most recent data from your data source. When published to the service, the incremental refresh policy overrides these time range values. That is, the policy creates windows of incoming data, one after another.
1. In Power BI Desktop, select **Transform data** on the **Home** ribbon to open Power Query Editor.
2. Select the **Manage Parameters** dropdown and then choose **New Parameter**.
3. In the **Name** field, enter _RangeStart_ (case-sensitive). In the **Type** field, select **Date/Time** from the dropdown. In the **Current Value** field, enter a start date and time value.

4. Select **New** to create a second parameter named _RangeEnd_. In the **Type** field, select **Date/Time**, and then in the **Current Value** field enter an end date and time value. Select **OK**.

Now that you've defined the RangeStart and RangeEnd parameters, you'll filter the data to be loaded into the model based on those parameters.
Filter data
-----------
Note
Before continuing with this task, verify your source table has a date column of Date/Time data type. If it doesn’t have a Date/Time column, but it has a date column of integer surrogate keys in the form of `yyyymmdd`, follow the steps in [**Convert DateTime to integer**](#convert-datetime-to-integer)
later in this article to create a function that converts the date/time value in the parameters to match the integer surrogate key of the source table.
You'll now apply a filter based on _conditions_ in the RangeStart and RangeEnd parameters.
1. In Power Query Editor, select the date column you want to filter on, and then choose the dropdown arrow > **Date Filters** > **Custom Filter**.
2. In **Filter Rows**, to specify the first condition, select **is after** or **is after or equal to**, then choose **Parameter**, and then choose **RangeStart**.
To specify the second condition, if you selected **is after** in the first condition, then choose **is before or equal to**, or if you selected **is after or equal to** in the first condition, then choose **is before** for the second condition, then choose **Parameter**, and then choose **RangeEnd**.

**Important:** Verify queries have an equal to (=) on either RangeStart 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, `= Table.SelectRows(#"Changed Type", each [OrderDate] >= RangeStart and [OrderDate] <= RangeEnd)` could result in duplicate data if there's an OrderDate that equals both RangeStart and RangeEnd.
Select **OK** to close.
3. On the **Home** ribbon in Power Query Editor, select **Close & Apply**. Power Query loads data based on the filters defined by the RangeStart and RangeEnd parameters, and any other filters you've defined.
Power Query loads only data specified between the RangeStart and RangeEnd parameters. Depending on the amount of data in that period, the table should load quickly. If it seems slow and process-intensive, it's likely [the query isn't folding](incremental-refresh-troubleshoot)
.
Define policy
-------------
After you've defined RangeStart and RangeEnd parameters, and filtered data based on those parameters, you'll define an incremental refresh policy. This policy is applied only after the model is published to the service, and a manual or scheduled refresh operation is performed.
1. In the Table view, right-click a table in the **Data pane** and select **Incremental refresh**.

2. In **Incremental refresh and real-time data** > **Select table**, verify or select the table. The default value of the **Select table** listbox is the table you selected in the Table view.
3. Specify required settings:
In **Set import and refresh ranges** > **Incrementally refresh this table** move the slider to **On**. If the slider is disabled, it means the Power Query expression for the table doesn't include a filter based on the RangeStart and RangeEnd parameters.
In **Archive data starting**, specify the historical _store_ period you want to include in the model. All rows with dates in this period will be loaded into the model in the service, unless other filters apply.
In **Incrementally refresh data starting**, specify the _refresh_ period. All rows with dates in this period will be refreshed in the model each time a manual or scheduled refresh operation is performed by the Power BI service.
4. Specify optional settings:
In **Choose optional settings**, select **Get the latest data in real time with DirectQuery (Premium only)** to include the latest data changes that occurred at the data source after the last refresh period. This setting causes the incremental refresh policy to add a DirectQuery partition to the table.
Select **Only refresh complete days** to refresh only whole days. If the refresh operation detects a day isn't complete, rows for that whole day aren't refreshed. This option is automatically enabled when you select **Get the latest data in real time with DirectQuery (Premium only)**.
Select **Detect data changes** to specify a date/time column used to identify and refresh only the days where the data has changed. A date/time column must exist, usually for auditing purposes, at the data source. This column **should not be the same column** used to partition the data with the RangeStart and RangeEnd parameters. The maximum value of this column is evaluated for each of the periods in the incremental range. If it hasn't changed since the last refresh, the current period isn't refreshed. For models published to Premium capacities, you can also specify a custom query. To learn more, see [Advanced incremental refresh - Custom queries for detect data changes](incremental-refresh-xmla#custom-queries-for-detect-data-changes)
.
Depending on your settings, your policy should look something like this:

5. Review your settings and then select **Apply** to complete the refresh policy. This step doesn't load data.
Save and publish to the service
-------------------------------
Now that your RangeStart and RangeEnd parameters, filtering, and refresh policy settings are complete, save your model, and then publish to the service. If your model becomes large, be sure to enable [large model storage format](../enterprise/service-premium-large-models)
_before_ invoking the first refresh in the service.
Refresh model
-------------
In the service, refresh the model. The first refresh loads both new and updated data in the refresh period as well as historical data for the entire store period. Depending on the amount of data, this refresh can take quite a while. Subsequent refreshes, whether manual or scheduled, are typically much faster because the incremental refresh policy is applied and only data for the period specified in the refresh policy setting is refreshed.
Convert DateTime to integer
---------------------------
This task is only required if your table uses integer surrogate keys instead of Date/Time values in the date column you use for the RangeStart and RangeEnd filter definition.
The data type of the RangeStart and RangeEnd parameters must be of date/time data type regardless of the data type of the date column. However, for many data sources, tables don't have a column of date/time data type but instead have a date column of integer surrogate keys in the form of `yyyymmdd`. You typically can't convert these integer surrogate keys to the Date/Time data type because the result would be a non-folding query expression, but you can create a function that converts the date/time value in the parameters to match the integer surrogate key of the data source table without losing foldability. The function is then called in a filter step. This conversion step is required if the data source table contains _only_ a surrogate key as integer data type.
1. On the **Home** ribbon in Power Query Editor, select the **New Source** dropdown and then choose **Blank Query**.
2. In **Query Settings**, enter a name, for example, DateKey, and then in the formula editor, enter the following formula:
`= (x as datetime) => Date.Year(x)*10000 + Date.Month(x)*100 + Date.Day(x)`

3. To test the formula, in **Enter Parameter**, enter a date/time value, and then select **Invoke**. If the formula is correct, an integer value for the date is returned. After verifying, delete this new **Invoked Function** query.
4. In **Queries**, select the table, and then edit the query formula to call the function with the RangeStart and RangeEnd parameters.
`= Table.SelectRows(#"Reordered Column OrderDateKey", each [OrderDateKey] > DateKey(RangeStart) and [OrderDateKey] <= DateKey(RangeEnd))`

Related content
---------------
* [Troubleshoot configuring incremental refresh](incremental-refresh-troubleshoot#configuring-in-power-bi-desktop)
* [Advanced incremental refresh with the XMLA endpoint](incremental-refresh-xmla)
* [Configure scheduled refresh](refresh-scheduled-refresh)
* * *
Feedback
--------
Was this page helpful?
Yes No
[Provide product feedback](https://ideas.fabric.microsoft.com/?forum=2d80fd4a-16cb-4189-896b-e0dac5e08b41)
| [Ask the community](https://community.fabric.microsoft.com/powerbi)
* * *
Additional resources
--------------------
---
# Get data from files for Power BI - Power BI | Microsoft Learn
Table of contents Exit focus mode
Ask Learn Ask Learn [Read in English](# "Read in English")
Save[](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-get-data-from-files.md "Edit This Document")
Table of contents [Read in English](# "Read in English")
Add Add to plan [Edit](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-get-data-from-files.md "Edit This Document")
* * *
#### Share via
[Facebook](#)
[x.com](#)
[LinkedIn](#)
[Email](#)
* * *
Print
* * *
Note
Access to this page requires authorization. You can try [signing in](#)
or changing directories.
Access to this page requires authorization. You can try changing directories.
Get data from files for Power BI
================================
* Article
* 2025-02-28
* 12 contributors
Feedback
In Power BI, you can connect to or import data and reports from these types of files:
* Microsoft Excel _.xlsx_ and _.xlsm_ files
* Power BI Desktop _.pbix_ report files
* Comma-separated value (CSV) _.csv_ files
What it means to get data from a file
-------------------------------------
In Power BI, the data you explore comes from a semantic model. To have a semantic model, you need some data. This article focuses on getting data from files.
To better understand the importance of semantic models and how to get data for them, consider an automobile. Sitting in your car and looking at the dashboard is like sitting in front of your computer looking at a dashboard in Power BI. The dashboard shows all the things your car is doing, like how fast the engine is revving, the temperature, what gear you’re in, and your speed.
In Power BI, a semantic model is like the engine in your car. The semantic model provides the data, metrics, and information that's displayed in your Power BI dashboard. Your engine, or semantic model, needs fuel, and data is the fuel in Power BI. Your car has a fuel tank that provides gas to the engine. Power BI also needs a fuel tank of data you can feed your semantic model. That fuel tank can be a Power BI Desktop file, Excel workbook file, or CSV file.
To take it one step further, a fuel tank in a car has to be filled with gas. The gas for a Power BI Desktop, Excel, or CSV file is data from a data source that you put into the Excel, Power BI Desktop, or CSV file. You can manually enter rows of data into an Excel workbook or CSV file, or you can connect to the external data source to query and load data into your file. After you have a file that contains some data, you can get the file into Power BI as a semantic model.
Note
When you import Excel data into Power BI, the data must be in a table or data model.
Where to save your file
-----------------------
Where you save your file makes a difference.
* **Local**. If you save your workbook file to a drive on your computer or another location in your organization, you can _import_ your file into Power BI. Your file remains on the source drive. When you import the file, Power BI creates a new semantic model in your site and loads your data, and in some cases your data model, into the semantic model. Any reports in your file appear in **My workspace** as **Reports**.
* **OneDrive for work or school**. If you have OneDrive for work or school, sign in with the same account that you use for Power BI. This method is the most effective way to keep your work in Excel, Power BI Desktop, or CSV files in sync with your Power BI semantic model, reports, and dashboards. Both Power BI and OneDrive are in the cloud, and Power BI connects to your file on OneDrive about once an hour. If Power BI finds any changes, it automatically updates your Power BI semantic model, reports, and dashboards.
Note
You can't upload files from personal OneDrive accounts, but you can upload files from your computer.
* **SharePoint team site**. Saving your Power BI Desktop files to a SharePoint team site is much like saving to OneDrive for work or school. The biggest difference is how you connect to the file from Power BI. You can specify a URL or connect to the root folder.
Note
You can't update semantic models imported from OneDrive for work or school from local files. For Power BI to update the semantic model, you must replace the file in OneDrive for work or school. Alternatively, you can delete the semantic model and its related items and then import again from a local file.
Related content
---------------
* [Get data from Excel workbook files](service-excel-workbook-files)
* [Get data from Power BI Desktop files](service-desktop-files)
* [Get data from comma-separated value (CSV) files](service-comma-separated-value-files)
* * *
Feedback
--------
Was this page helpful?
Yes No
[Provide product feedback](https://ideas.fabric.microsoft.com/?forum=2d80fd4a-16cb-4189-896b-e0dac5e08b41)
| [Ask the community](https://community.fabric.microsoft.com/powerbi)
* * *
Additional resources
--------------------
---
# Troubleshoot Power BI gateway (personal mode) - Power BI | Microsoft Learn
Table of contents Exit focus mode
Ask Learn Ask Learn [Read in English](# "Read in English")
Save[](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-admin-troubleshooting-power-bi-personal-gateway.md "Edit This Document")
Table of contents [Read in English](# "Read in English")
Add Add to plan [Edit](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-admin-troubleshooting-power-bi-personal-gateway.md "Edit This Document")
* * *
#### Share via
[Facebook](#)
[x.com](#)
[LinkedIn](#)
[Email](#)
* * *
Print
* * *
Note
Access to this page requires authorization. You can try [signing in](#)
or changing directories.
Access to this page requires authorization. You can try changing directories.
Troubleshoot Power BI gateway (personal mode)
=============================================
* Article
* 2024-05-28
* 9 contributors
Feedback
Note
We've split the on-premises data gateway docs into [content that's specific to Power BI](service-gateway-onprem)
and [general content that applies to all services](/en-us/data-integration/gateway/service-gateway-onprem)
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).
Update to the latest version
----------------------------
The current version of the gateway for personal use is the on-premises data gateway (personal mode). To use that version, update your installation.
Many issues can surface when the gateway version is out of date. It's a good general practice to make sure you're on the latest version. If the date of the last the gateway update is a month or longer, consider installing the latest version of the gateway. Then attempt to reproduce the issue.
Installation
------------
**Gateway (personal mode) operates on 64-bit versions:** If your computer 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 computer.
**Operation timed out:** This message is common if the computer, physical or virtual machine, on which you’re installing the gateway (personal mode) has a single core processor. Close any applications, turn off any nonessential processes, and try installing again.
**Data management gateway or Analysis Services connector can't be installed on the same computer as gateway (personal mode):** If you already have an Analysis Services connector 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](#SetupLogs)
.
**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](/en-us/data-integration/gateway/service-gateway-proxy)
.
Schedule refresh
----------------
**Error: The credential stored in the cloud is missing.**
You might get this error in settings for a 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 the Power BI service, 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 the Power BI service, 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: Unsupported 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 the Power BI service.
* The Excel workbook doesn't contain a data model, only worksheet data. The Power BI service 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\] /<…>/<…> 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 convert 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 filter out the row 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 supported for Access database:** The Power BI service 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:

You might still be on an older version of the gateway (personal mode).
**Solution:** For more information, see [Install the latest version of Power BI gateway (personal mode)](https://powerbi.microsoft.com/gateway/)
.
**Error: Sign-in error when you select Windows authentication for a data source using ACE OLEDB:** If you get the following error when you enter data source credentials for a data source using an ACE OLEDB provider:

The Power BI service 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](refresh-troubleshooting-tile-errors)
.
Tools for troubleshooting
-------------------------
### Refresh history
With **Refresh history**, you can see what errors occurred and find useful data if you need to create a support request. You can view both scheduled and on-demand refreshes. Here's how you get to **Refresh history**.
1. In the Power BI service navigation pane, in **Semantic models**, select a dataset. Open the **More options (...)** menu, and select **Schedule refresh**.

2. In **Settings for...**, select **Refresh history**.


### Event logs
Several event logs can provide information. The first two, **Data Management Gateway** and **PowerBIGateway**, are present if you're an admin on the machine. If you're not an admin, and you're using the data gateway (personal mode), the log entries within the **Application** log displays.
The **Data Management Gateway** and **PowerBIGateway** logs are present under **Application and Services Logs**.

### Fiddler trace
[Fiddler](https://www.telerik.com/fiddler)
is a free tool from Telerik that monitors HTTP traffic. You can see the communication with the Power BI service from the client machine. This communication might show errors and other related information.

### Setup logs
If the gateway (personal mode) fails to install, a link to show the setup log displays. The setup log can show you details about the failure. These logs are Windows Install logs, also known as Microsoft Software Installer (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.

Related content
---------------
* [Configure proxy settings for the on-premises data gateway](/en-us/data-integration/gateway/service-gateway-proxy)
* [Data refresh in Power BI](refresh-data)
* [Use personal gateways in Power BI](service-gateway-personal-mode)
* [Troubleshooting tile errors](refresh-troubleshooting-tile-errors)
* [Troubleshoot gateways - Power BI](service-gateway-onprem-tshoot)
More questions? Try asking the [Power BI Community](https://community.powerbi.com/)
.
* * *
Feedback
--------
Was this page helpful?
Yes No
[Provide product feedback](https://ideas.fabric.microsoft.com/?forum=2d80fd4a-16cb-4189-896b-e0dac5e08b41)
| [Ask the community](https://community.fabric.microsoft.com/powerbi)
* * *
Additional resources
--------------------
---
# Configure Kerberos-based SSO from Power BI service to on-premises data sources - Power BI | Microsoft Learn
Table of contents Exit focus mode
Ask Learn Ask Learn [Read in English](# "Read in English")
Save[](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-gateway-sso-kerberos.md "Edit This Document")
Table of contents [Read in English](# "Read in English")
Add Add to plan [Edit](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-gateway-sso-kerberos.md "Edit This Document")
* * *
#### Share via
[Facebook](#)
[x.com](#)
[LinkedIn](#)
[Email](#)
* * *
Print
* * *
Note
Access to this page requires authorization. You can try [signing in](#)
or changing directories.
Access to this page requires authorization. You can try changing directories.
Configure Kerberos-based SSO from Power BI service to on-premises data sources
==============================================================================
* Article
* 2024-01-23
* 17 contributors
Feedback
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](/en-us/windows-server/security/kerberos/kerberos-constrained-delegation-overview)
to enable seamless SSO connectivity.
This article describes the steps you need to take to configure Kerberos-based SSO from Power BI service to on-premises data sources.
Prerequisites
-------------
Several items must be configured for Kerberos constrained delegation to work properly, including \*Service Principal Names (SPN) and delegation settings on service accounts.
Note
Using DNS aliasing with SSO is not supported.
Configuration outline
---------------------
The steps required for configuring gateway single sign-on are outlined below.
1. Complete all the steps in [Section 1: Basic configuration](#section-1-basic-configuration)
.
2. Depending on your Active Directory environment and the data sources used, you may need to complete some or all of the configuration described in [Section 2: Environment-specific configuration](#section-2-environment-specific-configuration)
.
Possible scenarios that may require additional configuration are listed below:
| Scenario | Go to |
| --- | --- |
| Your Active Directory environment is security hardened. | [Add gateway service account to Windows Authorization and Access Group](#add-gateway-service-account-to-windows-authorization-and-access-group) |
| The gateway service account and the user accounts that the gateway will impersonate are in separate domains or forests. | [Add gateway service account to Windows Authorization and Access Group](#add-gateway-service-account-to-windows-authorization-and-access-group) |
| You don't have Microsoft Entra Connect with user account synchronization configured and the UPN used in the Power BI for users does not match the UPN in your local Active Directory environment. | [Set user-mapping configuration parameters on the gateway machine](#set-user-mapping-configuration-parameters-on-the-gateway-machine) |
| You plan to use an SAP HANA data source with SSO. | [Complete data source-specific configuration steps](#complete-data-source-specific-configuration-steps) |
| You plan to use an SAP BW data source with SSO. | [Complete data source-specific configuration steps](#complete-data-source-specific-configuration-steps) |
| You plan to use a Teradata data source with SSO. | [Complete data source-specific configuration steps](#complete-data-source-specific-configuration-steps) |
3. Validate your configuration as described in [Section 3: Validate configuration](#section-3-validate-configuration)
to ensure that SSO is set up correctly.
Section 1: Basic configuration
------------------------------
### Step 1: 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.
### Step 2: Obtain domain admin rights to configure SPNs (SetSPN) and Kerberos constrained delegation settings
To configure SPNs and Kerberos delegation settings, a domain administrator should avoid granting rights to someone that doesn't have domain admin rights. In the following section, we cover the recommended configuration steps in more detail.
### Step 3: Configure the Gateway service account
Option A below is the required configuration unless you have both Microsoft Entra Connect configured and user accounts are synchronized. In that case, option B is recommended.
#### Option A: Run the gateway Windows service as a domain account with SPN
In a standard installation, the gateway runs as the machine-local service account, **NT Service\\PBIEgwService**.

To enable Kerberos constrained delegation, the gateway must run as a domain account, unless your Microsoft Entra instance is already synchronized with your local Active Directory instance (by using Microsoft Entra DirSync/Connect). To switch to a domain account, see [change the gateway service account](/en-us/data-integration/gateway/service-gateway-service-account)
.
##### Configure an SPN for the gateway service account
First, determine whether an SPN was already created for the domain account used as the gateway service account:
1. As a domain administrator, launch the **Active Directory Users and Computers** Microsoft Management Console (MMC) snap-in.
2. In the left pane, right-click the domain name, select **Find**, and then enter the account name of the gateway service account.
3. In the search result, right-click the gateway service account and select **Properties**.
4. If the **Delegation** tab is visible on the **Properties** dialog, then an SPN was already created and you can skip to [Configure Kerberos constrained delegation](#step-4-configure-kerberos-constrained-delegation)
.
5. If there isn't a **Delegation** tab on the **Properties** dialog box, you can manually create an SPN on the account to enable it. Use the [setspn tool](/en-us/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/cc731241(v=ws.11))
that comes with Windows (you need domain admin rights to create the SPN).
For example, suppose the gateway service account is **Contoso\\GatewaySvc** and the gateway service is running on the machine named **MyGatewayMachine**. To set the SPN for the gateway service account, run the following command:
`setspn -S gateway/MyGatewayMachine Contoso\GatewaySvc`
You can also set the SPN by using the **Active Directory Users and Computers** MMC snap-in.
#### Option B: Configure computer for Microsoft Entra Connect
If Microsoft Entra Connect is configured and user accounts are synchronized, the gateway service doesn't need to perform local Microsoft Entra lookups at runtime. Instead, you can simply use the local service SID for the gateway service to complete all required configuration in Microsoft Entra ID. The Kerberos constrained delegation configuration steps outlined in this article are the same as the configuration steps required in the Microsoft Entra context. They are applied to the gateway's computer object (as identified by the local service SID) in Microsoft Entra ID instead of the domain account. The local service SID for NT SERVICE/PBIEgwService is as follows:
`S-1-5-80-1835761534-3291552707-3889884660-1303793167-3990676079`
To create the SPN for this SID against the Power BI Gateway computer, you would need to run the following command from an administrative command prompt (replace `` with the name of the Power BI Gateway computer):
`SetSPN -s HTTP/S-1-5-80-1835761534-3291552707-3889884660-1303793167-3990676079 `
Note
Depending on your local security settings, you may need to add the gateway service account, NT SERVICE\\PBIEgwService, to the local Administrators group on the gateway machine and then restart the gateway service in the [gateway app](/en-us/data-integration/gateway/service-gateway-app)
. This option is not supported for scenarios that have multiple gateways, as Active Directory enforces unique SPNs across an entire forest. For these scenarios, use [option A](service-gateway-sso-kerberos#option-a-run-the-gateway-windows-service-as-a-domain-account-with-spn)
instead.
### Step 4: Configure Kerberos constrained delegation
You can configure delegation settings for either standard Kerberos constrained delegation or resource-based Kerberos constrained delegation. For more information on the differences between the two approaches to delegation, see [Kerberos constrained delegation overview](/en-us/windows-server/security/kerberos/kerberos-constrained-delegation-overview)
.
The following service accounts are required:
* Gateway service account: Service user representing the gateway in Active Directory, with an SPN configured in Step 3.
* Data Source service account: Service user representing the data source in Active Directory, with an SPN mapped to the data source.
Note
The gateway and data source service accounts must be separate. The same service account cannot be used to represent both the gateway and data source.
Depending on which approach you want to use, proceed to one of the following sections. Don't complete both sections:
* [Option A: Standard Kerberos constrained delegation](#option-a-standard-kerberos-constrained-delegation)
. This is the default recommendation for most environments.
* [Option B: Resource-based Kerberos constrained delegation](#option-b-resource-based-kerberos-constrained-delegation)
. This is required if your data source belongs to a different domain than your gateway.
#### Option A: Standard 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 Directory 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 transition. 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](https://techcommunity.microsoft.com/t5/SQL-Server-Support/My-Kerberos-Checklist-8230/ba-p/316160)
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: **TestSQLServer**
* SQL Server data source service account: **Contoso\\SQLService**
Here's how to configure the delegation settings:
1. With domain administrator rights, open the **Active Directory Users and Computers** MMC snap-in.
2. Right-click the gateway service account (**Contoso\\GatewaySvc**), and select **Properties**.
3. Select the **Delegation** tab.
4. Select **Trust this computer for delegation to specified services only** > **Use any authentication protocol**.
5. Under **Services 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](#step-6-grant-the-gateway-service-account-local-policy-rights-on-the-gateway-machine)
.
#### Option B: Resource-based Kerberos constrained delegation
You use [resource-based Kerberos constrained delegation](/en-us/windows-server/security/kerberos/kerberos-constrained-delegation-overview#resource-based-constrained-delegation-across-domains)
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: **TestSQLServer**
* SQL Server data source service account: **ContosoBackEnd\\SQLService**
Complete the following configuration steps:
1. Use the **Active Directory 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 Directory 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 Directory Users and Computers**, create a group on the domain controller for the **ContosoBackEnd** domain. Add the **GatewaySvc** gateway service account to the **ResourceDelGroup** group.
To add users from a trusted domain, this group must have a scope of Domain local. 
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 Directory Users and Computers**, verify that the update is reflected in the **Attribute Editor** tab in the properties for the back-end service account.
### Step 5: Enable AES Encryption on Service Accounts
Apply the following settings to the gateway service account and **every** data source service account that the gateway can delegate to:
Note
If there are existing enctypes defined on the service accounts(s), consult with your Active Directory Administrator, because following the below steps will overwrite the existing enctypes values and may break clients.
1. With domain administrator rights, open the **Active Directory Users and Computers MMC** snap-in.
2. Right-click the gateway/data source service account and select **Properties**.
3. Select the **Account** tab.
4. Under **Account Options**, enable at least one (or both) of the following options. Note that the same options need to be enabled for all service accounts.
* **This account supports Kerberos AES 128-bit encryption**
* **This account supports Kerberos AES 256-bit encryption**
Note
If you are unsure which encryption scheme to use, consult with your Active Directory Administrator.
### Step 6: 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 part 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 **Properties**, 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 part 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.
### Step 7: Windows account can access gateway machine
SSO uses Windows Authentication, so make sure the Windows account can access the gateway machine. If not sure, add NT-AUTHORITY\\Authenticated Users (S-1-5-11) to the local machine "Users" group.
Section 2: Environment-specific configuration
---------------------------------------------
### Add gateway service account to Windows Authorization and Access Group
Complete this section if **any** of the following situations apply:
* Your Active Directory environment is security hardened.
* 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](/en-us/windows/security/identity-protection/access-control/active-directory-security-groups#bkmk-winauthaccess)
.
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.
### Set user-mapping configuration parameters on the gateway machine
Complete this section if:
* You don't have Microsoft Entra Connect with user account synchronization configured AND
* The UPN used in Power BI for users does not match the UPN in your local Active Directory environment.
Each Active Directory user mapped in this way needs to have SSO permissions for your data source.
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 **ADUserNameLookupProperty** 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 **ADUserNameReplacementProperty** to `SAMAccountName` and then save the configuration file.
Note
In multi-domain scenarios, you may need to set the **ADUserNameReplacementProperty** to `userPrincipalName` to preserve the domain information of the user.
4. From the **Services** tab of Task Manager, right-click the gateway service and select **Restart**.

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 test@contoso.com and you want to map this user to a local Active Directory user with SSO permissions, say, test@LOCALDOMAIN.COM, set this user's `msDS-cloudExtensionAttribute1` attribute to test@contoso.com.
You can set the `msDS-cloudExtensionAttribute1` property with the Active Directory Users and Computers MMC snap-in:
1. As a domain administrator, launch **Active Directory Users and Computers**.
2. Right-click the domain name, select **Find**, and then enter the account name of the local Active Directory user to map.
3. 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.
4. Select **OK**.

5. Select **Apply**. Verify that the correct value has been set in the **Value** column.
### Complete data source-specific configuration steps
For SAP HANA, SAP BW, and Teradata data sources, additional configuration is required to use with gateway SSO:
* [Use Kerberos for single sign-on (SSO) to SAP HANA](service-gateway-sso-kerberos-sap-hana)
.
* [Use Kerberos single sign-on for SSO to SAP BW using CommonCryptoLib (sapcrypto.dll)](service-gateway-sso-kerberos-sap-bw-commoncryptolib)
.
* [Use Kerberos for single sign-on (SSO) to Teradata](service-gateway-sso-kerberos-teradata)
.
Note
Although other SNC libraries might also work for BW SSO, they aren't officially supported by Microsoft.
Section 3: Validate configuration
---------------------------------
### Step 1: Configure data sources in Power BI
After you complete all the configuration steps, use the **Manage Gateway** page in Power BI to configure the data source to use for SSO. If you have multiple gateways, ensure that you select the gateway you've configured for Kerberos SSO. Then, under **Settings** for the data source, ensure **Use SSO via Kerberos for DirectQuery queries** or **Use SSO via Kerberos for DirectQuery And Import queries** is checked for DirectQuery based Reports and **Use SSO via Kerberos for DirectQuery And Import queries** is checked for Import based Reports.

The settings **Use SSO via Kerberos for DirectQuery queries** and **Use SSO via Kerberos for DirectQuery And Import queries** give a different behavior for DirectQuery based reports and Import based reports.
**Use SSO via Kerberos for DirectQuery queries**:
* For DirectQuery based report, SSO credentials of the user are used.
* For Import based report, SSO credentials are not used, but the credentials entered in data source page are used.
**Use SSO via Kerberos for DirectQuery And Import queries**:
* For DirectQuery based report, SSO credentials of the user are used.
* For Import based report, the SSO credentials of the semantic model owner are used, regardless of the user triggering the Import.
### Step 2: Test single sign-on
Go to [Test single sign-on (SSO) configuration](service-gateway-sso-test-configuration)
to quickly validate that your configuration is set correctly and troubleshoot common problems.
### Step 3: Run a Power BI report
When you publish, select the gateway you've configured for SSO if you have multiple gateways.
Related content
---------------
For more information about the on-premises data gateway and DirectQuery, see the following resources:
* [What is an on-premises data gateway?](/en-us/data-integration/gateway/service-gateway-onprem)
* [DirectQuery in Power BI](desktop-directquery-about)
* [Data sources supported by DirectQuery](power-bi-data-sources)
* [DirectQuery and SAP BW](desktop-directquery-sap-bw)
* [DirectQuery and SAP HANA](desktop-directquery-sap-hana)
* * *
Feedback
--------
Was this page helpful?
Yes No
[Provide product feedback](https://ideas.fabric.microsoft.com/?forum=2d80fd4a-16cb-4189-896b-e0dac5e08b41)
| [Ask the community](https://community.fabric.microsoft.com/powerbi)
* * *
Additional resources
--------------------
---
# Manage SQL Server Analysis Services data sources - Power BI | Microsoft Learn
Table of contents Exit focus mode
Ask Learn Ask Learn [Read in English](# "Read in English")
Save[](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-gateway-enterprise-manage-ssas.md "Edit This Document")
Table of contents [Read in English](# "Read in English")
Add Add to plan [Edit](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-gateway-enterprise-manage-ssas.md "Edit This Document")
* * *
#### Share via
[Facebook](#)
[x.com](#)
[LinkedIn](#)
[Email](#)
* * *
Print
* * *
Note
Access to this page requires authorization. You can try [signing in](#)
or changing directories.
Access to this page requires authorization. You can try changing directories.
Manage SQL Server Analysis Services data sources
================================================
* Article
* 2024-12-10
* 19 contributors
Feedback
After you [install an on-premises data gateway](/en-us/data-integration/gateway/service-gateway-install)
, you can [add data sources](service-gateway-data-sources#add-a-data-source)
to use with the gateway. This article describes how to add a SQL Server Analysis Services (SSAS) data source to your on-premises gateway to use for scheduled refresh or for live connections.
To learn more about how to set up a live connection to SSAS, watch this [Power BI Walkthrough: Analysis Services Live Connect](https://www.youtube.com/watch?v=GPf0YS-Xbyo&feature=youtu.be)
video.
Note
We've split the on-premises data gateway docs into [content that's specific to Power BI](service-gateway-onprem)
and [general content that applies to all services](/en-us/data-integration/gateway/service-gateway-onprem)
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.
Note
If you have an Analysis Services data source, you need to install the gateway on a computer joined to the same forest or domain as your Analysis Services server.
Note
The gateway supports only Windows authentication for Analysis Services.
Note
Analysis Services data sources are not supported with a proxy configuration since it uses a TCP/IP connection. Proxy is only detected when using the [HTTP MSMDPUMP.dll endpoint](/en-us/analysis-services/instances/configure-http-access-to-analysis-services-on-iis-8-0)
.
Add a data source
-----------------
To connect to either a multidimensional or tabular Analysis Services data source:
1. On the **New connection** screen for your on-premises data gateway, select **Analysis Services** for **Connection type**. For more information about how to add a data source, see [Add a data source](service-gateway-data-sources#add-a-data-source)
.

2. Fill in the information for the data source, which includes **Server** and **Database**. The gateway uses the information you enter for **Username** and **Password** 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 get a connection error unless you update the data source password. For more information about how credentials are stored, see [Store encrypted credentials in the cloud](service-gateway-data-sources#store-encrypted-credentials-in-the-cloud)
.
3. Configure the **Privacy level** for your data source. This setting controls how data can be combined for scheduled refresh. The privacy-level setting doesn't apply to live connections. To learn more about privacy levels for your data source, see [Set privacy levels (Power Query)](https://support.office.com/article/Privacy-levels-Power-Query-CC3EDE4D-359E-4B28-BC72-9BEE7900B540)
.

4. Optionally, you can configure user name mapping now. For instructions, see [Manual user name remapping](#manual-user-name-remapping)
.
5. After you complete all the fields, select **Create**.
You can now use this data source for scheduled refresh or live connections against an on-premises Analysis Services instance.
User names for Analysis Services
--------------------------------
Each time a user interacts with a report connected to Analysis Services, the effective user name passes to the gateway and then passes on to your on-premises Analysis Services server. The email address that you use to sign in to Power BI passes to Analysis Services as the effective user in the [EffectiveUserName](/en-us/analysis-services/instances/connection-string-properties-analysis-services#effectiveusername)
connection property.
The email address must match a defined user principal name (UPN) within the local Active Directory (AD) domain. The UPN is a property of an AD account. The Windows account must be present in an Analysis Services role. If a match can't be found in AD, the sign-in isn't successful. To learn more about AD and user naming, see [User naming attributes](/en-us/windows/win32/ad/naming-properties)
.
Map user names for Analysis Services data sources
-------------------------------------------------
Power BI allows mapping user names for Analysis Services data sources. You can configure rules to map a Power BI sign-in user name to an `EffectiveUserName` that passes to the Analysis Services connection. This feature is a great workaround when your Microsoft Entra user name doesn't match a UPN in your local Active Directory instance. For example, if your email address is `meganb@contoso.onmicrosoft.com`, you can map it to `meganb@contoso.com`, and that value passes on to the gateway.
You can map user names for Analysis Services in two different ways:
* Manual user remapping in Power BI
* Active Directory lookup mapping, which uses on-premises AD property lookup to remap Microsoft Entra UPNs to on-premises AD users.
Manual mapping by using on-premises AD property lookup is possible, but is time consuming and difficult to maintain, especially when pattern matching isn't enough. For example, domain names or user account names might be different between Microsoft Entra ID and on-premises AD. Therefore, manual mapping with the second approach isn't recommended.
The following sections describe the two mapping approaches.
### Manual user remapping in Power BI
You can configure custom UPN rules in Power BI for Analysis Services data sources. Custom rules help if your Power BI service sign-in name doesn't match your local directory UPN. For example, if you sign in to Power BI with `meganb@contoso.com` but your local directory UPN is `meganb@contoso.local`, you can configure a mapping rule to pass `meganb@contoso.local` to Analysis Services.
Important
The mapping works for the specific data source that's being configured. It's not a global setting. If you have multiple Analysis Services data sources, you have to map the users for each data source.
To do manual UPN mapping, follow these steps:
1. Under the Power BI gear icon, select **Manage gateways and connections**.
2. Select the data source, and then select **Settings** from the top menu.
3. On the **Settings** screen, in the **Map user names** box, make sure **EffectiveUserName** is selected and then select **Add new rule**.

4. Under **Map user names**, for each user name to map, enter values for **Original name** and **New name**, and then select **Add new rule**. The **Replace** value is the sign-in address for Power BI, and the **With** value is the value to replace it with. The replacement passes to the `EffectiveUserName` property for the Analysis Services connection.

Note
Be sure not to change users that you don't intend to change. For example, if you replace the **Original name** of `contoso.com` with a **New name** of `@contoso.local`, all user sign-ins that contain `@contoso.com` are replaced with `@contoso.local`. Also, if you replace an **Original name** of `meganb@contoso.com` with a **New name** of `meganb@contoso.local`, a sign-in of `v-meganb@contoso.com` is sent as `v-meganb@contoso.local`.
You can select an item in the list and reorder it by dragging and dropping, or delete an entry by selecting the garbage can icon.
#### Use a wildcard
You can use a \* wildcard for your **Replace** (original name) string. You can only use the wildcard on its own and not with any other string part. Use a wildcard if you want to replace all users with a single value to pass to the data source. This approach is useful when you want all users in an organization to use the same user in your local environment.
#### Test the mapping rule
To validate the name replacement, enter a value for **Original name**, and select **Test rule**.

Note
The saved rules work immediately in the browser. It take a few minutes before the Power BI service starts to use the saved rules.
### Active Directory lookup mapping
This section describes how to do an on-premises Active Directory property lookup to remap Microsoft Entra UPNs to AD users. First, review how this remapping works.
Each query by a Power BI Microsoft Entra user to an on-premises SSAS server passes along a UPN string such as `firstName.lastName@contoso.com`.
Lookup mapping in an on-premises data gateway with configurable custom user mapping follows these steps:
1. Find the Active Directory to search. You can use automatic or configurable.
2. Look up the attribute of the Active Directory user, such as **Email**, from the Power BI service. The attribute is based on an incoming UPN string like `firstName.lastName@contoso.com`.
3. If the Active Directory lookup fails, it attempts to pass along the UPN to SSAS as the `EffectiveUserName`.
4. If the Active Directory lookup succeeds, it retrieves the `UserPrincipalName` of that Active Directory user.
5. The mapping passes the `UserPrincipalName` email, such as `Alias@corp.on-prem.contoso`, to SSAS as the `EffectiveUserName`.
Note
Any manual UPN user mappings defined in the Power BI data source gateway configuration are applied before sending the UPN string to the on-premises data gateway.
For the Active Directory lookup to work properly at runtime, you must change the on-premises data gateway service to run with a domain account instead of a local service account.
1. Make sure to [download and install the latest gateway](/en-us/data-integration/gateway/service-gateway-install)
.
2. In the [On-premises data gateway](/en-us/data-integration/gateway/service-gateway-app)
app on your machine, go to **Service settings** > **Change service account**. Make sure you have the recovery key for the gateway, because you need to restore it on the same machine unless you want to create a new gateway. You must 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 `ADUserNameLookupProperty` and the `ADUserNameReplacementProperty` values according to the AD attribute configurations for your AD users. The values in the following image are examples. These configurations are case sensitive, so make sure they match the values in AD.

If the file provides no value for the `ADServerPath` configuration, the gateway uses the default global catalog. You can specify multiple values for the `ADServerPath`. The values must be separated by semicolons, as in the following example:
GC://serverpath1; GC://serverpath2;GC://serverpath3
The gateway parses the values for `ADServerPath` from left to right until it finds a match. If the gateway doesn't find a match, it uses the original UPN. Make sure the account that runs the gateway service, PBIEgwService, has query permissions to all AD servers that you specify in `ADServerPath`.
The gateway supports two types of `ADServerPath`:
* For WinNT: ``
* For global catalog (GC): ` GC://USA.domain.com `
5. Restart the on-premises data gateway service for the configuration change to take effect.
Authentication to a live Analysis Services data source
------------------------------------------------------
Each time a user interacts with Analysis Services, the effective user name is passed to the gateway and then to the on-premises Analysis Services server. The UPN, which is typically the email address you use to sign in to the cloud, is passed to Analysis Services as the effective user in the `EffectiveUserName` connection property.
When the dataset is in Import Mode, the gateway will send the EffectiveUserName of the UPN of the dataset owner. This means that the UPN of the dataset owner will be passed to Analysis Services as the effective user in the `EffectiveUserName` connection property.
This email address should match a defined UPN within the local Active Directory domain. The UPN is a property of an AD account. A Windows account must be present in an Analysis Services role to have access to the server. If no match is found in Active Directory, the sign-in won't be successful.
### Role-based and row-level security
Analysis Services can also provide filtering based on the Active Directory account. The filtering can use role-based security or row-level security. A user's ability to query and view model data depends on the roles that their Windows user account belongs to, and on dynamic row-level security if it's configured.
* **Role-based security.** Models provide security based on user roles. You can define roles for a particular model project during authoring in SQL Server Data Tools Business Intelligence tools. After a model is deployed, you can define roles by using SQL Server Management Studio. Roles contain members assigned by Windows user name or by Windows group.
Roles define the permissions users have to query or take actions on the model. Most users belong to a role with read permissions. Other roles give administrators permissions to process items, manage database functions, and manage other roles.
* **Row-level security.** Models can provide dynamic row-level security. Any defined row-level security is specific to Analysis Services. For role-based security, every user must have at least one role, but no tabular model requires dynamic row-level security.
At a high level, dynamic security defines a user's read access to data in particular rows in particular tables. Similar to roles, dynamic row-level security relies on a user's Windows user name.
Implementing role and dynamic row-level security in models is beyond the scope of this article. For more information, see [Roles in tabular models](/en-us/analysis-services/tabular-models/roles-ssas-tabular)
and [Security roles (Analysis Services - Multidimensional data)](/en-us/analysis-services/multidimensional-models/olap-logical/security-roles-analysis-services-multidimensional-data)
. For the most in-depth understanding of tabular model security, download the [Securing the tabular BI semantic model](https://download.microsoft.com/download/D/2/0/D20E1C5F-72EA-4505-9F26-FEF9550EFD44/Securing%20the%20Tabular%20BI%20Semantic%20Model.docx)
whitepaper.
### Microsoft Entra authentication
Microsoft cloud services use [Microsoft Entra ID](/en-us/azure/active-directory/fundamentals/active-directory-whatis)
to authenticate users. Microsoft Entra ID is the tenant that contains user names and security groups. Typically, the email address a user signs in with is the same as the UPN of the account.
### Roles in the local Active Directory instance
For Analysis Services to determine if a user belongs to a role with permissions to read data, the server needs to convert the effective user name passed from Microsoft Entra ID to the gateway and on to the Analysis Services server. The Analysis Services server passes the effective user name to a Windows Active Directory domain controller (DC). The Active Directory DC then validates that the effective user name is a valid UPN on a local account. The DC returns the user's Windows user name back to the Analysis Services server.
You can't use `EffectiveUserName` on a non-domain joined Analysis Services server. The Analysis Services server must be joined to a domain to avoid sign-in errors.
### Identify your UPN
You might not know what your UPN is, and you might not be a domain administrator. You can use the following command from your workstation to find out the UPN for your account:
whoami /upn
The result looks similar to an email address, but is the UPN that's on your domain account. If you use an Analysis Services data source for live connections, and this UPN doesn't match the email address you use to sign in to Power BI, you might need to [map your user name](#map-user-names-for-analysis-services-data-sources)
.
### Synchronize an on-premises AD with Microsoft Entra ID
If you plan to use Analysis Services live connections, your local AD accounts must match Microsoft Entra ID. The UPN must match between the accounts.
Cloud services only use accounts within Microsoft Entra ID. If you add an account in your local AD instance that doesn't exist in Microsoft Entra ID, you can't use the account. There are several ways you can match your local AD accounts with Microsoft Entra ID:
* Add accounts manually to Microsoft Entra ID.
Create an account on the Azure portal, or within the Microsoft 365 admin center, with an account name that matches the UPN of the local AD account.
* Use [Microsoft Entra Connect Sync](/en-us/azure/active-directory/hybrid/how-to-connect-sync-whatis)
to synchronize local accounts to your Microsoft Entra tenant.
Microsoft Entra Connect ensures that the UPN matches between Microsoft Entra ID and your local AD instance. The Microsoft Entra Connect tool provides options for directory synchronization and setting up authentication. Options include password hash sync, pass-through authentication, and federation. If you're not an admin or a local domain administrator, contact your IT admin to help with configuration.
Note
Synchronizing accounts with Microsoft Entra Connect Sync creates new accounts within your Microsoft Entra tenant.
Use the data source
-------------------
After you add the SSAS data source, it's available to use with either live connections or through scheduled refresh.
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 _SERVER\\INSTANCE_ within the data source configured for the gateway. This requirement holds for both live connections and scheduled refresh.
### Use the data source with live connections
You can use a live connection against tabular or multidimensional instances. You select a live connection in Power BI Desktop when you first connect to the data. Make sure that the server and database name matches between Power BI Desktop and the configured data source for the gateway. Also, to be able to publish live connection datasets, your users must appear under **Users** in the data source list.
After you publish reports, either from Power BI Desktop or by getting data in the Power BI service, your data connection should start to work. It might take several minutes after you create the data source in the gateway before you can use the connection.
### 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.

### Limitations of Analysis Services live connections
* Cell level formatting and translation features aren't supported.
* Actions and named sets aren't exposed to Power BI. You can still connect to multidimensional cubes that contain actions or named sets to create visuals and reports.
#### SKU requirements
| **Server version** | **Required SKU** |
| --- | --- |
| 2014 | Business Intelligence and Enterprise SKU |
| 2016 | Standard SKU or higher |
| 2017 | Standard SKU or higher |
| 2019 | Standard SKU or higher |
| 2022 | Standard SKU or higher |
Related content
---------------
* [Troubleshoot the on-premises data gateway](/en-us/data-integration/gateway/service-gateway-tshoot)
* [Troubleshoot gateways - Power BI](service-gateway-onprem-tshoot)
More questions? Try the [Power BI Community](https://community.powerbi.com/)
.
* * *
Feedback
--------
Was this page helpful?
Yes No
[Provide product feedback](https://ideas.fabric.microsoft.com/?forum=2d80fd4a-16cb-4189-896b-e0dac5e08b41)
| [Ask the community](https://community.fabric.microsoft.com/powerbi)
* * *
Additional resources
--------------------
---
# Manage your data source - SAP HANA - Power BI | Microsoft Learn
Table of contents Exit focus mode
Ask Learn Ask Learn [Read in English](# "Read in English")
Save[](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-gateway-enterprise-manage-sap.md "Edit This Document")
Table of contents [Read in English](# "Read in English")
Add Add to plan [Edit](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-gateway-enterprise-manage-sap.md "Edit This Document")
* * *
#### Share via
[Facebook](#)
[x.com](#)
[LinkedIn](#)
[Email](#)
* * *
Print
* * *
Note
Access to this page requires authorization. You can try [signing in](#)
or changing directories.
Access to this page requires authorization. You can try changing directories.
Manage your data source - SAP HANA
==================================
* Article
* 2023-02-22
* 6 contributors
Feedback
Note
We've split the on-premises data gateway docs into [content that's specific to Power BI](service-gateway-onprem)
and [general content that applies to all services](/en-us/data-integration/gateway/service-gateway-onprem)
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](/en-us/data-integration/gateway/service-gateway-install)
, you need to [add data sources](service-gateway-data-sources#add-a-data-source)
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.
Add a data source
-----------------
For more information about how to add a data source, see [Add a data source](service-gateway-data-sources#add-a-data-source)
. Under **Connection type**, select **SAP HANA**.

After you select the SAP HANA data source type, fill in the **Server**, **Username**, and **Password** information for the data source.
Note
All queries to the data source run using these credentials. To learn more about how credentials are stored, see [Store encrypted credentials in the cloud](service-gateway-data-sources#store-encrypted-credentials-in-the-cloud)
.

After you fill in everything, select **Create**. You can now use this data source for scheduled refresh or DirectQuery against an SAP HANA server that is on-premises. You see _Created New data source_ 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 [Set privacy levels (Power Query)](https://support.office.com/article/Privacy-levels-Power-Query-CC3EDE4D-359E-4B28-BC72-9BEE7900B540)
.

Use the data source
-------------------
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.
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](desktop-use-directquery)
.
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.

Related content
---------------
* [Troubleshoot the on-premises data gateway](/en-us/data-integration/gateway/service-gateway-tshoot)
* [Troubleshoot gateways - Power BI](service-gateway-onprem-tshoot)
More questions? Try asking the [Power BI Community](https://community.powerbi.com/)
.
* * *
Feedback
--------
Was this page helpful?
Yes No
[Provide product feedback](https://ideas.fabric.microsoft.com/?forum=2d80fd4a-16cb-4189-896b-e0dac5e08b41)
| [Ask the community](https://community.fabric.microsoft.com/powerbi)
* * *
Additional resources
--------------------
---
# Connect to data in Power BI Desktop - Power BI | Microsoft Learn
Table of contents Exit focus mode
Ask Learn Ask Learn [Read in English](# "Read in English")
Save[](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/desktop-connect-to-data.md "Edit This Document")
Table of contents [Read in English](# "Read in English")
Add Add to plan [Edit](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/desktop-connect-to-data.md "Edit This Document")
* * *
#### Share via
[Facebook](#)
[x.com](#)
[LinkedIn](#)
[Email](#)
* * *
Print
* * *
Note
Access to this page requires authorization. You can try [signing in](#)
or changing directories.
Access to this page requires authorization. You can try changing directories.
Connect to data sources in Power BI Desktop
===========================================
* Article
* 2025-02-26
* 6 contributors
Feedback
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](https://go.microsoft.com/fwlink/?LinkID=521662)
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**.

Example of connecting to data
-----------------------------
For this example, we'll connect to a **Web** data source.
Imagine you’re retiring. You want to live where there’s lots of sunshine, preferable taxes, and good health care. Or… perhaps you’re a data analyst, and you want that information to help your customers, as in, help your raincoat manufacturing client target sales where it rains a _lot_.
Either way, you find a Web resource that has interesting data about those topics, and more:
[https://www.fool.com/research/best-states-to-retire](https://www.fool.com/research/best-states-to-retire)
Select **Get data** > **Other** > **Web**. In **From Web**, enter the address.

When you select **OK**, the _Query_ functionality of Power BI Desktop goes to work. Power BI Desktop contacts the Web resource, and the **Navigator** window returns the results of what it found on that Web page. In this case, it found a table. We're interested in that table, so we select it from the list. The **Navigator** window displays a preview.
[](media/desktop-connect-to-data/datasources_fromnavigatordialog.png#lightbox)
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 **Query Settings** pane is displayed. If it's not, select **View** from the ribbon, then choose **Query Settings** to display the **Query Settings** pane. Here’s what the editor looks like.
[](media/desktop-connect-to-data/designer_gsg_editquery.png#lightbox)
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 choose **Shift**, select other adjacent columns, and then right-click a column header to change all selected columns. Use **Ctrl** to choose columns that aren't adjacent.
[](media/desktop-connect-to-data/designer_gsg_changedatatype.png#lightbox)
In **Query Settings**, the **APPLIED STEPS** reflect any changes that were made. As you make more changes to the data, Power Query Editor records those changes in the **APPLIED STEPS** section, which you can adjust, revisit, rearrange, or delete as necessary.

Other changes to the table can still be made after it's loaded, but for now these changes are enough. 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 **Report** view in Power BI Desktop, you can begin creating visualizations by dragging fields onto the canvas.
[](media/desktop-connect-to-data/connecttodata_dragontoreportview.png#lightbox)
Of course, this model is simple, with a single data connection. Most Power BI Desktop reports have connections to different data sources, shaped to meet your needs, with relationships that produce a rich data model.
Related content
---------------
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?](../fundamentals/desktop-what-is-desktop)
* [Query overview in Power BI Desktop](../transform-model/desktop-query-overview)
* [Data sources in Power BI Desktop](desktop-data-sources)
* [Shape and combine data in Power BI Desktop](desktop-shape-and-combine-data)
* [Perform common query tasks in Power BI Desktop](../transform-model/desktop-common-query-tasks)
Want to give us feedback? Great! Use the **Submit an Idea** menu item in Power BI Desktop or visit [Community Feedback](https://community.powerbi.com/t5/Community-Feedback/bd-p/community-feedback)
. We look forward to hearing from you!

* * *
Feedback
--------
Was this page helpful?
Yes No
[Provide product feedback](https://ideas.fabric.microsoft.com/?forum=2d80fd4a-16cb-4189-896b-e0dac5e08b41)
| [Ask the community](https://community.fabric.microsoft.com/powerbi)
* * *
Additional resources
--------------------
---
# Manage your data source - Oracle - Power BI | Microsoft Learn
Table of contents Exit focus mode
Ask Learn Ask Learn [Read in English](# "Read in English")
Save[](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-gateway-onprem-manage-oracle.md "Edit This Document")
Table of contents [Read in English](# "Read in English")
Add Add to plan [Edit](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-gateway-onprem-manage-oracle.md "Edit This Document")
* * *
#### Share via
[Facebook](#)
[x.com](#)
[LinkedIn](#)
[Email](#)
* * *
Print
* * *
Note
Access to this page requires authorization. You can try [signing in](#)
or changing directories.
Access to this page requires authorization. You can try changing directories.
Manage your data source - Oracle
================================
* Article
* 2023-09-27
* 14 contributors
Feedback
Note
We've split the on-premises data gateway docs into [content that's specific to Power BI](service-gateway-onprem)
and [general content that applies to all services](/en-us/data-integration/gateway/service-gateway-onprem)
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](/en-us/data-integration/gateway/service-gateway-install)
, you can [add data sources](service-gateway-data-sources#add-a-data-source)
to use with the gateway. This article looks at how to work with the on-premises gateway and Oracle data sources either for scheduled refresh or for DirectQuery.
Connect to an Oracle database
-----------------------------
To connect to an Oracle database with the on-premises data gateway, [download and install the 64-bit Oracle Client for Microsoft Tools (OCMT)](https://www.oracle.com/database/technologies/appdev/ocmt.html)
on the computer running the gateway.
Supported Oracle versions are:
* Oracle Database Server 12c (12.1.0.2) and later
* Oracle Autonomous Database - all versions
After you install and configure OCMT properly, you can use Power BI Desktop or another test client to verify the correct installation and configuration on the gateway.
Add a data source
-----------------
1. On the **New connection** screen for your on-premises data gateway, select **Oracle** for **Connection type**.

2. In **Server**, enter the name for the data source, such as your Oracle net service name (for example, myADB\_high) or Easy Connect Plus connection string.
3. Under **Authentication method**, choose either **Windows** or **Basic**. Choose **Basic** if you plan to log in as an Oracle database user. Then enter the credentials to use for this data source. Choose **Windows** when using Windows operating system authentication and with both the Oracle client and server running on Windows.
Note
All queries to the data source run with these credentials. To learn more about credential storage, see [Store encrypted credentials in the cloud](service-gateway-data-sources#store-encrypted-credentials-in-the-cloud)
.
4. Configure the **Privacy level** for your data source. This setting controls how data can combine 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)](https://support.office.com/article/Privacy-levels-Power-Query-CC3EDE4D-359E-4B28-BC72-9BEE7900B540)
.
5. Select **Create**.

If the creation succeeds, you see **Created **. You can now use this data source for scheduled refresh or DirectQuery with the Oracle database server.

Use the data source
-------------------
After you create the data source, it's available to use with either DirectQuery or scheduled refresh.
Important
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 exactly. 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 a net service name or alias that the _tnsnames.ora_ file defines. 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. Also, to be able to publish DirectQuery datasets, your users must appear under **Users** in the data source listing.
After you publish reports, either from Power BI Desktop or by getting data in Power BI service, your database connection should work. It might take several minutes after you create the data source in the gateway to be able to use the connection.
### Use the data source with scheduled refresh
If you're in the **Users** list of a data source you configure within the gateway, and the server and database names match, you see the gateway as an option to use with scheduled refresh.

Troubleshooting
---------------
You might get one of the following Oracle errors when the naming syntax is either incorrect or improperly configured:
* `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 tnsnames.ora database connect descriptor is misconfigured, the net service name provided is misspelled, or the Oracle database listener is not running or not reachable, such as a firewall blocking the listener or database port. Be sure you are meeting the minimum installation prerequisites.
Visit the [Oracle Database Error Help Portal](https://docs.oracle.com/en/error-help/db/)
to review common causes and resolutions for the specific Oracle error you encounter. Enter your Oracle error in the portal search bar.
To diagnose connectivity issues between the data source server and the gateway machine, install a client like Power BI Desktop on the gateway machine. You can use the client to check connectivity to the data source server.
For more gateway troubleshooting information, see [Troubleshoot the on-premises data gateway](/en-us/data-integration/gateway/service-gateway-tshoot)
.
Related content
---------------
* [Troubleshoot gateways - Power BI](service-gateway-onprem-tshoot)
* [Power BI Premium](../enterprise/service-premium-what-is)
More questions? Try asking the [Power BI Community](https://community.powerbi.com/)
.
* * *
Feedback
--------
Was this page helpful?
Yes No
[Provide product feedback](https://ideas.fabric.microsoft.com/?forum=2d80fd4a-16cb-4189-896b-e0dac5e08b41)
| [Ask the community](https://community.fabric.microsoft.com/powerbi)
* * *
Additional resources
--------------------
---
# Manage a SQL Server data source - Power BI | Microsoft Learn
Table of contents Exit focus mode
Ask Learn Ask Learn [Read in English](# "Read in English")
Save[](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-gateway-enterprise-manage-sql.md "Edit This Document")
Table of contents [Read in English](# "Read in English")
Add Add to plan [Edit](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-gateway-enterprise-manage-sql.md "Edit This Document")
* * *
#### Share via
[Facebook](#)
[x.com](#)
[LinkedIn](#)
[Email](#)
* * *
Print
* * *
Note
Access to this page requires authorization. You can try [signing in](#)
or changing directories.
Access to this page requires authorization. You can try changing directories.
Manage a SQL Server data source
===============================
* Article
* 2024-06-28
* 8 contributors
Feedback
Note
We've split the on-premises data gateway docs into [content that's specific to Power BI](service-gateway-onprem)
and [general content that applies to all services](/en-us/data-integration/gateway/service-gateway-onprem)
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 an on-premises data gateway](/en-us/data-integration/gateway/service-gateway-install)
, you can add data sources to use with the gateway. This article describes how to add a SQL Server data source to an on-premises data gateway to use for scheduled refresh or DirectQuery.
Add a data source
-----------------
Follow these instructions to add a SQL Server data source to your on-premises data gateway.
Note
When you use DirectQuery, the gateway supports only **SQL Server 2012 SP1** and later.
1. On the **New connection** screen, select **On-premises**. Enter the **Gateway cluster name** and new **Connection name**, and under **Connection type**, select **SQL Server**.

2. Fill in the **Server** and **Database** information for the data source.
3. 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 use for this data source.

All queries to the data source run using these credentials unless you configure and enable Kerberos single sign-on (SSO) for the data source. With SSO, datasets use the current Power BI user's SSO credentials to execute the queries.
For more information about storing and using credentials, see:
* [Store encrypted credentials in the cloud](service-gateway-data-sources#store-encrypted-credentials-in-the-cloud)
* [Use Kerberos for single sign-on (SSO) from Power BI to on-premises data sources](service-gateway-sso-kerberos)
.
4. Configure the **Privacy level** for your data source. This setting controls how data can be combined for scheduled refresh only. The privacy level setting doesn't apply to DirectQuery. To learn more about privacy levels for your data source, see [Privacy levels (Power Query)](https://support.office.com/article/Privacy-levels-Power-Query-CC3EDE4D-359E-4B28-BC72-9BEE7900B540)
.
5. Select **Create**.

You see a success message if the creation succeeds. You can now use this data source for scheduled refresh or DirectQuery against an on-premises SQL Server.

For more information about how to add a data source, see [Add a data source](service-gateway-data-sources#add-a-data-source)
.
Use the data source
-------------------
After you create the data source, it's available to use with either DirectQuery connections or through scheduled refresh.
### Server and database names must match
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 exactly.
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 _SERVER\\INSTANCE_ in the data source you configure for the gateway. This requirement holds 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. Also, to be able to publish DirectQuery datasets, your users must appear under **Users** in the data source list.
You select the DirectQuery connection method in Power BI Desktop when you first connect to data. For more information about how to use DirectQuery, see [Use DirectQuery in Power BI Desktop](desktop-use-directquery)
.
After you publish reports, either from Power BI Desktop or by getting data in Power BI service, your SQL Server on-premises data connection should work. It might take several minutes after you create the data source in the gateway to be able to use the connection.
### Use the data source with scheduled refresh
If your account is in the **Users** column 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.

Related content
---------------
* [Connect to on-premises data in SQL Server](service-gateway-sql-tutorial)
* [Troubleshoot the on-premises data gateway](/en-us/data-integration/gateway/service-gateway-tshoot)
* [Troubleshoot gateways - Power BI](service-gateway-onprem-tshoot)
* [Use Kerberos for single sign-on (SSO) from Power BI to on-premises data sources](service-gateway-sso-kerberos)
More questions? Try asking the [Power BI Community](https://community.powerbi.com/)
.
* * *
Feedback
--------
Was this page helpful?
Yes No
[Provide product feedback](https://ideas.fabric.microsoft.com/?forum=2d80fd4a-16cb-4189-896b-e0dac5e08b41)
| [Ask the community](https://community.fabric.microsoft.com/powerbi)
* * *
Additional resources
--------------------
---
# Overview of single sign-on for on-premises data gateways - Power BI | Microsoft Learn
Table of contents Exit focus mode
Ask Learn Ask Learn [Read in English](# "Read in English")
Save[](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-gateway-sso-overview.md "Edit This Document")
Table of contents [Read in English](# "Read in English")
Add Add to plan [Edit](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-gateway-sso-overview.md "Edit This Document")
* * *
#### Share via
[Facebook](#)
[x.com](#)
[LinkedIn](#)
[Email](#)
* * *
Print
* * *
Note
Access to this page requires authorization. You can try [signing in](#)
or changing directories.
Access to this page requires authorization. You can try changing directories.
Overview of single sign-on for on-premises data gateways in Power BI
====================================================================
* Article
* 2024-01-23
* 10 contributors
Feedback
You can get seamless single sign-on (SSO) connectivity, enabling Power BI reports and dashboards to update in real time by configuring your on-premises data gateway. You have the option of configuring your gateway with the following SSO options:
* Active Directory (AD) SSO, which includes:
* [Kerberos](service-gateway-sso-kerberos)
constrained delegation.
* [Security Assertion Markup Language (SAML)](service-gateway-sso-saml)
.
* Microsoft Entra SSO.
Note
SSO is only supported by Power BI datasets and not by Power BI dataflows.
Supported data sources for SSO
------------------------------
AD SSO is usually configured for on-premises data sources that are secured within your on-premises network. Microsoft Entra SSO is configured for data sources that support Microsoft Entra authentication, typically cloud data sources, secured behind an Azure Virtual Network.
While the on-premises data gateway supports SSO by using [DirectQuery](desktop-directquery-about)
or _Refresh_ for the AD-based SSO options, only [DirectQuery](desktop-directquery-about)
is supported for Microsoft Entra SSO.
Power BI supports the following data sources:
* Amazon Redshift (Microsoft Entra ID)
* Azure Databricks (Microsoft Entra ID)
* Azure Data Explorer (Microsoft Entra ID)
* Azure SQL (Microsoft Entra ID)
* Azure Synapse Analytics (Microsoft Entra ID)
* Denodo (Kerberos)
* Hive LLAP (Kerberos)
* Impala (Kerberos)
* Oracle (Kerberos)
* SAP BW Application Server (Kerberos)
* SAP BW Message Server (Kerberos)
* SAP HANA (Kerberos and SAML)
* Snowflake (Microsoft Entra ID)
* Spark (Kerberos)
* SQL Server (Kerberos)
* Teradata (Kerberos)
* Tibco Data Virtualization (Kerberos)
Note
SQL Server Analysis Services also supports SSO, but does so using [Live connections](service-gateway-enterprise-manage-ssas#authentication-to-a-live-analysis-services-data-source)
, rather than using Kerberos or SAML. Power BI doesn't support SSO for [M-extensions](/en-us/power-query/samples/trippin/9-testconnection/readme)
.
Interact with reports that rely on SSO
--------------------------------------
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 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, they run 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 that 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](service-gateway-sso-kerberos)
constrained delegation.
Related content
---------------
Now that you understand the basics of SSO through the gateway, read detailed information about setting up SSO here:
* [Active Directory (AD) SSO](service-gateway-active-directory-sso)
* [Microsoft Entra SSO](service-gateway-azure-active-directory-sso)
* * *
Feedback
--------
Was this page helpful?
Yes No
[Provide product feedback](https://ideas.fabric.microsoft.com/?forum=2d80fd4a-16cb-4189-896b-e0dac5e08b41)
| [Ask the community](https://community.fabric.microsoft.com/powerbi)
* * *
Additional resources
--------------------
---
# Create and share cloud data sources in the Power BI service - Power BI | Microsoft Learn
Table of contents Exit focus mode
Ask Learn Ask Learn [Read in English](# "Read in English")
Save[](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-create-share-cloud-data-sources.md "Edit This Document")
Table of contents [Read in English](# "Read in English")
Add Add to plan [Edit](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-create-share-cloud-data-sources.md "Edit This Document")
* * *
#### Share via
[Facebook](#)
[x.com](#)
[LinkedIn](#)
[Email](#)
* * *
Print
* * *
Note
Access to this page requires authorization. You can try [signing in](#)
or changing directories.
Access to this page requires authorization. You can try changing directories.
Create and share cloud data sources in the Power BI service
===========================================================
* Article
* 2024-05-03
* 3 contributors
Feedback
With Power BI, you can create, share, and manage cloud connections for semantic models and paginated reports, datamarts, and dataflows, as well as Power Query Online experiences in _Get data_, all within the Power BI service user experience.
This article shows you how to create a shareable cloud connection, and then shows you how to share that connection with others. Creating and sharing shareable cloud connections have many advantages, as described in [advantages of shareable cloud connections](service-connect-cloud-data-sources#advantages-of-shareable-cloud-connections)
.
Create a shareable cloud connection
-----------------------------------
To create a shareable cloud connection, go to the Power BI service, select the **Settings** gear icon, and from the pane that appears select **Manage connections and gateways**.
[](media/service-create-share-cloud-data-sources/service-create-share-cloud-data-sources-01.png#lightbox)
In the window that appears, select **New connection** and from the pane that appears, select **Cloud**.

Enter a name for the new connection, select the appropriate **connection type** from the drop-down list, and provide the connection details for your data source. Once you've filled in the information, select **Create**.
[](media/service-create-share-cloud-data-sources/service-create-share-cloud-data-sources-03.png#lightbox)
With your connection created, you're ready to share it with others.
Note
When a .PBIX file with a cloud data source is published from Power BI Desktop, a cloud connection is created automatically.
Share a shareable cloud connection
----------------------------------
To share a shareable cloud connection that you've already created, go to your **Connections** settings in the Power BI service, select the **More** menu (the ellipses) for the connection you want to share, and select **Manage users**.

The **Manage users** window appears, where you can search users by name or by their email address, and then grant them the permission level you want them to have. You must at least grant _User_ permission to allow users to connect their artifacts to the connection's data source.

Once you've found the user and assigned permission, select **Share** at the bottom of the **Manage users** window to apply your selections.
Assign a shared cloud connection to a semantic model
----------------------------------------------------
Once you've created a shareable cloud connection, you can assign it to a semantic model.
Open the settings for the semantic model to which you want the shareable connection to apply, and expand the **Gateway and cloud connections** section. You'll notice that the connection is mapped to a _Personal Cloud Connection_ by default.

From the **Maps to** drop down, select the name of the shareable connection you created and want to use, then select **Apply**.

That's it, you've now assigned your shareable cloud connection to the semantic model.
If you haven't created a shareable cloud connection yet when you're using this screen, you can select the **Create a connection** option from the drop-down to be taken to the **Manage connections and gateways** experience, and all the connection details from the data source for which you selected the **Create a connection** drop-down are prepopulated in the **Create new cloud connection** form.
Granular access control
-----------------------
Power BI enforces granular access control for shareable cloud connections. Access control for all data types can be enabled at the tenant, workspace, and semantic model level. The following image shows how access control can be enforced at the tenant, the workspace, or the semantic model. Each setting provides granular access control, with different priority.

If a tenant admin enables granular access control for all connection types, then granular access control is enforced for the entire organization. Workspace admins and artifact owners can't overrule granular access control enabled at the tenant level.
If granular access control isn't enforced at the tenant level, workspace admins can enforce granular access control for their workspaces. And if workspace admins don’t enforce granular access control, then artifact owners can decide whether to enforce granular access control for each of their artifacts independently.
By default, granular access control is disabled at all three levels, enabling individual artifact owners to enforce granular access control for each data connection type selectively. However, it's likely more efficient to enable granular access control on a workspace-by-workspace basis.
Related content
---------------
For important information about shareable cloud connections, including limitations and considerations, read the following article:
* [Connect to cloud data sources in the Power BI service](service-connect-cloud-data-sources)
* * *
Feedback
--------
Was this page helpful?
Yes No
[Provide product feedback](https://ideas.fabric.microsoft.com/?forum=2d80fd4a-16cb-4189-896b-e0dac5e08b41)
| [Ask the community](https://community.fabric.microsoft.com/powerbi)
* * *
Additional resources
--------------------
---
# DirectQuery for SAP HANA in Power BI - Power BI | Microsoft Learn
Table of contents Exit focus mode
Ask Learn Ask Learn [Read in English](# "Read in English")
Save[](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/desktop-directquery-sap-hana.md "Edit This Document")
Table of contents [Read in English](# "Read in English")
Add Add to plan [Edit](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/desktop-directquery-sap-hana.md "Edit This Document")
* * *
#### Share via
[Facebook](#)
[x.com](#)
[LinkedIn](#)
[Email](#)
* * *
Print
* * *
Note
Access to this page requires authorization. You can try [signing in](#)
or changing directories.
Access to this page requires authorization. You can try changing directories.
Connect to SAP HANA data sources by using DirectQuery in Power BI
=================================================================
* Article
* 2024-12-10
* 8 contributors
Feedback
You can connect to SAP HANA data sources directly using DirectQuery, which is often required for large datasets that exceed available resources to support import models. There are two approaches for connecting to SAP HANA in DirectQuery mode, each with different capabilities:
* **Treat SAP HANA as a multi-dimensional source (default):** In this case, the behavior is similar to when Power BI connects to other multi-dimensional sources like SAP Business Warehouse, or Analysis Services. When you connect to SAP HANA as a multi-dimensional source, a single analytic or calculation view is selected and all the measures, hierarchies and attributes of that view are available in the field list. You cannot add calculated columns or other data customizations in the semantic model. As visuals are created, the aggregate data is directly retrieved from SAP HANA. Treat SAP HANA as a multi-dimensional source 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 data source. This approach offers greater flexibility. Among other things, you can add calculated columns and include data from other sources, but care must be taken to ensure that measures are aggregated as expected. Avoid non-additive measures. Also, make sure you use simple views with few columns and joins to avoid performance issues. Consider recreating measures in the semantic model, but keep in mind that complex measures might not fold. SAP HANA hierarchies are unavailable when using SAP HANA as a relational source.
The connection method is determined by a global tool option, which is set by selecting **File** > **Options and settings** and then **Options** > **DirectQuery**, 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 connection method 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 is treating SAP HANA as a multi-dimensional source. However, if a different report is opened that also connects to SAP HANA, then that report continues to behave according to the option that was set _at the time it was created_. This fact means that any reports connecting to SAP HANA as a relational source continue to treat SAP HANA as a relational source even if the option is now unchecked.
The two SAP HANA connection methods constitute different behavior, and it's not possible to switch an existing report from one connection method to the other.
Treat SAP HANA as a multi-dimensional source (default)
------------------------------------------------------
All new connections to SAP HANA use this connection method by default, treating SAP HANA as a multi-dimensional source. When connecting to SAP HANA as a multi-dimensional source, the following considerations apply:
* In the **Get Data Navigator**, a single SAP HANA view can be selected. It isn't possible to select individual measures or attributes. There's no query defined at the time of connecting, which is different from importing data or when using DirectQuery while treating SAP HANA as a relational source. This consideration also means that it's not possible to directly use an SAP HANA SQL query when selecting this connection method.
* All the measures, hierarchies, and attributes of the selected view are displayed in the field list.
* As a measure is used in a visual, SAP HANA is queried to retrieve the measure value at the level of aggregation necessary for the visual. When dealing with non-additive measures, such as counters and ratios, all aggregations are performed by SAP HANA, and no further aggregation is performed by Power BI.
* To ensure the correct aggregate values can always be obtained from SAP HANA, certain restrictions must be imposed. For example, it's not possible to add calculated columns, or to combine data from multiple SAP HANA views within the same report. It is also not possible to delete columns or change their data types.
Treating SAP HANA as a multi-dimensional source offers less flexibility than the alternative _relational_ approach, but it's more straightforward. This connection method ensures correct aggregate values when dealing with more complex SAP HANA measures, and generally results in higher performance.
The **Field** list includes all measures, attributes, and hierarchies from the SAP HANA view. Note the following behaviors that apply when using this connection method:
* Any attribute that is included in at least one hierarchy is hidden by default. However, they can be seen if required by selecting **View hidden** from the context menu on the field list. From the same context menu they can be made visible, if necessary.
* In SAP HANA, an attribute can be defined to use another attribute as its label. For example, **Product**, with values `1`, `2`, `3`, and so on, could use **ProductName**, with values `Bike`, `Shirt`, `Gloves`, and so on, as its label. In this case, a single field **Product** is shown in the field list, whose values are the labels `Bike`, `Shirt`, `Gloves`, and so on, but which is sorted by, and with uniqueness determined by, the key values `1`, `2`, `3`. A hidden column **Product.Key** is also created, allowing access to the underlying key values if necessary.
Any variables defined in the underlying SAP HANA view are displayed at the time of connecting, and the necessary values can be entered. Those values can later be changed by selecting **Transform data** from the ribbon, and then **Edit parameters** from the dropdown menu displayed.
The modeling operations allowed are more restrictive than in the general case when using DirectQuery, given the need to ensure that correct aggregate data can always be obtained from SAP HANA. However, it's still possible to make some additions and changes, including defining measures, renaming and hiding fields, and defining display formats. All such changes are preserved on refresh, and any non-conflicting changes made to the SAP HANA view are applied.
### Additional modeling restrictions
In addition to the aforementioned limitations, be aware of the following modeling restrictions when connecting to SAP HANA as a multi-dimensional source:
* **No support for calculated columns:** The ability to create calculated columns is disabled. This fact also means that Grouping and Clustering, which rely on calculated columns, aren't available.
* **Additional limitations for measures:** There are other limitations imposed on the DAX expressions that can be used in measures, to reflect the level of support offered by SAP HANA. For example, it's not possible to use an aggregate function over a table.
* **No support for defining relationships:** Only a single view can be queried within a report, and as such, there's no support for defining relationships.
* **No Table View:** The **Table View** normally displays the detail level data in the tables. Given the nature of multi-dimensional sources, this view isn't available when using SAP HANA as a multi-dimensional source.
* **Column and measure details are fixed:** The columns and measures in the field list are determined by the underlying source and can't be modified. For example, it's not possible to delete a column, nor change its datatype. It can, however, be renamed.
### Additional visualization restrictions
There are restrictions in visuals when connecting to SAP HANA as a multi-dimensional source:
* **No aggregation of columns:** It's not possible to change the aggregation for a column on a visual, and it's always _Do Not Summarize_.
Treat SAP HANA as a relational source
-------------------------------------
In order to connect to SAP HANA as a relational source, you must select **File** > **Options and settings** and then **Options** > **DirectQuery**, and then select the option **Treat SAP HANA as a relational source**.
When using SAP HANA as a relational source, some extra flexibility is available. For example, you can create calculated columns, include data from multiple SAP HANA views, and create relationships between the resulting tables. However, there are differences from the behavior when connecting to SAP HANA as a multidimensional source, particularly when the SAP HANA view contains non-additive measures, for example, distinct counts, or averages, rather than simple sums. Non-additive measures can produce wrong results. The measures can also reduce the efficiency of query plan optimization in SAP HANA and result in poor query performance and timeouts.
### Understanding SAP HANA as a relational source
It's useful to start by clarifying the behavior of a relational source, such as SQL Server, when the query defined in **Get Data** or Power Query Editor performs an aggregation. In the example that follows, a query defined in Power Query Editor returns the average price by _ProductID_.

If the data was imported into Power BI instead of using DirectQuery, the following situation would result:
* The data is imported at the level of aggregation defined by the query created in Power Query Editor. For example, average price by product. This fact results in a table with the two columns _ProductID_ and _AveragePrice_ that can be used in visuals.
* In a visual, any subsequent aggregation, such as _Sum_, _Average_, _Min_, and others, is performed over that imported data. For example, including _AveragePrice_ on a visual uses the _Sum_ aggregate by default, and would return the sum over the _AveragePrice_ for each _ProductID_, in this example, 13.67. The same applies to any alternative aggregate function, such as _Min_ or _Average_, used on the visual. For example, _Average_ of _AveragePrice_ returns the average of 6.66, 4 and 3, which equates to 4.56, and not the average of _Price_ on the six records in the underlying table, which is 5.17.
If DirectQuery over that same relational source is being used instead of Import, the same semantics apply and the results would be exactly the same:
* Given the same query, logically exactly the same data is presented to the reporting layer – even though the data isn't actually imported.
* In a visual, any subsequent aggregation, such as _Sum_, _Average_, and _Min_, is again performed over that logical table from the query. And again, a visual containing _Average_ of _AveragePrice_ returns the same 4.56.
Consider SAP HANA when the connection is treated as a relational source. Power BI can work with both _Analytic Views_ and _Calculation Views_ in SAP HANA, both of which can contain measures. Yet today the approach for SAP HANA follows the same principles as described previously in this section: the query defined in **Get Data** or Power Query Editor determines the data available, and then any subsequent aggregation in a visual is over that data, and the same applies for both Import and DirectQuery. However, given the nature of SAP HANA, the query defined in the initial **Get Data** dialog or **Power Query Editor** is always an aggregate query, and generally includes measures where the actual aggregations that are used are defined by the SAP HANA view.
The equivalent of the previous SQL Server example is that there's an SAP HANA view containing _ID_, _ProductID_, _DepotID_, and measures including _AveragePrice_, defined in the view as _Average of Price_.
If in the **Get Data** experience, the selections made were for **ProductID** and the **AveragePrice** measure, then that is defining a query over the view, requesting that aggregate data. In the earlier example, for simplicity pseudo-SQL is used that doesn’t match the exact syntax of SAP HANA SQL. Then any further aggregations defined in a visual are further aggregating the results of such a query. Again, as described previously for SQL Server, this result applies both for the Import and DirectQuery case. In the DirectQuery case, the query from **Get Data** or Power Query Editor are used in a subselect within a single query sent to SAP HANA, and thus it isn't actually the case that all the data would be read in, prior to aggregating further.
All of these considerations and behaviors necessitate the following important considerations when using DirectQuery over SAP HANA as a relational source:
* Attention must be paid to any further aggregation performed in visuals, whenever the measure in SAP HANA is non-additive, for example, not a simple _Sum_, _Min_, or _Max_.
* In **Get Data** or Power Query Editor, only the required columns should be included to retrieve the necessary data, reflecting the fact that the result is a query that must be a reasonable query that can be sent to SAP HANA. For example, if dozens of columns were selected, with the thought that they might be needed on subsequent visuals, then even for DirectQuery a simple visual means the aggregate query used in the subselect contains those dozens of columns, which generally perform poorly and can encounter timeouts.
In the following example, selecting five columns (**CalendarQuarter**, **Color**, **LastName**, **ProductLine**, **SalesOrderNumber**) in the **Get Data** dialog, along with the measure _OrderQuantity_, means that later creating a simple visual containing the **Min OrderQuantity** results in the following SQL query to SAP HANA. The shaded is the subselect, containing the query from **Get Data** / Power Query Editor. If this subselect gives a high cardinality result, then the resulting SAP HANA performance is likely to be poor or encounter timeouts. The performance impact is not due to Power BI requesting all fields in the subselect; most of those fields will be projected away by the outer query. Rather, the impact is due to measures in the subselect forcing it to be materialized in the HANA server.

Because of this behavior, we recommend the items selected in **Get Data** or Power Query Editor be limited to those items that are needed, while still resulting in a reasonable query for SAP HANA. If possible, consider recreating all required measures in the semantic model and using SAP HANA more like a traditional relational source.
Best practices
--------------
For both methods to connect to SAP HANA, follow the general recommendations for using DirectQuery, particularly recommendations related to ensuring good query performance. For more information, see [using DirectQuery in Power BI](desktop-directquery-about)
.
Considerations and limitations
------------------------------
The following list describes all SAP HANA features that aren't fully supported, or features that behave differently when using Power BI.
* **Parent Child Hierarchies:** Parent child hierarchies aren't visible in Power BI. This is because Power BI accesses SAP HANA using the SQL interface, and parent child hierarchies can't be fully accessed by using 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, have no effect. Again, this is due to limitations imposed by the SQL interface.
* **Connection using SSL:** You can connect using Import and multi-dimensional with TLS, but can't connect to SAP HANA instances configured to use TLS for the relational connection method.
* **Support for Attribute views:** Power BI can connect to Analytic and Calculation views, but can't connect directly to Attribute views.
* **Support for Catalog objects:** Power BI can't connect to Catalog objects.
* **Change to Variables after publish:** You can't 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 query 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 issue is covered by [SAP Note 2128928 (Unexpected results when query a Calculated Column and a Counter)](https://userapps.support.sap.com/sap/support/knowledge/en/2128928)
. The ratio measure is incorrect in this case.
* **Multiple Power BI columns from single SAP HANA column:** For some calculation views, where an SAP HANA column is used in more than one hierarchy, SAP HANA exposes the column as two separate attributes. This approach 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.
Related content
---------------
For more information about DirectQuery, check out the following resources:
* [DirectQuery in Power BI](desktop-directquery-about)
* [Data sources supported by DirectQuery](power-bi-data-sources)
* [DirectQuery and SAP BW](desktop-directquery-sap-bw)
* [On-premises data gateway](service-gateway-onprem)
* * *
Feedback
--------
Was this page helpful?
Yes No
[Provide product feedback](https://ideas.fabric.microsoft.com/?forum=2d80fd4a-16cb-4189-896b-e0dac5e08b41)
| [Ask the community](https://community.fabric.microsoft.com/powerbi)
* * *
Additional resources
--------------------
---
# Guidance for deploying a data gateway for the Power BI service - Power BI | Microsoft Learn
Table of contents Exit focus mode
Ask Learn Ask Learn [Read in English](# "Read in English")
Save[](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-gateway-deployment-guidance.md "Edit This Document")
Table of contents [Read in English](# "Read in English")
Add Add to plan [Edit](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-gateway-deployment-guidance.md "Edit This Document")
* * *
#### Share via
[Facebook](#)
[x.com](#)
[LinkedIn](#)
[Email](#)
* * *
Print
* * *
Note
Access to this page requires authorization. You can try [signing in](#)
or changing directories.
Access to this page requires authorization. You can try changing directories.
Guidance for deploying a data gateway for the Power BI service
==============================================================
* Article
* 2024-05-23
* 6 contributors
Feedback
Note
We've split the on-premises data gateway docs into [content that's specific to Power BI](service-gateway-onprem)
and [general content that applies to all services](/en-us/data-integration/gateway/service-gateway-onprem)
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 the Power BI service 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?](/en-us/data-integration/gateway/service-gateway-onprem)
. You can also find out more about the on-premises data gateway and Power BI by visiting the [Microsoft Power BI blog](https://powerbi.microsoft.com/blog/)
and the [Microsoft Power BI Community](https://community.powerbi.com/)
site.
Installation considerations for the on-premises data gateway
------------------------------------------------------------
Before you install the on-premises data gateway for your Power BI cloud service, there are some considerations to keep in mind. The following sections describe these considerations.
### Number of users
The number of users who consume a report that uses the gateway is an important metric in your decision about where to install the gateway. Here are some questions to consider:
* Do users use these reports at different times of the day?
* What types of connections do they use: DirectQuery or Import?
* Do all users use the same report?
If all the users access a given report at the same time each day, make sure that you install the gateway on a machine that's capable of handling all those requests. See the following sections for performance counters and minimum requirements that can help you determine whether a machine is adequate.
A constraint in the Power BI service allows only _one_ gateway per _report_. Even if a report is based on multiple data sources, all such data sources must go through a single gateway. If a dashboard is based on _multiple_ reports, you can use a dedicated gateway for each contributing report. In this way, you distribute the gateway load among the multiple reports that contribute to the single dashboard.
### Connection type
The Power BI service offers two types of connections: DirectQuery and Import. Not all data sources support both connection types. Many factors might contribute to your choice of one over the other, such as security requirements, performance, data limits, and data model sizes. To learn more about connection types and supported data sources, see the [list of available data source types](service-gateway-data-sources#list-of-available-data-source-types)
.
Depending on which type of connection is used, gateway usage can be different. For example, try to separate DirectQuery data sources from scheduled refresh data sources whenever possible. The assumption is that they're in different reports and can be separated. Separating sources prevents the gateway from having thousands of DirectQuery requests queued up at the same time as the morning's scheduled refresh of a large-size data model that's used for the company's main dashboard.
Here's what to consider for each option:
* **Scheduled refresh**: Depending on your query size and the number of refreshes that occur per day, you can choose to stay with the recommended minimum hardware requirements or upgrade to a higher performance machine. If a given query isn't folded, transformations occur on the gateway machine. As a result, the gateway machine benefits from having more available RAM.
* **DirectQuery**: A query is sent each time any user opens the report or looks at data. If you expect more than 1,000 users to access the data concurrently, make sure your computer has robust and capable hardware components. More CPU cores result in better throughput for a DirectQuery connection.
For the machine installation requirements, see the on-premises data gateway [installation requirements](/en-us/data-integration/gateway/service-gateway-install#requirements)
.
### Location
The location of the gateway installation can have significant effect on your query performance. Try to make sure that your gateway, data source locations, and the Power BI tenant are as close as possible to each other to minimize network latency. To determine your Power BI tenant location, in the Power BI service select the question mark (**?**) icon in the upper-right corner. Then select **About Power BI**.

If you intend to use the Power BI service gateway with Azure Analysis Services, be sure that the data regions in both match.
### Optimizing performance
By default, the gateway spools data before returning it to the dataset, potentially causing slower performance during data load and refresh operations. The default behavior can be overridden.
1. In the _C:\\Program Files\\On-Premises data gateway\\**Microsoft.PowerBI.DataMovement.Pipeline.GatewayCore.dll.config**_ file, set the `StreamBeforeRequestCompletes` property to `True`, and then save.
True
2. In **On-premises data gateway** > **Service Settings**, restart the gateway.
If installing the gateway on an Azure Virtual Machine, ensure optimal networking performance by configuring accelerated networking. To learn more, see [Create a Windows VM with accelerated networking](/en-us/azure/virtual-network/create-vm-accelerated-networking-powershell)
.
Related content
---------------
* [Configure proxy settings](/en-us/data-integration/gateway/service-gateway-proxy)
* [Troubleshoot gateways - Power BI](service-gateway-onprem-tshoot)
* [On-premises data gateway FAQ - Power BI](service-gateway-power-bi-faq)
More questions? Try the [Power BI Community](https://community.powerbi.com/)
.
* * *
Feedback
--------
Was this page helpful?
Yes No
[Provide product feedback](https://ideas.fabric.microsoft.com/?forum=2d80fd4a-16cb-4189-896b-e0dac5e08b41)
| [Ask the community](https://community.fabric.microsoft.com/powerbi)
* * *
Additional resources
--------------------
---
# DirectQuery and SAP Business Warehouse (BW) in Power BI - Power BI | Microsoft Learn
Table of contents Exit focus mode
Ask Learn Ask Learn [Read in English](# "Read in English")
Save[](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/desktop-directquery-sap-bw.md "Edit This Document")
Table of contents [Read in English](# "Read in English")
Add Add to plan [Edit](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/desktop-directquery-sap-bw.md "Edit This Document")
* * *
#### Share via
[Facebook](#)
[x.com](#)
[LinkedIn](#)
[Email](#)
* * *
Print
* * *
Note
Access to this page requires authorization. You can try [signing in](#)
or changing directories.
Access to this page requires authorization. You can try changing directories.
Connect to SAP Business Warehouse by using DirectQuery in Power BI
==================================================================
* Article
* 2025-02-26
* 6 contributors
Feedback
You can connect to _SAP Business Warehouse_ (SAP BW) data sources directly using _DirectQuery_. 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 DirectQuery over relational sources, there's a set of queries, as defined in the **Get Data** or **Power Query Editor** dialog, that logically defines the data that is available in the field list. This configuration 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 are available in the field list.
* Similarly, there's no **Power Query Editor** when connecting to SAP BW. The data source settings, for example, server name, can be changed by selecting **Transform data** > **Data source settings**. The settings for any parameters can be changed by selecting **Transform data** > **Edit parameters**.
* Given the unique nature of OLAP sources, there are other 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's _extremely important_ to understand that there are many features of SAP BW that aren't 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 don't match the ones 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 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.
Additional modeling restrictions
--------------------------------
The other primary modeling restrictions when connecting to SAP BW using DirectQuery in Power BI are:
* **No support for calculated columns:** The ability to create calculated columns is disabled. This fact also means that grouping and clustering, which create calculated columns, aren't available.
* **Additional limitations for measures:** There are other limitations imposed on the DAX expressions that can be used in measures to reflect the level of support offered by SAP BW.
* **No support for defining relationships:** The relationships are inherent in the external SAP source. Other relationships can't be defined in the model.
* **No Table View:** The Table view normally displays the detail level data in the tables. Given the nature of OLAP sources like SAP BW, this view isn't available over SAP BW.
* **Column and measure details are fixed:** The list of columns and measures seen in the field list are fixed by the underlying source, and can't be modified. For example, it's not possible to delete a column or change its datatype. It can, however, be renamed.
* **Additional limitations in DAX:** There are more limitations on the DAX that can be used in measure definitions to reflect limitations in the source. For example, it's not possible to use an aggregate function over a table.
Additional visualization restrictions
-------------------------------------
The other primary restrictions in visualizations when connecting to SAP BW using DirectQuery in Power BI are:
* **No aggregation of columns:** It's not possible to change the aggregation for a column on a visual. It's always _Do Not Summarize_
* **Measure filtering is disabled:** Measure filtering is disabled to reflect the support offered by SAP BW.
* **Multi-select and include/exclude:** The ability to multi-select data points on a visual is disabled if the points represent values from more than one column. For example, given a bar chart showing Sales by Country/Region, with Category on the Legend, it wouldn't be possible to select the point for (USA, Bikes) and (France, Clothes). Similarly, it wouldn't be possible to select the point for (USA, Bikes) and exclude it from the visual. Both limitations are imposed to reflect the support offered by SAP BW.
Support for SAP BW features
---------------------------
The following table lists all SAP BW features that aren't fully supported, or behave differently when using Power BI.
| Feature | Description |
| --- | --- |
| **Local calculations** | Local calculations defined in a BEx Query change the numbers as displayed through tools like BEx Analyzer. However, they aren't reflected in the numbers returned from SAP, through the public MDX interface. |
| | **As such, the numbers seen in a Power BI visual don't necessarily match those for a corresponding visual in an SAP tool.** |
| | For example, when connecting to a query cube from a BEx query that sets the aggregation to be _Cumulated_, or running sum, Power BI would get back the base numbers, ignoring that setting. An analyst could then apply a running sum calculation locally in Power BI, but would need to exercise caution in how the numbers are interpreted if this action isn't done. |
| **Aggregations** | In some cases, particularly when dealing with multiple currencies, the aggregate numbers returned by the SAP public interface don't match the results shown by SAP tools. |
| | **As such, the numbers seen in a Power BI visual don't necessarily match those for a corresponding visual in an SAP tool.** |
| | For example, totals over different currencies would show as "\*" in BEx Analyzer, but the total would get returned by the SAP public interface, without any information that such an aggregate number is meaningless. Thus the number aggregating, say, $, EUR, and AUD, would get displayed by Power BI. |
| **Currency formatting** | Any currency formatting, for example, _$2,300_ or _4,000 AUD_, isn't reflected in Power BI. |
| **Units of measure** | Units of measure, for example, _230 KG_, aren't reflected in Power BI. |
| **Key versus text** (short, medium, long) | For an SAP BW characteristic like `CostCenter`, the field list shows a single column _Cost Center_. Using that column displays the default text. By showing hidden fields, it's also possible to see the unique name column that returns the unique name assigned by SAP BW, and is the basis of uniqueness. |
| | The key and other text fields aren't available. |
| **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. |
| | In Power BI, the various hierarchies can be seen in the field list as different hierarchies on the same dimension. However, selecting multiple levels from two different hierarchies on the same dimension results in empty data being returned by SAP. |
| **Treatment of ragged hierarchies** |  |
| **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 is scaled by that factor. |
| | It can similarly have a property set that reverses the sign. Use of such a key figure in Power BI in a visual, or as part of a calculation results in the unscaled number being used. The sign isn't reversed. The underlying scaling factor isn't available. In Power BI visuals, the scale units shown on the axis (K,M,B) can be controlled as part of the visual formatting. |
| **Hierarchies where levels appear/disappear dynamically** | Initially when connecting to SAP BW, the information on the levels of a hierarchy are retrieved, resulting in a set of fields in the field list. This information is cached, and if the set of levels changes, then the set of fields don't change until _Refresh_ is invoked. |
| | This situation is only possible in **Power BI Desktop**. Such refresh to reflect changes to the levels can't be invoked in the Power BI service after publish. |
| **Default filter** | A BEx query can include default filters, which are applied automatically by SAP BEx Analyzer. These filters aren't exposed, and hence the equivalent usage in Power BI doesn't apply the same filters by default. |
| **Hidden Key figures** | A BEx query can control visibility of key figures, and those key figures that are hidden don't appear in SAP BEx Analyzer. This fact isn't reflected through the public API, and hence such hidden key figures still appear in the field list. However, they can then be hidden within Power BI. |
| **Numeric formatting** | Any numeric formatting, such as number of decimal positions and decimal point, isn't automatically reflected in Power BI. However, it's possible to then control such formatting within Power BI. |
| **Hierarchy versioning** | SAP BW allows different versions of a hierarchy to be maintained, for example, the cost center hierarchy in 2007 versus 2008. Only the latest version is available in Power BI, as information on versions isn't exposed by the public API. |
| **Time dependent hierarchies** | When using Power BI, time dependent hierarchies are evaluated at the current date. |
| **Currency conversion** | SAP BW supports currency conversion, based on rates held in the cube. Such capabilities aren't exposed by the public API, and are therefore not available in Power BI. |
| **Sort Order** | The sort order, such as _by Text_ or _by Key_, for a characteristic can be defined in SAP. This sort order isn't reflected in Power BI. For example, months might appear as "April", "Aug", and so on. |
| | It's not possible to change this sort order in Power BI. |
| **Technical names** | In **Get Data**, the characteristic/measure names (descriptions) and technical names can both be seen. The field list contains just the characteristic/measure names (descriptions). |
| **Attributes** | It's not possible to access the attributes of a characteristic within Power BI. |
| **End user language setting** | The locale used to connect to SAP BW is set as part of the connection details, and doesn't reflect the locale of the final report consumer. |
| **Text variables** | SAP BW allows field names to contain placeholders for variables, for example, `$YEAR$ Actuals`, that would then get replaced by the selected value. For example, the field appears as _2016 Actuals_ in BEx tools, if the year 2016 were selected for the variable. |
| | The column name in Power BI isn't changed depending on the variable value, and therefore would appear as `$YEAR$ Actuals`. However, the column name can then be changed in Power BI. |
| **Customer exit variables** | Customer exit variables aren't exposed by the public API, and are therefore not supported by Power BI. |
| **Characteristic structures** | Any characteristic structures in the underlying SAP BW source results in an explosion of measures being exposed in Power BI. For example, with two measures `Sales` and `Costs`, and a characteristic structure containing Budget and Actual, four measures are exposed: `Sales.Budget`, `Sales.Actual`, `Costs.Budget`, `Costs.Actual`. |
Related content
---------------
For more information about DirectQuery, check out the following resources:
* [DirectQuery in Power BI](desktop-directquery-about)
* [Data Sources supported by DirectQuery](power-bi-data-sources)
* [DirectQuery and SAP HANA](desktop-directquery-sap-hana)
* * *
Feedback
--------
Was this page helpful?
Yes No
[Provide product feedback](https://ideas.fabric.microsoft.com/?forum=2d80fd4a-16cb-4189-896b-e0dac5e08b41)
| [Ask the community](https://community.fabric.microsoft.com/powerbi)
* * *
Additional resources
--------------------
---
# Use Kerberos for single sign-on (SSO) to SAP HANA - Power BI | Microsoft Learn
Table of contents Exit focus mode
Ask Learn Ask Learn [Read in English](# "Read in English")
Save[](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-gateway-sso-kerberos-sap-hana.md "Edit This Document")
Table of contents [Read in English](# "Read in English")
Add Add to plan [Edit](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-gateway-sso-kerberos-sap-hana.md "Edit This Document")
* * *
#### Share via
[Facebook](#)
[x.com](#)
[LinkedIn](#)
[Email](#)
* * *
Print
* * *
Note
Access to this page requires authorization. You can try [signing in](#)
or changing directories.
Access to this page requires authorization. You can try changing directories.
Use Kerberos for SSO to SAP HANA
================================
* Article
* 2024-10-10
* 18 contributors
Feedback
This article describes how to configure your SAP HANA data source to enable single sign-on (SSO) from the Power BI service.
Important
Because [SAP no longer supports OpenSSL](https://help.sap.com/viewer/b3ee5778bc2e4a089d3299b82ec762a7/2.0.05/en-US/de15ffb1bb5710148386ffdfd857482a.html)
, Microsoft has also discontinued its support. Your existing connections continue to work but you can no longer create new connections. Use SAP Cryptographic Library (CommonCryptoLib), or sapcrypto, instead.
Note
Before you attempt to refresh an SAP HANA-based report that uses Kerberos SSO, complete the steps in both this article and [Configure Kerberos-based SSO](service-gateway-sso-kerberos)
.
Enable SSO for SAP HANA
-----------------------
To enable SSO for SAP HANA, complete the following steps:
1. Ensure the SAP HANA server is running the required minimum version, which depends on your SAP HANA server platform level:
* [HANA 2 SPS 01 Rev 012.03](https://launchpad.support.sap.com/#/notes/2557386)
* [HANA 2 SPS 02 Rev 22](https://launchpad.support.sap.com/#/notes/2547324)
* [HANA 1 SP 12 Rev 122.13](https://launchpad.support.sap.com/#/notes/2528439)
2. On the gateway computer, install the latest SAP HANA ODBC driver. The minimum version is HANA ODBC version 2.00.020.00 from August 2017.
3. Ensure that the SAP HANA server has been configured for Kerberos-based SSO. For more information about setting up SSO for SAP HANA by using Kerberos, see [Single sign-on using Kerberos](https://help.sap.com/viewer/b3ee5778bc2e4a089d3299b82ec762a7/2.0.03/1885fad82df943c2a1974f5da0eed66d.html)
. Also see the links from that page, particularly SAP Note 1837331 – HOWTO HANA DBSSO Kerberos/Active Directory.
We also recommend following these extra steps, which can yield a small performance improvement:
1. In the gateway installation directory, look for and open this configuration file: _Microsoft.PowerBI.DataMovement.Pipeline.GatewayCore.dll.config_.
2. Look for the `FullDomainResolutionEnabled` property and change its value to `True`.
True
3. [Run a Power BI report](service-gateway-sso-kerberos#section-3-validate-configuration)
.
Troubleshoot
------------
This section provides instructions for troubleshooting using Kerberos for single sign-on (SSO) to SAP HANA in the Power BI service. By using these troubleshooting steps, you can self-diagnose and correct many issues you might be facing.
To follow the steps in this section, you need to [collect gateway logs](/en-us/data-integration/gateway/service-gateway-tshoot#collect-logs-from-the-on-premises-data-gateway-app)
.
### TLS/SSL error (certificate)
This issue has multiple symptoms.
* When you try to add a new data source, you might see an error like the following message:
Unable to connect: We encountered an error while trying to connect to.
Details: "We could not register this data source for any gateway
instances within this cluster.
Please find more details below about specific errors for each gateway instance."
* When you try to create or refresh a report, you might see the following error message:
[](media/service-gateway-sso-kerberos-sap-hana/sap-hana-kerberos-troubleshooting-01.png#lightbox)
* When you investigate the _Mashup\[date\]\*.log_, you see the following error message:
A connection was successfully established with the server,
but then an error occurred during the login process and
the certificate chain was issued by an authority that is not trusted.
#### Resolution
To resolve this TLS/SSL error, go to the data source connection. Then, in the **Validate Server Certificate section**, disable the setting, as shown in the following image:

After you've disabled this setting, the error message no longer appears.
### Impersonation
Log entries for impersonation contain entries similar to:
About to impersonate user DOMAIN\User (IsAuthenticated: True, ImpersonationLevel: Impersonation).
The important element in this log entry is the information that's displayed after the `ImpersonationLevel:` entry. Any value different from `Impersonation` reveals that impersonation isn't occurring properly.
#### Resolution
You can set up `ImpersonationLevel` properly by following the instructions in [Grant the gateway service account local policy rights on the gateway](service-gateway-sso-kerberos#step-6-grant-the-gateway-service-account-local-policy-rights-on-the-gateway-machine)
.
After you've changed the configuration file, restart the gateway service for the change to take effect.
#### Validation
Refresh or create the report, and then collect the gateway logs. Open the most recent _GatewayInfo_ file and check the following string: `About to impersonate user DOMAIN\User (IsAuthenticated: True, ImpersonationLevel: Impersonation)`. Make sure that the `ImpersonationLevel` setting returns `Impersonation`.
### Delegation
Delegation issues usually appear in the Power BI service as generic errors. To make sure that the issue isn't a delegation issue, collect Wireshark traces and use _Kerberos_ as a filter. To learn more about Wireshark, and for information about Kerberos errors, see [Kerberos errors in network captures](/en-us/archive/blogs/askds/kerberos-errors-in-network-captures)
.
The following symptoms and troubleshooting steps can help remedy some common issues.
#### SPN issues
If you see the following error: `The import [table] matches no exports. Did you miss a module reference?:` while investigating the _Mashup\[date\]\*.log_, then you're experiencing service principal name (SPN) issues.
When you investigate further by using Wireshark traces, you reveal the error `KRB4KDC_ERR_S_PRINCIPAL_UNKOWN`, which means that the SPN wasn't found or doesn't exist. The following image shows an example:
[](media/service-gateway-sso-kerberos-sap-hana/sap-hana-kerberos-troubleshooting-07.png#lightbox)
#### Resolution
To resolve SPN issues like this one, you must add an SPN to a service account. For more information, see the SAP documentation in [Configure Kerberos for SAP HANA database Hosts](https://help.sap.com/viewer/6b94445c94ae495c83a19646e7c3fd56/LATEST/en-US/c786f2cfd976101493dfdf14cf9bcfb1.html)
.
In addition, follow the resolution instructions described in the next section.
#### No credentials issues
There might not be clear symptoms associated with this issue. When you investigate the _Mashup\[date\]\*.log_, you see the following error:
29T20:21:34.6679184Z","Action":"RemoteDocumentEvaluator/RemoteEvaluation/HandleException","HostProcessId":"1396","identity":"DirectQueryPool","Exception":"Exception:\r\nExceptionType: Microsoft.Mashup.Engine1.Runtime.ValueException, Microsoft.MashupEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35\r\nMessage:
When you investigate the same file further, the following (unhelpful) error appears:
No credentials are available in the security package
Capturing Wireshark traces reveals the following error: `KRB5KDC_ERR_BADOPTION`.
[](media/service-gateway-sso-kerberos-sap-hana/sap-hana-kerberos-troubleshooting-08.png#lightbox)
Usually, these errors mean that the SPN _hdb/hana2-s4-sso2.westus2.cloudapp.azure.com_ file could be found but isn't in the **Services to which this account can present delegated credentials** list on the **Delegation** pane in the gateway service account.
#### Resolution
To resolve the _No credentials_ issue, follow the steps described in [Configure Kerberos constrained delegation](service-gateway-sso-kerberos#step-4-configure-kerberos-constrained-delegation)
. When completed properly, the Delegation pane in the gateway service account reflects the HansaWorld Database (HDB) file and fully qualified domain name (FQDN) in the list of **Services to which this account can present delegated credentials**.
#### Validation
Following the preceding steps should resolve the issue. If you still experience Kerberos issues, you might have a misconfiguration in the Power BI gateway or in the HANA server itself.
### Credentials errors
If you experience credentials errors, errors in the logs or traces expose errors that describe `Credentials are invalid` or similar errors. These errors might manifest differently on the data source side of the connection, such as SAP HANA. The following image shows an example error:
[](media/service-gateway-sso-kerberos-sap-hana/sap-hana-kerberos-troubleshooting-092.png#lightbox)
#### Symptom 1
In HANA authentication traces, you might see entries similar to the following message:
[Authentication|manager.cpp:166] Kerberos: Using Service Principal
Name johnny@contoso.com@CONTOSO.COM with name type: GSS_KRB5_NT_PRINCIPAL_NAME
[Authentication|methodgssinitiator.cpp:367] Got principal name:
johnny@contoso.com@CONTOSO.COM
#### Resolution
Follow the instructions described in [Set user-mapping configuration parameters on the gateway machine](service-gateway-sso-kerberos#set-user-mapping-configuration-parameters-on-the-gateway-machine)
, even if you've already configured the **Microsoft Entra Connect** service.
#### Validation
After you've completed the validation, you can successfully load the report in the Power BI service.
#### Symptom 2
In HANA authentication traces, you might see entries similar to the following entry:
Authentication ManagerAcceptor.cpp(00233) : Extending list of expected
external names by johnny@CONTOSO.COM (method: GSS) Authentication
AuthenticationInfo.cpp(00168) : ENTER getAuthenticationInfo
(externalName=johnny@CONTOSO.COM) Authentication AuthenticationInfo.cpp(00237) :
Found no user with expected external name!
#### Resolution
Check the Kerberos external ID under **HANA User** to determine whether the IDs match properly.
#### Validation
After you've resolved the issue, you can create or refresh reports in the Power BI service.
Related content
---------------
For more information about the on-premises data gateway and DirectQuery, see the following resources:
* [What is an on-premises data gateway?](/en-us/data-integration/gateway/service-gateway-onprem)
* [DirectQuery in Power BI](desktop-directquery-about)
* [Data sources supported by DirectQuery](power-bi-data-sources)
* [DirectQuery and SAP Business Warehouse (BW)](desktop-directquery-sap-bw)
* [DirectQuery and SAP HANA](desktop-directquery-sap-hana)
* * *
Feedback
--------
Was this page helpful?
Yes No
[Provide product feedback](https://ideas.fabric.microsoft.com/?forum=2d80fd4a-16cb-4189-896b-e0dac5e08b41)
| [Ask the community](https://community.fabric.microsoft.com/powerbi)
* * *
Additional resources
--------------------
---
# Get data from Excel workbook files - Power BI | Microsoft Learn
Table of contents Exit focus mode
Ask Learn Ask Learn [Read in English](# "Read in English")
Save[](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-excel-workbook-files.md "Edit This Document")
Table of contents [Read in English](# "Read in English")
Add Add to plan [Edit](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-excel-workbook-files.md "Edit This Document")
* * *
#### Share via
[Facebook](#)
[x.com](#)
[LinkedIn](#)
[Email](#)
* * *
Print
* * *
Note
Access to this page requires authorization. You can try [signing in](#)
or changing directories.
Access to this page requires authorization. You can try changing directories.
Get data from Excel workbook files
==================================
* Article
* 2025-03-12
* 17 contributors
Feedback
Microsoft Excel is one of the most widely used business applications and one of the most common data sources for Power BI.
Supported workbooks
-------------------
Power BI supports importing or connecting to workbooks created in Excel 2007 and later. Some features that this article describes are available only in later versions of Excel. Workbooks must be in the .xlsx or .xlsm file type and be smaller than 1 GB.
Important
The following capabilities are deprecated and will no longer be available starting September 29th, 2023:
* Upload of local workbooks to Power BI workspaces will no longer be allowed.
* Configuring scheduling of refresh and refresh now for Excel files that don’t already have scheduled refresh configured will no longer be allowed.
The following capabilities are deprecated and will no longer be available starting October 31, 2023:
* Scheduled refresh and refresh now for existing Excel files that were previously configured for scheduled refresh will no longer be allowed.
* Local workbooks uploaded to Power BI workspaces will no longer open in Power BI.
After October 31, 2023:
* You can download existing local workbooks from your Power BI workspace.
* You can publish your Excel data model as a Power BI semantic model and schedule refresh.
* You can import Excel workbooks from OneDrive and SharePoint Document libraries to view them in Power BI.
If your organization uses these capabilities, see more details in [Migrating your Excel workbooks](#migrating-your-excel-workbooks)
.
### Workbooks with ranges or tables of data
If your workbook contains simple worksheets with ranges of data, be sure to format those ranges as tables to get the most out of your data in Power BI. When you create reports in Power BI, the named tables and columns in the **Tables** pane make it much easier to visualize your data.
### Workbooks with data models
A workbook can contain a data model that has one or more tables of data loaded into it via linked tables, Power Query, **Get & Transform Data** in Excel, or Power Pivot. Power BI supports all data model properties, like relationships, measures, hierarchies, and key performance indicators (KPIs).
Note
You can't share workbooks that contain data models across Power BI tenants. For example, a user who signs in to Power BI with a `contoso.com` account can't share a workbook containing data models with a user who signs in with a `woodgrovebank.com` account.
### Workbooks with connections to external data sources
If your Excel workbook connects to an external data source, after your workbook is in Power BI, you can create reports and dashboards based on data from that connected source. You can also set up scheduled refresh to automatically connect to the data source and get updates. You no longer need to refresh manually by using **Get Data** in Excel. Visualizations in reports and dashboard tiles that are based on the data source update automatically. For more information, see [Data refresh in Power BI](refresh-data)
.
### Workbooks with PivotTables and charts
Whether and how your PivotTables and charts appear in Power BI depends on where you save your workbook file, and how you choose to get the file into Power BI. The rest of this article explains the options.
Data types
----------
Assign specific data types to data in Excel to improve your Power BI experience. Power BI supports these data types:
* Whole number
* Decimal number
* Currency
* Date
* True/false
* Text
Import or upload Excel data
---------------------------
There are two ways to explore Excel data in Power BI: upload and import. When you upload your workbook, it appears in Power BI just like it would in Excel Online. But you also have some great features to help you pin elements from your worksheets to your dashboards. When you import your data, Power BI imports any supported data in tables and any data model into a new Power BI semantic model.
### Upload to Power BI
You can use the **Upload** button to upload files to the Power BI service. In the workspace where you want to add the file, select **Upload** at the top of the page. In the drop-down list, select:
* **OneDrive** to connect to files that are stored in OneDrive.
* **SharePoint** to connect to files on any SharePoint site that you have access to.
* **Browse** to upload files from your computer.

If you upload a local file, Power BI adds a copy of the file to the workspace. If you use the **OneDrive for Business** or **SharePoint** options, Power BI creates a connection to the file. As you make changes to the file in SharePoint or OneDrive, Power BI automatically syncs those changes about once an hour.
When you connect to an Excel file by using OneDrive, you can't edit your workbook in Power BI. If you need to make changes, you can select **Edit** and then choose to edit your workbook in Excel Online or open it in Excel on your computer. Changes are saved to the workbook on OneDrive.
You should connect to or upload data if you have only data in worksheets, or if you have ranges, PivotTables, and charts that you want to pin to dashboards.
Local Excel workbooks open in Excel Online within Power BI. Unlike Excel workbooks stored on OneDrive or SharePoint team sites, you can't edit local Excel files within Power BI.
If you use Excel 2016 and later, you can also use **File** > **Publish** > **Upload** from Excel. For more information, see [Publish to Power BI from Microsoft Excel](service-publish-from-excel)
.
After your workbook uploads, it appears in the list of content in the workspace:

This upload method is easy to use, and the **OneDrive for Business** and **SharePoint** options use the same file selection interface as many other Microsoft products. Rather than entering a URL to a SharePoint or OneDrive location, you can select one of your sites by using the **Quick access** section or selecting **More places**.
If you don't have a subscription, the **OneDrive for Business** and **SharePoint** options are unavailable, but you can still select **Browse** to get local files from your computer. This image shows the unavailable options, but the **Browse** option is enabled:

You can't use **Upload** to get files from personal OneDrive accounts, but you can upload files from your computer.
### Import Excel data into Power BI
To import Excel data into Power BI, in **My workspace**, select **New item** > **Semantic model** > **Excel**, and then find the file.
The **My files** list allows you to add files from your documents folder and other personal sources.
You can use the **Quick access** list on the left side of the window to add files from SharePoint sites and other shared sources.
Select **Browse this device** to add files from the device you're currently using.
When you import Excel data, Power BI imports any supported data in tables and any data model into a new Power BI semantic model.
You should import your data if you used **Get & Transform Data** or **Power Pivot** to load data into a data model.
If you upload from OneDrive for Business, when you save changes, Power BI synchronizes them with the semantic model in Power BI, usually within about an hour. You can also select **Publish** to export your changes immediately. Any visualizations in reports and dashboards also update, based on the following refresh triggers:
| Report tiles | Dashboard tiles |
| --- | --- |
| Open the report, after the cache expires. | Open the dashboard, after the cache refreshes. |
| Select **Refresh** in the report. | Select **Refresh** in the dashboard. |
| | Automatically for pinned tiles when the cache refreshes, if the dashboard is already open. |
Note
Pinned report pages don't support the automatic refresh feature.
Where to save your workbook file
--------------------------------
Where you save your workbook file makes a difference.
* **Local**. If you save your workbook file to a drive on your computer or another location in your organization, you can load your file into Power BI. Your file actually remains on the source drive. When you import the file, Power BI creates a new semantic model and loads data and any data model from the workbook into the semantic model.
Local Excel workbooks open in Excel Online within Power BI. Unlike Excel workbooks stored on OneDrive or SharePoint team sites, you can't edit local Excel files within Power BI.
Excel also has a **Publish** command on the **File** menu. Using this **Publish** command is effectively the same as using **Upload** > **Browse** from Power BI. If you regularly make changes to the workbook, it's often easier to update your semantic model in Power BI.
* **OneDrive**. Signing in to OneDrive with the same account as Power BI is the most effective way to keep your work in Excel in sync with your Power BI semantic model, reports, and dashboards. Both Power BI and OneDrive are in the cloud, and Power BI connects to your workbook file on OneDrive about once an hour. If Power BI finds any changes, it automatically updates your Power BI semantic model, reports, and dashboards.
As when you have a file saved to a local drive, you can use **Publish** in Excel to update your Power BI semantic model and reports immediately. Otherwise, Power BI automatically synchronizes, usually within an hour.
* **SharePoint team site**. Saving your Power BI Desktop files to a SharePoint team site is almost the same as saving them to OneDrive. The biggest difference is how you connect to the file from Power BI. You can specify a URL or connect to the root folder.
Publish from Excel to your Power BI site
----------------------------------------
Using the Excel **Publish to Power BI** feature is effectively the same as using Power BI to import or connect to your file. For more information, see [Publish to Power BI from Microsoft Excel](service-publish-from-excel)
.
Note
If you upload an Excel workbook that's connected to an on-premises SQL Server Analysis Services (SSAS) cube, you can't refresh the underlying data model in the Power BI service.
Migrating your Excel workbooks
------------------------------
For local Excel workbooks uploaded to a Power BI workspace, use the **Download Excel file** option to download the workbook. Then save it to OneDrive or a SharePoint Document library (ODSP). You can then import the workbook from ODSP to the workspace again.

To refresh data in Excel data models, you'll need to publish the data model as a Power BI semantic model. We recommend using Power BI Desktop to import the model because it upgrades your data model to the latest version. This gives you the best future experience. Use the **Import** from **Power Query, Power Pivot, Power View** option on Power BI Desktop's **File** menu.
To build new workbooks connected to a semantic data model in your Excel workbook, you should first publish the data model as a Power BI semantic model. Then in Excel use the **From Power BI (Microsoft)** option to connect your workbook to the semantic model. This option is available in the **Data ribbon**, under **Get Data** in the **From Power Platform** menu.
For cases where you include a workbook in a Power BI organizational app, remember to republish the app with the new items.
To learn which workbooks can be affected by the deprecation of local workbooks and refresh capabilities, use the **workbooks** Power BI admin REST API. It lists the workbooks in your organization. You must be a Fabric administrator to call this API.
GET https://api.powerbi.com/v1.0/myorg/admin/workbooks
The API provides a list of all the Excel workbooks published in your organization. The list is formatted in JSON.
Below is an example output for the API.
[\
{\
"DisplayName": "Workbook without a Data Model",\
"WorkspaceName": "My workspace",\
"HasDataModel": false,\
"HasScheduledRefreshOnDataModel": false,\
"UploadedOn": "2023-07-28T10:54:17.093"\
},\
{\
"DisplayName": "Workbook with Data Model",\
"WorkspaceName": "My workspace",\
"HasDataModel": true,\
"HasScheduledRefreshOnDataModel": true,\
"UploadedBy": "user@contoso.com",\
"UploadedOn": "2022-11-16T09:51:17.497"\
}\
]
You can check if the Excel workbook is a local workbook by navigating to it in Power BI and seeing if the Download Excel file option is available.
You can use PowerShell to call the API as shown in the example below:
Invoke-PowerBIRestMethod -Url "https://api.powerbi.com/v1.0/myorg/admin/workbooks" -Method GET
To use PowerShell, first install the required **MicrosoftPowerBIMgmt** module. See [Power BI Cmdlets reference](/en-us/powershell/power-bi/overview)
for details. You'll need to call **Login-PowerBIServiceAccount** commandlet before calling **Invoke-PowerBIRestMethod**.
Troubleshooting and limitations
-------------------------------
* If your workbook file is too large, see [Reduce the size of an Excel workbook to view it in Power BI](reduce-the-size-of-an-excel-workbook)
.
* The upload of Excel workbooks to a Power BI workspace isn't supported for sovereign cloud customers.
* You can't use scheduled refresh for Excel workbooks that have connections to on-premises SSAS tabular models through a gateway.
Related content
---------------
* **Explore your data**. After you upload data and reports from your file into Power BI, you can select the new semantic model to explore the data. When you select the workbook, it opens in Power BI the same as if it were in Excel Online.
* **Schedule refresh**. If your Excel workbook connects to external data sources, or if you imported from a local drive, you can set up scheduled refresh to make sure your semantic model or report is always up-to-date. In most cases, setting up scheduled refresh is easy to do. For more information, see [Data refresh in Power BI](refresh-data)
.
* [**Publish to Power BI from Microsoft Excel**](service-publish-from-excel)
.
* * *
Feedback
--------
Was this page helpful?
Yes No
[Provide product feedback](https://ideas.fabric.microsoft.com/?forum=2d80fd4a-16cb-4189-896b-e0dac5e08b41)
| [Ask the community](https://community.fabric.microsoft.com/powerbi)
* * *
Additional resources
--------------------
---
# Get data from Power BI Desktop files - Power BI | Microsoft Learn
Table of contents Exit focus mode
Ask Learn Ask Learn [Read in English](# "Read in English")
Save[](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-desktop-files.md "Edit This Document")
Table of contents [Read in English](# "Read in English")
Add Add to plan [Edit](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-desktop-files.md "Edit This Document")
* * *
#### Share via
[Facebook](#)
[x.com](#)
[LinkedIn](#)
[Email](#)
* * *
Print
* * *
Note
Access to this page requires authorization. You can try [signing in](#)
or changing directories.
Access to this page requires authorization. You can try changing directories.
Get data from Power BI Desktop files
====================================
* Article
* 2025-02-28
* 8 contributors
Feedback

Power BI Desktop makes business intelligence and reporting easy. Whether you're connecting to 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](../fundamentals/desktop-getting-started)
.
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 service.
Where your file is saved makes a difference
-------------------------------------------
There are several locations where you might store Power BI Desktop files:
* **Local**. If you save your file to a local drive on your computer or another location in your organization, you can _import_ your file, or you can _publish_ from Power BI Desktop to get its data and reports into the Power BI service.
Your file remains on your local drive. The whole file isn't moved into Power BI. A new semantic model is created in Power BI and data and the data model from the Power BI Desktop file are loaded into the semantic model. If your file has any reports, those reports appear in your Power BI service site under **Reports**.
* **OneDrive for work or school**. By far, the most effective way to keep your work in Power BI Desktop in sync with the Power BI service is to use your OneDrive for work or school and sign in with the same account as the Power BI service. Your work includes semantic model, reports, and dashboards. Because both the Power BI service and OneDrive are in the cloud, Power BI _connects_ to your file on OneDrive about every hour. If it finds any changes, your semantic model, reports, and dashboards are updated in the Power BI service.
* **OneDrive - Personal**. If you save your files to your own OneDrive account, you get many of the same benefits as you would with OneDrive for work or school. The biggest difference is when you first connect to your file, you need to sign in to your OneDrive with your Microsoft account. This account is usually different from what you use to sign in to the Power BI service.
When signing in with your OneDrive with your Microsoft account, be sure to select the **Keep me signed in** option. This way, the Power BI service can connect to your file about every hour and make sure that your semantic model in the Power BI service is in-sync.
* **SharePoint Team-Sites**. Saving your Power BI Desktop files to SharePoint – Team Sites is much the same as saving to OneDrive for work or school. The biggest difference is how you connect to the file from the Power BI service. You can specify a URL or connect to the root folder. You can also [set up a Sync folder](https://support.microsoft.com/office/sync-sharepoint-and-teams-files-with-the-onedrive-sync-app-6de9ede8-5b6e-4503-80b2-6190f3354a88)
that points to the SharePoint folder. Files in that folder sync up with the ones on SharePoint.
Streamlined upload to Power BI
------------------------------
Beginning in November 2022, there's a new and streamlined experience for uploading files to the Power BI service. In the workspace into which you want to add files, you see an **Upload** dropdown menu option next to the **New** button. You can use the dropdown menu to connect to files stored in _OneDrive for work or school_ or any _SharePoint_ site to which you have access, or you can upload them from your computer through the _Browse_ menu option. The following image shows the menu options.

If you choose to upload a local file, a copy of the file is added to the workspace. If you use the _OneDrive for work or school_ or _SharePoint_ option, the Power BI service creates a connection to the file and as you make changes to the file in SharePoint, Power BI can automatically sync those changes approximately each hour.
A benefit of uploading files this way, in addition to being easy to use, is that the _OneDrive for work or school_ and _SharePoint_ options use the same file selection interface used in many other Microsoft products.
Rather than having to paste a direct URL to a given SharePoint site, which was previously required, you can now simply select one of your sites through the _Quick access_ section or the _More places_ links.
When you upload an Excel file this way, your workbook appears in the Power BI service just like it would in Excel Online, as shown in the following image.

If you don't have a subscription, _OneDrive for work or school_ and _SharePoint_ options are disabled, but you can still _browse_ for local files on your computer. The following image shows the subscription options disabled, with the _Browse_ option highlighted.

Note
You can't upload files from SharePoint Document set folder or from personal OneDrive accounts.
Publish a file from Power BI Desktop to the Power BI service
------------------------------------------------------------
Using **Publish** from Power BI Desktop is similar uploading files in the Power BI service. Both initially import your file data from a local drive or connect to it on OneDrive. However, there are differences. If you upload from a local drive, refresh that data frequently to ensure the online and local copies of the data are current with each other.
Here's the quick how to, but you can see [Publish from Power BI Desktop](../create-reports/desktop-upload-desktop-files)
to learn more.
1. In Power BI Desktop, select **File** > **Publish** > **Publish to Power BI**, or select **Publish** on the ribbon.

2. Sign in to the Power BI service. You only need to sign in the first time.
When complete, you get a link to open your report in your Power BI site.

Related content
---------------
* **Explore your data**: Once you get data and reports from your file into the Power BI service, it's time to explore. If your file already has reports in it, they appear in the navigator pane in **Reports**. If your file just had data, you can create new reports; just right-click the new semantic model and then select **Explore**.
* **Refresh external data sources**: If your Power BI Desktop file connects to external data sources, you can set up scheduled refresh to make sure your semantic model is always up-to-date. In most cases, setting up scheduled refresh is easy to do, but going into the details is outside the scope of this article. See [Data refresh in Power BI](refresh-data)
to learn more.
* * *
Feedback
--------
Was this page helpful?
Yes No
[Provide product feedback](https://ideas.fabric.microsoft.com/?forum=2d80fd4a-16cb-4189-896b-e0dac5e08b41)
| [Ask the community](https://community.fabric.microsoft.com/powerbi)
* * *
Additional resources
--------------------
---
# Share access to a semantic model - Power BI | Microsoft Learn
Table of contents Exit focus mode
Ask Learn Ask Learn [Read in English](# "Read in English")
Save[](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-datasets-share.md "Edit This Document")
Table of contents [Read in English](# "Read in English")
Add Add to plan [Edit](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-datasets-share.md "Edit This Document")
* * *
#### Share via
[Facebook](#)
[x.com](#)
[LinkedIn](#)
[Email](#)
* * *
Print
* * *
Note
Access to this page requires authorization. You can try [signing in](#)
or changing directories.
Access to this page requires authorization. You can try changing directories.
Share access to a semantic model
================================
* Article
* 2024-07-24
* 9 contributors
Feedback
To make it possible for other users to take advantage of a semantic model, you can _share_ it with them. Sharing a semantic model means granting access to it. This document shows you how to grant access to a semantic model using the **Share semantic model** dialog.
Share a semantic model
----------------------
To share a semantic model
1. From either the semantic model's options menu on the [OneLake data hub](/en-us/fabric/get-started/onelake-data-hub#open-an-items-options-menu)
or from the [data details page](service-dataset-details-page#supported-actions)
, choose **Share** as follows:
* **OneLake data hub**: In the data items list, open the [options menu](/en-us/fabric/get-started/onelake-data-hub#open-an-items-options-menu)
and select **Share**. On a recommended data item tile, choose **Share** on the **More options (…)** menu.

* **Semantic model details page**: Click the **Share** icon on the action bar at the top of the page.

2. In the **Share semantic model** dialog that appears, enter the names or email addresses of the specific people or groups (distribution groups or security groups) that you want to grant access to, then choose the types of access you wish to grant. You can optionally choose to send them an email notifying them that they've been granted access.

* **Allow allow recipients to modify this semantic model**: This option allows the recipients to modify the semantic model.
* **Allow recipients to share this semantic model**: This option allows the recipients to grant access to other users via sharing.
* **Allow recipients to build content with the data associated with this semantic model**: This option grants the recipients [Build permission](service-datasets-build-permissions)
on the semantic model, which enables them to build new reports and dashboards based on the data associated it.
If you clear this checkbox, the user will get **read-only** permission on the semantic model. Read-only permission allows them to explore the semantic model on the [semantic model's info page](service-dataset-details-page)
but doesn't allow them to build new content based on the semantic model.
* **Send an email notification**: When this option is selected, an email will be sent to the recipients notifying them that they have been granted access to the semantic model. You can add an optional message to the email message.
3. Click **Grant access**.
Note
When you press **Grant access**, access is granted automatically. No further approval is required.
To monitor, change, or remove user access to your semantic model, see [Manage semantic model access permissions](service-datasets-manage-access-permissions)
.
Related content
---------------
* [Semantic model permissions](service-datasets-permissions)
* [Manage semantic model access permissions](service-datasets-manage-access-permissions)
* [Use semantic models across workspaces](service-datasets-across-workspaces)
* [Share a report via link](../collaborate-share/service-share-dashboards#share-a-report-via-link)
* Questions? [Try asking the Power BI Community](https://community.powerbi.com/)
* * *
Feedback
--------
Was this page helpful?
Yes No
[Provide product feedback](https://ideas.fabric.microsoft.com/?forum=2d80fd4a-16cb-4189-896b-e0dac5e08b41)
| [Ask the community](https://community.fabric.microsoft.com/powerbi)
* * *
Additional resources
--------------------
---
# Use Kerberos single sign-on to SAP BW using CommonCryptoLib - Power BI | Microsoft Learn
Table of contents Exit focus mode
Ask Learn Ask Learn [Read in English](# "Read in English")
Save[](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-gateway-sso-kerberos-sap-bw-commoncryptolib.md "Edit This Document")
Table of contents [Read in English](# "Read in English")
Add Add to plan [Edit](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-gateway-sso-kerberos-sap-bw-commoncryptolib.md "Edit This Document")
* * *
#### Share via
[Facebook](#)
[x.com](#)
[LinkedIn](#)
[Email](#)
* * *
Print
* * *
Note
Access to this page requires authorization. You can try [signing in](#)
or changing directories.
Access to this page requires authorization. You can try changing directories.
Use Kerberos single sign-on for SSO to SAP BW using CommonCryptoLib (sapcrypto.dll)
===================================================================================
* Article
* 2024-10-21
* 11 contributors
Feedback
This article describes how to configure your SAP BW data source to enable single sign-on (SSO) from the Power BI service by using CommonCryptoLib (sapcrypto.dll).
Note
Before you attempt to refresh an SAP BW-based report that uses Kerberos SSO, complete both the steps in this article and the steps in [Configure Kerberos-based SSO](service-gateway-sso-kerberos)
. Using CommonCryptoLib as your Secure Network Communications (SNC) library enables SSO connections to both SAP BW Application Servers and SAP BW Message Servers.
Note
Configuring both libraries(sapcrypto and gx64krb5) on the same gateway server is an unsupported scenario. It's not recommended to configure both libraries on the same gateway server as it'll lead to a mix of libraries. If you want to use both libraries, please fully separate the gateway server. For example, configure gx64krb5 for server A then sapcrypto for server B. Please remember that any failure on server A which uses gx64krb5 is not supported, as gx64krb5 is no longer supported by SAP and Microsoft.
Configure SAP BW to enable SSO using CommonCryptoLib
----------------------------------------------------
Note
The on-premises data gateway is 64-bit software and therefore requires the 64-bit version of CommonCryptoLib (sapcrypto.dll) to perform BW SSO. If you plan to test the SSO connection to your SAP BW server in SAP GUI prior to attempting an SSO connection through the gateway (recommended), you'll also need the 32-bit version of CommonCryptoLib, as SAP GUI is 32-bit software.
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](https://blogs.sap.com/2017/07/27/sap-single-sign-on-authenticate-with-kerberosspnego/)
. 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](https://help.sap.com/viewer/df185fd53bb645b1bd99284ee4e4a750/3.0/360534094511490d91b9589d20abb49a.html)
.
2. If you haven't already done so, install the x64-version of the [SAP .NET Connector](https://support.sap.com/en/product/connectors/msnet.html)
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 global assembly cache.
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](https://launchpad.support.sap.com/#/notes/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 AD 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 Connections and 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 Server** if you want to create an SSO connection to a BW Message Server.
8. For **SNC Library**, 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 Partner Name**, enter the SNC Name of the BW server. Under **Advanced settings**, ensure that **Use SSO via Kerberos for DirectQuery 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.

12. [Run a Power BI report](service-gateway-sso-kerberos#section-3-validate-configuration)
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](/en-us/data-integration/gateway/service-gateway-app)
, and select **Export 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's a snippet from a CPIC trace file where a .dll load error occurred:
[Thr 7228] *** ERROR => DlLoadLib()==DLENOACCESS - LoadLibrary("C:\Users\test\Desktop\sapcrypto.dll")
Error 5 = "Access is denied." [dlnt.c 255]
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](#configure-sap-bw-to-enable-sso-using-commoncryptolib)
, 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](/en-us/windows/security/threat-protection/auditing/apply-a-basic-audit-policy-on-a-file-or-folder)
. 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 AD 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: \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
Access Request Information:
Transaction ID: {00000000-0000-0000-0000-000000000000}
Accesses: ReadAttributes
Access Reasons: ReadAttributes: Not granted
Access Mask: 0x80
Privileges Used for Access Check: -
Restricted SID Count: 0
### 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=:\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 = :\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](https://launchpad.support.sap.com/#/notes/2491573)
(SAP s-user required).
### Impersonation
This section describes troubleshooting symptoms and resolution steps for impersonation issues.
**Symptom**: When looking at the _GatewayInfo\[date\].log_ you find an entry similar to the following: **About to impersonate user DOMAIN\\User (IsAuthenticated: True, ImpersonationLevel: Impersonation)**. If the value for **ImpersonationLevel** is different from **Impersonation**, impersonation isn't happening properly.
**Resolution**: Follow the steps found in [grant the gateway service account local policy rights on the gateway machine](service-gateway-sso-kerberos)
article. Restart the gateway service after changing the configuration.
**Validation**: Refresh or create the report and collect the _GatewayInfo\[date\].log_. Open the latest GatewayInfo log file and check again the string **About to impersonate user DOMAIN\\User (IsAuthenticated: True, ImpersonationLevel: Impersonation)** to ensure that the value for **ImpersonationLevel** matches **Impersonation**.
### Delegation
Delegation issues usually appear in the Power BI service as generic errors. To determine whether delegation is the issue, it's useful to collect the Wireshark traces and use _Kerberos_ as a filter. For Kerberos errors reference, consult [this blog post](/en-us/archive/blogs/askds/kerberos-errors-in-network-captures)
. The rest of this section describes troubleshooting symptoms and resolution steps for delegation issues.
**Symptom**: In the Power BI service, you might encounter an unexpected error similar to the one in the following screenshot. In _GatewayInfo\[date\].log_ you'll see _\[DM.GatewayCore\]_ ingesting an exception during the ADO query execution attempt for _clientPipelineId_ and the import _\[0D\_NW\_CHANN\]_ matches no exports.

In the _Mashup\[date\].log_ you see the generic error **GSS-API(maj): No credentials were supplied**.
Looking into the CPIC traces (_sec-Microsoft.Mashup_.trc\*) you'll see something similar to the following:
[Thr 4896] *** ERROR => SncPEstablishContext() failed for target='p:CN=BW5' [sncxxall.c 3638]
[Thr 4896] *** ERROR => SncPEstablishContext()==SNCERR_GSSAPI [sncxxall.c 3604]
[Thr 4896] GSS-API(maj): No credentials were supplied
[Thr 4896] Unable to establish the security context
[Thr 4896] target="p:CN=BW5"
[Thr 4896] <<- SncProcessOutput()==SNCERR_GSSAPI
[Thr 4896]
[Thr 4896] LOCATION CPIC (TCP/IP) on local host HNCL2 with Unicode
[Thr 4896] ERROR GSS-API(maj): No credentials were supplied
[Thr 4896] Unable to establish the security context
[Thr 4896] target="p:CN=BW5"
[Thr 4896] TIME Thu Oct 15 20:49:31 2020
[Thr 4896] RELEASE 721
[Thr 4896] COMPONENT SNC (Secure Network Communication)
[Thr 4896] VERSION 6
[Thr 4896] RC -4
[Thr 4896] MODULE sncxxall.c
[Thr 4896] LINE 3604
[Thr 4896] DETAIL SncPEstablishContext
[Thr 4896] SYSTEM CALL gss_init_sec_context
[Thr 4896] COUNTER 3
[Thr 4896]
[Thr 4896] *** ERROR => STISEND:STISncOut failed 20 [r3cpic.c 9834]
[Thr 4896] STISearchConv: found conv without search
The error becomes clearer in the sectraces from the gateway machine _sec-Microsoft.Mashup.Con-\[\].trc_:
[2020.10.15 20:31:38.396000][4][Microsoft.Mashup.Con][Kerberos ][ 3616] AcquireCredentialsHandleA called successfully.
[2020.10.15 20:31:38.396000][2][Microsoft.Mashup.Con][Kerberos ][ 3616] InitializeSecurityContextA returned -2146893053 (0x80090303). Preparation for kerberos failed!
[2020.10.15 20:31:38.396000][2][Microsoft.Mashup.Con][Kerberos ][ 3616] Getting kerberos ticket for 'SAP/BW5' failed (user name is affonso_v@HANABQ.COM)
[2020.10.15 20:31:38.396000][2][Microsoft.Mashup.Con][Kerberos ][ 3616] Error for requested algorithm 18: 0/C000018B The security database on the server does not have a computer account for this workstation trust relationship.
[2020.10.15 20:31:38.396000][2][Microsoft.Mashup.Con][Kerberos ][ 3616] Error for requested algorithm 17: 0/C000018B The security database on the server does not have a computer account for this workstation trust relationship.
[2020.10.15 20:31:38.396000][2][Microsoft.Mashup.Con][Kerberos ][ 3616] Error for requested algorithm 23: 0/C000018B The security database on the server does not have a computer account for this workstation trust relationship.
[2020.10.15 20:31:38.396000][2][Microsoft.Mashup.Con][Kerberos ][ 3616] Error for requested algorithm 3: 0/C000018B The security database on the server does not have a computer account for this workstation trust relationship.
You can also see the issue if you look at WireShark traces.

Note
The other errors **KRB5KDC\_ERR\_PREAUTH\_REQUIRED** can be safely ignored.
**Resolution**: You must add an SPN SAP/BW5 to a service account. Detailed information and steps are available in the [SAP documentation](https://wiki.scn.sap.com/wiki/display/Security/Single+Sign-On+with+Kerberos%3A+Recommendations+and+Troubleshooting)
.
You might run into a similar, but not identical error that manifests in WireShark traces as the following error **KRB5KDC\_ERR\_BADOPTION**:

This error indicates the **SPN SAP/BW5** could be found, but it's not under _Services to which this account can present delegated credentials_ in the Delegation tab for the gateway service account. To fix this issue, follow the steps to [configure the gateway service account for standard kerberos constrained delegation](service-gateway-sso-kerberos)
.
**Validation**: Proper configuration will prevent generic or unexpected errors from being presented by the gateway. If you still see errors, check the configuration of the gateway itself, or the configuration of the BW server.
### Credentials errors
This section describes troubleshooting symptoms and resolution steps for credentials error issues. You might also see generic errors from the Power BI service, as described in the earlier section on [delegation](#delegation)
.
There are different resolutions, based on the symptoms you see in the data source (SAP BW), so we'll review both.
**Symptom 1**: In the _sectraces sec-disp+work\[\].trc_ file from the BW Server, you see traces similar to the following:
[2020.05.26 14:21:28.668325][4][disp+work ][SAPCRYPTOLIB][435584] { gss_display_name [2020.05.26 14:21:28.668338][4][disp+work ][GSS ][435584] gss_display_name output buffer (41 bytes) [2020.05.26 14:21:28.668338][4][disp+work ][GSS ][435584] CN=DAVID@XS.CONTOSO.COM@CONTOSO.COM
**Resolution**: Complete the configuration steps to [set user mapping configuration parameters on the gateway machine if necessary](service-gateway-sso-kerberos)
. You'll need to complete those steps even if you already have Microsoft Entra Connect configured.
**Validation**: You'll be able to successfully load the report in the Power BI service. If you're unable to load the report, see the steps in Symptom 2.
**Symptom 2**: In the _sectraces sec-disp+work\[\].trc_ file from the BW Server, you see traces similar to the following:
[2020.10.19 23:10:15.469000][4][disp+work.EXE ][SAPCRYPTOLIB][ 4460] { gss_display_name
[2020.10.19 23:10:15.469000][4][disp+work.EXE ][GSS ][ 4460] gss_display_name output buffer (23 bytes)
[2020.10.19 23:10:15.469000][4][disp+work.EXE ][GSS ][ 4460] CN=DAVID@CONTOSO.COM
**Resolution**: Check whether the Kerberos external ID for the User match what the sectraces are showing.
1. Open SAP Logon.
2. Use the SU01 transaction.
3. Edit the user.
4. Navigate to the **SNC** tab and verify that the SNC name matches what is shown in your logs.
**Validation**: When properly completed, you'll be able to create and refresh reports in the Power BI service.
Related content
---------------
For more information about the on-premises data gateway and DirectQuery, see the following resources:
* [What is an on-premises data gateway?](/en-us/data-integration/gateway/service-gateway-onprem)
* [DirectQuery in Power BI](desktop-directquery-about)
* [Data sources supported by DirectQuery](power-bi-data-sources)
* [DirectQuery and SAP BW](desktop-directquery-sap-bw)
* [DirectQuery and SAP HANA](desktop-directquery-sap-hana)
* * *
Feedback
--------
Was this page helpful?
Yes No
[Provide product feedback](https://ideas.fabric.microsoft.com/?forum=2d80fd4a-16cb-4189-896b-e0dac5e08b41)
| [Ask the community](https://community.fabric.microsoft.com/powerbi)
* * *
Additional resources
--------------------
---
# Use Security Assertion Markup Language for SSO from Power BI to on-premises data sources - Power BI | Microsoft Learn
Table of contents Exit focus mode
Ask Learn Ask Learn [Read in English](# "Read in English")
Save[](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-gateway-sso-saml.md "Edit This Document")
Table of contents [Read in English](# "Read in English")
Add Add to plan [Edit](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-gateway-sso-saml.md "Edit This Document")
* * *
#### Share via
[Facebook](#)
[x.com](#)
[LinkedIn](#)
[Email](#)
* * *
Print
* * *
Note
Access to this page requires authorization. You can try [signing in](#)
or changing directories.
Access to this page requires authorization. You can try changing directories.
Use Security Assertion Markup Language for SSO from Power BI to on-premises data sources
========================================================================================
* Article
* 2022-05-17
* 15 contributors
Feedback
By enabling single sign-on (SSO), you can make it easy for Power BI reports and dashboards to refresh data from on-premises sources while you respect user-level permissions that are configured on those sources. To enable seamless SSO connectivity, you use [Security Assertion Markup Language (SAML)](https://www.onelogin.com/pages/saml)
.
Note
You can connect to only one data source using Single Sign-On SAML with an on-premises data gateway. To connect to an additional data source using Single Sign-On SAML, you must use a different on-premises data gateway.
Supported data sources for SAML
-------------------------------
Microsoft currently supports SAP HANA with SAML. For more information about setting up and configuring single sign-on for SAP HANA by using SAML, see [SAML SSO for BI Platform to HANA](https://blogs.sap.com/2020/03/22/sap-bi-platform-saml-sso-to-hana-database/)
.
We support additional data sources with [Kerberos](service-gateway-sso-kerberos)
(including SAP HANA).
For SAP HANA, we recommend that you enable encryption before you establish a SAML SSO connection. To enable encryption, configure the HANA server to accept encrypted connections, and then configure the gateway to use encryption to communicate with your HANA server. Because the HANA ODBC driver doesn't encrypt SAML assertions by default, the signed SAML assertion is sent from the gateway to the HANA server _in the clear_ and is vulnerable to interception and reuse by third parties.
Important
Because [SAP no longer supports OpenSSL](https://help.sap.com/viewer/b3ee5778bc2e4a089d3299b82ec762a7/2.0.05/en-US/de15ffb1bb5710148386ffdfd857482a.html)
, Microsoft has also discontinued its support. Your existing connections continue to work but you can no longer create new connections. Use SAP Cryptographic Library (CommonCryptoLib), or sapcrypto, instead.
Configure the gateway and data source
-------------------------------------
To use SAML, you must establish a trust relationship between the HANA servers for which you want to enable SSO and the gateway. In this scenario, the gateway serves as the SAML identity provider (IdP). You can establish this relationship in various ways. SAP recommends that you use CommonCryptoLib to complete the setup steps. For more information, see the official SAP documentation.
### Create the certificates
You can establish a trust relationship between a HANA server and the gateway IdP by signing the gateway IdP's X509 certificate with a root certificate authority (CA) that's trusted by the HANA server.
To create the certificates, do the following:
1. On the device that's running SAP HANA, create an empty folder to store your certificates, and then go to that folder.
2. Create the root certificates by running the following command:
openssl req -new -x509 -newkey rsa:2048 -days 3650 -sha256 -keyout CA_Key.pem -out CA_Cert.pem -extensions v3_ca'''
Be sure to copy and save the passphrase to use this certificate to sign other certificates. You should see the _CA\_Cert.pem_ and _CA\_Key.pem_ files being created.
3. Create the IdP certificates by running the following command:
openssl req -newkey rsa:2048 -days 365 -sha256 -keyout IdP_Key.pem -out IdP_Req.pem -nodes
You should see the _IdP\_Key.pem_ and _IdP\_Req.pem_ files being created.
4. Sign the IdP certificates with the root certificates:
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
You should see the _CA\_Cert.srl_ and _IdP\_Cert.pem_ files being created. At this time, you're concerned only with the _IdP\_Cert.pem_ file.
### Create mapping for the SAML identity provider certificate
To create mapping for the SAML Identity Provider certificate, do the following:
1. In SAP HANA Studio, right-click your SAP HANA server name, and then select **Security** > **Open Security Console** > **SAML Identity Provider**.
2. Select the **SAP Cryptographic Library** option. Do _not_ use the OpenSSL Cryptographic Library option, which is deprecated by SAP.

3. To import the signed certificate _IdP\_Cert.pem_, select the blue **Import** button, as shown in the following image:

4. Remember to assign a name for your identity provider.
### Import and create the signed certificates in HANA
To import and create the signed certificates in HANA, do the following:
1. In SAP HANA Studio, run the following query:
CREATE CERTIFICATE FROM ''
Here's an example:
CREATE CERTIFICATE FROM
'-----BEGIN CERTIFICATE-----
MIIDyDCCArCgA...veryLongString...0WkC5deeawTyMje6
-----END CERTIFICATE-----
'
2. If there's no personal security environment (PSE) with purpose SAML, create one by running the following query in SAP HANA Studio:
CREATE PSE SAMLCOLLECTION;
set pse SAMLCOLLECTION purpose SAML;
3. Add the newly created signed certificate to the PSE by running the following command:
alter pse SAMLCOLLECTION add CERTIFICATE ;
For example:
alter pse SAMLCOLLECTION add CERTIFICATE 1978320;
You can check the list of created certificates by running the following query:
select * from PUBLIC"."CERTIFICATES"
The certificate is now properly installed. To confirm the installation, you can run the following query:
select * from "PUBLIC"."PSE_CERTIFICATES"
### Map the user
To map the user, do the following:
1. In SAP HANA Studio, select the **Security** folder.

2. Expand **Users**, and then select the user that you want to map your Power BI user to.
3. Select the **SAML** checkbox, and then select **Configure**, as shown in the following image:

4. Select the identity provider that you created in the [Create mapping for the SAML identity provider certificate](#create-mapping-for-the-saml-identity-provider-certificate)
section. For **External Identity**, enter the Power BI user's UPN (ordinarily, 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_, enter the user's _SAMAccountName_.
### Configure the gateway
Now that you've configured the gateway certificate and identity, convert the certificate to a PFX file format, and then configure the gateway to use the certificate by doing the following:
1. Convert the certificate to PFX format by running the following command. This command names the resulting file _samlcert.pfx_ and sets _root_ as its password, as shown here:
openssl pkcs12 -export -out samltest.pfx -in IdP_Cert.pem -inkey IdP_Key.pem -passin pass:root -passout pass:root
2. Copy the PFX file to the gateway machine:
a. Double-click _samltest.pfx_, and then select **Local Machine** > **Next**.
b. Enter the password, and then select **Next**.
c. Select **Place all certificates in the following store**, and then select **Browse** > **Personal** > **OK**.

d. Select **Next**, and then select **Finish**.
3. To grant the gateway service account access to the private key of the certificate, do the following:
a. On the gateway machine, run Microsoft Management Console (MMC).

b. In MMC, select **File** > **Add/Remove Snap-in**.

c. Select **Certificates** > **Add**, and then select **Computer account** > **Next**.
d. Select **Local Computer** > **Finish** > **OK**.
e. Expand **Certificates** > **Personal** > **Certificates**, and then look for the certificate.
f. Right-click the certificate, and then select **All Tasks** > **Manage Private Keys**.

g. Add the gateway service account to the list. By default, the account is **NT SERVICE\\PBIEgwService**. You can find out which account is running the gateway service by running **services.msc** and then looking for **On-premises data gateway service**.

Finally, add the certificate thumbprint to the gateway configuration:
1. To list the certificates on your machine, run the following PowerShell command:
Get-ChildItem -path cert:\LocalMachine\My
2. Copy the thumbprint for the certificate you created.
3. Go to the gateway directory, which is _C:\\Program Files\\On-premises data gateway_ by default.
4. Open _PowerBI.DataMovement.Pipeline.GatewayCore.dll.config_, and then look for the _SapHanaSAMLCertThumbprint_ section. Paste the thumbprint you copied in step 2.
5. Restart the gateway service.
Run a Power BI report
---------------------
Now you can use the **Manage Gateway** page in Power BI to configure the SAP HANA data source. Under **Advanced Settings**, enable SSO via SAML. By doing so, you can publish reports and datasets binding to that data source.

Note
SSO uses Windows Authentication so make sure the windows account can access the gateway machine. If not sure, make sure to add NT-AUTHORITY\\Authenticated Users (S-1-5-11) to the local machine “Users” group.
Troubleshoot using SAML for single sign-on to SAP HANA
------------------------------------------------------
This section provides extensive steps to troubleshoot using SAML for single sign-on to SAP HANA. Using these steps can help you self-diagnose and correct any issues you might face.
### Rejected credentials
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 credentials were rejected by SAP HANA.
Server-side authentication traces provide detailed information for troubleshooting credential issues on SAP HANA. To configure tracing for your SAP HANA server, do the following:
1. On the SAP HANA server, turn on the authentication trace by running the following query:
ALTER SYSTEM ALTER CONFIGURATION ('indexserver.ini', 'SYSTEM') set ('trace', 'authentication') = 'debug' with reconfigure
2. Reproduce the issue.
3. In SAP HANA Studio, open the administration console, and then select the **Diagnosis Files** tab.
4. Open the most recent index server trace, and then search for _SAMLAuthenticator.cpp_.
You should find a detailed error message that indicates the root cause, as shown in the following example:
[3957]{-1}[-1/-1] 2018-09-11 21:40:23.815797 d Authentication SAMLAuthenticator.cpp(00091) : Element '{urn:oasis:names:tc:SAML:2.0:assertion}Assertion', attribute 'ID': '123123123123123' is not a valid value of the atomic type 'xs:ID'.
[3957]{-1}[-1/-1] 2018-09-11 21:40:23.815914 i Authentication SAMLAuthenticator.cpp(00403) : No valid SAML Assertion or SAML Protocol detected
5. After you've finished troubleshooting, turn off the authentication trace by running the following query:
ALTER SYSTEM ALTER CONFIGURATION ('indexserver.ini', 'SYSTEM') UNSET ('trace', 'authentication');
### Verify and troubleshoot gateway errors
To follow the procedures in this section, you need to [collect gateway logs](/en-us/data-integration/gateway/service-gateway-tshoot#collect-logs-from-the-on-premises-data-gateway-app)
.
#### SSL error (certificate)
**Error symptoms**
This issue has multiple symptoms. When you try to add a new data source, you might see an error message like the following:
`Unable to connect: We encountered an error while trying to connect to . Details: "We could not register this data source for any gateway instances within this cluster. Please find more details below about specific errors for each gateway instance."`
When you try to create or refresh a report, you might see an error message like the one in the following image:

When you investigate the Mashup\[date\]\*.log, you'll see the following error message:
`A connection was successfully established with the server, but then an error occurred during the login process and the certificate chain was issued by an authority that is not trusted`
**Resolution**
To resolve this SSL error, go to the data source connection and then, in the **Validate Server Certificate** dropdown list, select **No**, as shown in the following image:

After you've selected this setting, the error message will no longer appear.
#### Gateway SignXML error
The gateway SignXML error can be the result of incorrect _SapHanaSAMLCertThumbprint_ settings, or it can be an issue with the HANA server. Entries in the gateway logs help identify where the issue resides, and how to resolve it.
**Error symptoms**
Log entries for `SignXML: Found the cert...`: If your GatewayInfo\[_date_\].log file contains this error, the SignXML cert was found, and your troubleshooting efforts should focus on steps that are found in the ["Verify and troubleshoot the HANA server side"](#verify-and-troubleshoot-the-hana-server-side)
section.
Log entries for `Couldn't find saml cert`: If your GatewayInfo\[_date_\].log file contains this error, _SapHanaSAMLCertThumbprint_ is set incorrectly. The following resolution section describes how to resolve the issue.
**Resolution**
To properly set _SapHanaSAMLCertThumbprint_, follow the instructions in the ["Configure the gateway"](service-gateway-sso-saml)
section. The instructions begin with _Finally, add the certificate thumbprint to the gateway configuration_.
After you've changed the configuration file, you need to restart the gateway service for the change to take effect.
**Validation**
When _SapHanaSAMLCertThumbprint_ is properly set, your gateway logs will have entries that include `SignXML: Found the cert...`. At this point, you should be able to proceed to the ["Verify and troubleshoot the HANA server side"](#verify-and-troubleshoot-the-hana-server-side)
section.
If the gateway is unable to use the certificate to sign the SAML assertion, you might see an error in the logs that's similar to the following:
`GatewayPipelineErrorCode=DM_GWPipeline_UnknownError GatewayVersion= InnerType=CryptographicException InnerMessage=Signing key is not loaded. InnerToString=System.Security.Cryptography.CryptographicException: Signing key is not loaded.`
To resolve this error, follow the instructions beginning with step 3 in the ["Configure the gateway"](service-gateway-sso-saml#configure-the-gateway)
section.
After you've changed the configuration, restart the gateway service for the change to take effect.
#### Verify and troubleshoot the HANA server side
Use the solutions in this section if the gateway can find the certificate and sign the SAML assertion but you're still experiencing errors. You'll need to collect HANA authentication traces, as described earlier in the ["Rejected credentials" section](#rejected-credentials)
.
**The SAML identity provider**
The presence of the `Found SAML provider` string in the HANA authentication traces indicates that the SAML identity provider is configured properly. If the string is not present, the configuration is incorrect.
**Resolution**
First, determine whether your organization is using OpenSSL or commoncrypto as the sslcryptoprovider. To determine which provider is being used, do the following:
1. Open SAP HANA Studio.
2. Open the Administration Console for the tenant that you're using.
3. Select the **Configuration** tab, and use **sslcryptoprovider** as a filter, as shown in the following image:

Next, verify that the cryptographic library is set correctly by doing the following:
1. Go to Security Console in SAP HANA Studio by selecting the **SAML Identity Providers** tab, and do either of the following:
* If the sslcryptoprovider is OpenSSL, select **OpenSSL Cryptographic Library**.
* If the sslcryptoprovider is commonCrypto, select **SAP Cryptographic Library**.
In the following image, **SAP Cryptographic Library** is selected:

2. Deploy your changes by selecting the **Deploy** button at the upper right, as shown in the following image:

**Validation**
When the traces are properly configured, they'll report `Found SAML provider` and will _not_ report `SAML Provider not found`. You can proceed to the next section, ["Troubleshoot the SAML assertion signature."](#troubleshoot-the-saml-assertion-signature)
If the cryptographic provider is set but `SAML Provider not found` is still being reported, search for a string in the trace that begins with the following text:
`Search SAML provider for certificate with subject =`
In that string, ensure that the subject and issuer are exactly the same as displayed in the SAML identity provider tab in Security Console. A difference of even a single character can cause the problem. If you find a difference, you can fix the issue in the SAP Cryptographic Library so that the entries match exactly.
If changing the SAP Cryptographic Library doesn't fix the issue, you can manually edit the _Issued To_ and _Issued By_ fields simply by double-clicking them.
#### Troubleshoot the SAML assertion signature
You might find HANA authentication traces that contain entries similar to the following:
`[48163]{-1}[-1/-1] 2020-09-11 21:15:18.896165 i Authentication SAMLAuthenticator.cpp(00398) : Unable to verify XML signature` `[48163]{-1}[-1/-1] 2020-09-11 21:15:18.896168 i Authentication MethodSAML.cpp(00103) : unsuccessful login attempt with SAML ticket!`
The presence of such entries means that the signature isn't trusted.
**Resolution**
If you're using **OpenSSL** as your sslcryptoprovider, check to see whether the _trust.pem_ and _key.pem_ files are in the SSL directory. For more information, see the SAP blog [Securing the communication between SAP HANA Studio and SAP HANA Server through SSL](https://blogs.sap.com/2015/09/28/securing-the-communication-between-sap-hana-studio-and-sap-hana-server-through-ssl/)
.
If you're using **commoncrypto** as your sslcryptoprovider, check to see whether there's a collection with your certificate in the tenant.
**Validation**
When the traces are properly configured, they'll report `Found valid XML signature`.
#### Troubleshoot the UPN mapping
You might find HANA traces that contain entries similar to the following:
``SAMLAuthenticator.cpp(00886) : Assertion Subject NameID: `johnny@contoso.com` SAMLAuthenticator.cpp(00398) : Database user does not exist``
The error indicates that nameId `johnny@contoso.com` is found in the SAML assertions, but it doesn't exist or isn't mapped correctly in HANA Server.
**Resolution**
Go to the HANA database user and, under the selected SAML checkbox, select the **Configure** link. The following window appears:

As the error message describes, HANA was trying to find _johnny@contoso.com_, but the external identity is displayed only as _johnny_. These two values must match. To resolve the issue, under **External Identity**, change the value to _johnny@contoso.com_. Note that this value is case sensitive.
Related content
---------------
For more information about the on-premises data gateway and DirectQuery, see the following resources:
* [What is an on-premises data gateway?](/en-us/data-integration/gateway/service-gateway-onprem)
* [DirectQuery in Power BI](desktop-directquery-about)
* [Data sources supported by DirectQuery](power-bi-data-sources)
* [DirectQuery and SAP Business Warehouse (BW)](desktop-directquery-sap-bw)
* [DirectQuery and SAP HANA](desktop-directquery-sap-hana)
* * *
Feedback
--------
Was this page helpful?
Yes No
[Provide product feedback](https://ideas.fabric.microsoft.com/?forum=2d80fd4a-16cb-4189-896b-e0dac5e08b41)
| [Ask the community](https://community.fabric.microsoft.com/powerbi)
* * *
Additional resources
--------------------
---
# Using enhanced semantic model metadata in Power BI Desktop - Power BI | Microsoft Learn
Table of contents Exit focus mode
Ask Learn Ask Learn [Read in English](# "Read in English")
Save[](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/desktop-enhanced-dataset-metadata.md "Edit This Document")
Table of contents [Read in English](# "Read in English")
Add Add to plan [Edit](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/desktop-enhanced-dataset-metadata.md "Edit This Document")
* * *
#### Share via
[Facebook](#)
[x.com](#)
[LinkedIn](#)
[Email](#)
* * *
Print
* * *
Note
Access to this page requires authorization. You can try [signing in](#)
or changing directories.
Access to this page requires authorization. You can try changing directories.
Using enhanced semantic model metadata
======================================
* Article
* 2025-02-26
* 10 contributors
Feedback
When Power BI Desktop creates reports, it also creates semantic model metadata in the corresponding PBIX and PBIT files. Previously, the metadata was stored in a format that was specific to Power BI Desktop. The metadata used base-64 encoded M expressions and data sources. Power BI made assumptions about how that metadata was stored.
With the release of the _enhanced semantic model metadata_ feature, many of these limitations are removed. PBIX files are automatically upgraded to enhanced metadata upon opening the file. With enhanced semantic model metadata, 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](/en-us/analysis-services/tom/introduction-to-the-tabular-object-model-tom-in-analysis-services-amo)
.
The enhanced semantic model metadata feature is strategic and foundational. Future Power BI functionality will be built upon its metadata. These other capabilities stand to benefit from enhanced semantic model metadata:
* [XMLA read/write](/en-us/power-platform-release-plan/2019wave2/business-intelligence/xmla-readwrite)
for management of Power BI semantic models.
* Migration of Analysis Services workloads to Power BI to benefit from next-generation features.
Upgrade
-------
Your reports are automatically upgraded to the enhanced metadata format when you open them in the latest version of Power BI Desktop. If the report was saved with unapplied query changes, or there was an error during the auto-upgrade, there's a warning on the report canvas that you still need to upgrade. Selecting **Upgrade report** applies any pending changes and upgrades the semantic model to the new format.
Exclude table from report refresh
---------------------------------
Once a data model has been upgraded to the enhanced metadata format, some metadata that was previously only used in Power BI Desktop is now respected in the Power BI service as well. This metadata includes the **Include in Report Refresh** option. For upgraded models, if the **Include in Report Refresh** option is unselected in the Power Query Editor, then that table isn't refreshed when the report or semantic model is refreshed in Power BI Desktop or the Power BI service. Reports already published in the Power BI service that aren't yet upgraded to the new enhanced metadata formal need to be upgraded in Power BI Desktop before this new behavior takes effect.
Considerations and limitations
------------------------------
Before enhanced metadata support, for SQL Server, Oracle, Teradata, and legacy HANA connections, Power BI Desktop added a native query to the semantic model. This query is used by the Power BI service semantic models. With enhanced metadata support, the Power BI service semantic model regenerates the native query at runtime. It doesn't use the query that Power BI Desktop created. In most cases, this retrieval resolves itself correctly, but some transformations don't work without reading underlying data. You might see some errors in reports that previously worked. For example, an error might say:
* Unable to convert an M query in table 'Dimension City' into a native source query. Try again later or contact support. If you contact support, provide these details.
You can fix your queries in three different places in Power BI Desktop:
* When you apply changes or do a refresh.
* In a warning bar in the Power Query Editor informing you that the expression couldn’t be folded to the data source.

* When you run evaluations when you open a report to check if you have unsupported queries. Running these evaluations can result in performance implications.
Certain character combinations in M expressions that would be unsupported in the Tabular Object Model (TOM) are also unsupported in the enhanced semantic model metadata environment.
Related content
---------------
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?](../fundamentals/desktop-what-is-desktop)
* [What's new in Power BI?](../fundamentals/desktop-latest-update)
* [Query overview with Power BI Desktop](../transform-model/desktop-query-overview)
* [Data types in Power BI Desktop](desktop-data-types)
* [Shape and combine data with Power BI Desktop](desktop-shape-and-combine-data)
* [Common query tasks in Power BI Desktop](../transform-model/desktop-common-query-tasks)
* * *
Feedback
--------
Was this page helpful?
Yes No
[Provide product feedback](https://ideas.fabric.microsoft.com/?forum=2d80fd4a-16cb-4189-896b-e0dac5e08b41)
| [Ask the community](https://community.fabric.microsoft.com/powerbi)
* * *
Additional resources
--------------------
---
# OneLake catalog overview - Microsoft Fabric | Microsoft Learn
Table of contents Exit focus mode
Ask Learn Ask Learn [Read in English](# "Read in English")
Save[](https://github.com/MicrosoftDocs/fabric-docs/blob/main/docs/governance/onelake-catalog-overview.md "Edit This Document")
Table of contents [Read in English](# "Read in English")
Add Add to plan [Edit](https://github.com/MicrosoftDocs/fabric-docs/blob/main/docs/governance/onelake-catalog-overview.md "Edit This Document")
* * *
#### Share via
[Facebook](#)
[x.com](#)
[LinkedIn](#)
[Email](#)
* * *
Print
* * *
Note
Access to this page requires authorization. You can try [signing in](#)
or changing directories.
Access to this page requires authorization. You can try changing directories.
OneLake catalog overview
========================
* Article
* 2025-01-21
* 2 contributors
Feedback
OneLake catalog is a centralized place that helps you find, explore, and use the Fabric items you need, and govern the data you own. It features two tabs:
* **[Explore tab](onelake-catalog-explore)
**: The explore tab has an items list with an in-context item details view that makes it possible to browse through and explore items without losing your list context. It also provides selectors and filters to narrow down and focus the list, making it easier to find what you need. By default, the OneLake catalog opens on the Explore tab.
* **[Govern tab](onelake-catalog-govern)
**: The govern tab provides insights that help you understand the governance posture of all the data you own in Fabric, and presents recommended actions you can take to improve the governance status of your data.
Open the the OneLake catalog
----------------------------
To open the OneLake catalog, select the OneLake icon in the Fabric navigation pane. Select the tab you're interested if it's not displayed by default.
[](media/onelake-catalog-overview/onelake-catalog-overview-general-view.png#lightbox)
Related content
---------------
* [Discover and explore Fabric items in the OneLake catalog](onelake-catalog-explore)
* [Govern your data in Fabric](onelake-catalog-govern)
* [Endorsement](endorsement-overview)
* [Fabric domains](domains)
* [Lineage in Fabric](lineage)
* [Monitor hub](../admin/monitoring-hub)
* * *
Feedback
--------
Was this page helpful?
Yes No
[Provide product feedback](https://ideas.fabric.microsoft.com/?forum=bbb1936d-44f9-ed11-8849-000d3a4ef41d&category=62ac7a81-45f9-ed11-8849-000d3a4ef41d)
| [Ask the community](https://community.fabric.microsoft.com/powerbi)
* * *
Additional resources
--------------------
---
# Build permission for shared semantic models - Power BI | Microsoft Learn
Table of contents Exit focus mode
Ask Learn Ask Learn [Read in English](# "Read in English")
Save[](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-datasets-build-permissions.md "Edit This Document")
Table of contents [Read in English](# "Read in English")
Add Add to plan [Edit](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-datasets-build-permissions.md "Edit This Document")
* * *
#### Share via
[Facebook](#)
[x.com](#)
[LinkedIn](#)
[Email](#)
* * *
Print
* * *
Note
Access to this page requires authorization. You can try [signing in](#)
or changing directories.
Access to this page requires authorization. You can try changing directories.
Build permission for shared semantic models
===========================================
* Article
* 2023-11-10
* 7 contributors
Feedback
When you create a report in Power BI Desktop, the data in that report is stored in a _data model_. When you publish a report to the Power BI service, the data model is also published to the service as a _semantic model_ at the same time. When you share the report with others, you can give them _Build permission_ for the semantic model that the report is built on, so they can discover and reuse it for their own reports, dashboards, etc. This article explains how you control access to the semantic model using Build permission.
Build permission applies to semantic models. When you give users Build permission, they can build new content on your semantic model, such as reports, dashboards, pinned tiles from Q&A, paginated reports, and Insights discovery. If a report outside the semantic model workspace uses your semantic model, you can't delete the semantic model. If you try to do so, you get an error message.
Users also need Build permission to do the following actions:
* Export underlying Power BI data.
* Build new content on the semantic model, such as with [Analyze in Excel](../collaborate-share/service-analyze-in-excel)
.
* Access the data via the XML for Analysis (XMLA) endpoint.
How users get Build permission
------------------------------
Users get Build permission for a semantic model in a few different ways:
* Users that have at least a Contributor role in a workspace have Build permission on the semantic models in that workspace, as well as permission to copy reports in that workspace. For more information about roles in workspaces, see [Roles in workspaces in Power BI](../collaborate-share/service-roles-new-workspaces)
.
* Semantic model owners can assign Build permission to specific users or security groups on the **Manage permissions** page. For more information, see [Manage semantic model access permissions](service-datasets-manage-access-permissions)
.
* A user with an Admin or Member role in the workspace where the semantic model resides can decide during app publishing that users with permission for the app also get Build permission for the underlying semantic models. For more information, see [Create and manage multiple audiences](../collaborate-share/service-create-distribute-apps#create-and-manage-multiple-audiences)
.
* If you have Reshare and Build permission on a semantic model, and you share a report or dashboard you built on that semantic model, you can specify that the recipients also get Build permission for the semantic model. For more information, see [Share Power BI reports and dashboards with coworkers and others](../collaborate-share/service-share-dashboards)
.
Remove Build permission
-----------------------
To remove Build permission for users of a shared semantic model, follow the instructions at [Manage direct access](service-datasets-manage-access-permissions#manage-direct-access)
.
If you remove Build permission, the people whose permission you revoked can still see the report, but can no longer edit the report or export underlying data. Users with only read permission can still export summarized data.
### Remove Build permission for a semantic model in an app
If you distribute an app from a workspace, removing people's access to the app doesn't automatically remove their build and reshare permissions. To remove their Build permissions, take the following steps:
1. In the workspace, in list view, select **Update app**.

2. Select the **Audience** tab, and then in the **Manage Audience Access** side pane, hover over the person or group whose access you want to delete and select the trash icon that appears. When you're done, select **Update app**.

You'll see a message that you need to go to **Manage permissions** to remove permissions for users with existing access.

3. Select **Update**.
4. Follow the instructions at [Manage permissions](service-datasets-manage-access-permissions#manage-direct-access)
to see how to remove permissions from users with existing access. When you take away a user's Build permission on a semantic model, they can still see reports built on the semantic model, but they can no longer edit the reports.
Configure how users request Build permission
--------------------------------------------
Certain actions, such as creating a report based on a semantic model, require Build permission on the semantic model. By default, when users who don't have Build permission try these actions, they get a dialog box that lets them send email to the semantic model owner requesting Build permission. The email includes the user's details, the name of the semantic model they’re requesting access to, and any other information they optionally provide.

### Change the access request behavior
If you have an [Admin, Member, or Contributor role](../collaborate-share/service-roles-new-workspaces)
in the workspace where the semantic model resides, you can change the default access request behavior for a semantic model by going to the semantic model's settings and configuring the **Request access** options as desired.

* The default option, not selected in the preceding image, is for Build permission requests to come to you via email. You're responsible for acting on the requests and notifying the requestors.
* The second option is for you to provide instructions about how to get Build permission, rather than receiving requests via email. You might choose this option, for example, if your organization uses an automated system for handling access requests. When users who don't have Build permission try an action that requires Build permission, they see a message with the instructions you provide.
The **Instructions** text area in the preceding **Request access** example shows sample instructions. Instructions must be in plain text. HTML or any other type of code formatting render as plain text, rather than the code format. The following example shows the instructions users see when they try an action they need Build permission for.

Note
When you provide specific instructions, your email address is visible to users who request access.
More granular permissions
-------------------------
Power BI provides Build permission as a complement to Read and Reshare permissions. All users who already have Read permission for semantic models via app permissions, sharing, or workspace access also get Build permission for those semantic models. Those users get Build permission automatically because Read permission already grants them the right to build new content on the semantic model by using **Analyze in Excel** or **Export**.
With the more granular Build permission, you can choose who can only view the content in an existing report or dashboard, and who can create content connected to the underlying semantic model.
Related content
---------------
* [Use semantic models across workspaces](service-datasets-across-workspaces)
* [Share a semantic model](service-datasets-share)
* [Roles in workspaces](../collaborate-share/service-roles-new-workspaces)
* [Manage semantic model access permissions](service-datasets-manage-access-permissions)
Questions? [Try asking the Power BI Community](https://community.powerbi.com)
* * *
Feedback
--------
Was this page helpful?
Yes No
[Provide product feedback](https://ideas.fabric.microsoft.com/?forum=2d80fd4a-16cb-4189-896b-e0dac5e08b41)
| [Ask the community](https://community.fabric.microsoft.com/powerbi)
* * *
Additional resources
--------------------
---
# Use Kerberos for single sign-on (SSO) to Teradata - Power BI | Microsoft Learn
Table of contents Exit focus mode
Ask Learn Ask Learn [Read in English](# "Read in English")
Save[](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-gateway-sso-kerberos-teradata.md "Edit This Document")
Table of contents [Read in English](# "Read in English")
Add Add to plan [Edit](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-gateway-sso-kerberos-teradata.md "Edit This Document")
* * *
#### Share via
[Facebook](#)
[x.com](#)
[LinkedIn](#)
[Email](#)
* * *
Print
* * *
Note
Access to this page requires authorization. You can try [signing in](#)
or changing directories.
Access to this page requires authorization. You can try changing directories.
Use Kerberos for SSO to Teradata
================================
* Article
* 2024-10-08
* 3 contributors
Feedback
This article describes a specific added requirement to successfully enable single sign-on (SSO) to Teradata from the Power BI service.
* If Teradata identifies user accounts by using _sAMAccountNames_, you must set `FullDomainResolutionEnabled` on the gateway to `True`.
* If Teradata identifies user accounts by using _User Principal Names (UPNs)_, keep `FullDomainResolutionEnabled` on the gateway set to `False`.
Enable SSO for Teradata
-----------------------
To change the `FullDomainResolutionEnabled` configuration on the gateway to enable SSO for Teradata:
1. In the on-premises gateway directory at _%ProgramFiles%\\On-premises data gateway_, open the configuration file _Microsoft.PowerBI.DataMovement.Pipeline.GatewayCore.dll.config_.
2. In the file, find the `FullDomainResolutionEnabled` property and change its value to `True`.
True
Related content
---------------
For more information about the on-premises data gateway and DirectQuery, see the following resources:
* [What is an on-premises data gateway?](/en-us/data-integration/gateway/service-gateway-onprem)
* [DirectQuery in Power BI](desktop-directquery-about)
* [Data sources supported by DirectQuery](power-bi-data-sources)
* [DirectQuery and SAP Business Warehouse (BW)](desktop-directquery-sap-bw)
* [DirectQuery and SAP HANA](desktop-directquery-sap-hana)
* * *
Feedback
--------
Was this page helpful?
Yes No
[Provide product feedback](https://ideas.fabric.microsoft.com/?forum=2d80fd4a-16cb-4189-896b-e0dac5e08b41)
| [Ask the community](https://community.fabric.microsoft.com/powerbi)
* * *
Additional resources
--------------------
---
# Introduction to semantic models across workspaces - Power BI | Microsoft Learn
Table of contents Exit focus mode
Ask Learn Ask Learn [Read in English](# "Read in English")
Save[](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-datasets-across-workspaces.md "Edit This Document")
Table of contents [Read in English](# "Read in English")
Add Add to plan [Edit](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-datasets-across-workspaces.md "Edit This Document")
* * *
#### Share via
[Facebook](#)
[x.com](#)
[LinkedIn](#)
[Email](#)
* * *
Print
* * *
Note
Access to this page requires authorization. You can try [signing in](#)
or changing directories.
Access to this page requires authorization. You can try changing directories.
Introduction to semantic models across workspaces
=================================================
* Article
* 2023-11-10
* 8 contributors
Feedback
Business intelligence is a collaborative activity. It's important to establish standardized semantic models that can be the _one source of truth_. Then discovering and reusing those standardized semantic models is key. When expert data modelers in your organization create and share optimized semantic models, report creators can start with those semantic models to build accurate reports. Then your organization has consistent data for making decisions, and a healthy data culture.
[](media/service-datasets-across-workspaces/power-bi-select-shared-dataset.png#lightbox)
In Power BI, semantic model creators can control who has access to their data by using the [Build permission](service-datasets-build-permissions)
. Semantic model creators can also _certify_ or _promote_ semantic models so others can discover them. That way, report authors know which semantic models are high quality and official, and they can use those semantic models wherever they author in Power BI. Administrators have a new tenant setting to [govern the use of semantic models across workspaces](service-datasets-admin-across-workspaces)
.
Semantic model sharing and workspaces
-------------------------------------
Building reports based on semantic models in different workspaces, and copying reports to different workspaces, are tightly coupled with the [workspace](../collaborate-share/service-create-the-new-workspaces)
:
* In the Power BI service, when you open the semantic model catalog from a workspace, the semantic model catalog shows semantic models in your **My workspace** and in other workspaces.
* In Power BI Desktop, you can publish Live Connect reports to different workspaces.
Discover semantic models
------------------------
When you build a report on top of an existing semantic model, the first step is to connect to the semantic model, either in the Power BI service or Power BI Desktop. Read about [discovering semantic models from different workspaces](service-datasets-discover-across-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. The data model is 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](service-datasets-copy-reports)
.
Build permission for semantic models
------------------------------------
With **Build** permission type, if you're a semantic model creator, you can determine who in your organization can build new content on your semantic models. People with **Build** permission can also build new content on the semantic model outside Power BI, such as Excel sheets via Analyze in Excel, XMLA, and export. Read more about the [Build permission](service-datasets-build-permissions)
.
Promotion and certification
---------------------------
If you create semantic models, when you create one that others can benefit from, you can make it easier for them to discover it by [promoting your semantic model](../collaborate-share/service-endorse-content#promote-content)
. You can also request that experts in your organization [certify your semantic model](../collaborate-share/service-endorse-content#request-content-certification)
.
Licensing
---------
The specific features and experiences built on shared semantic model capabilities are licensed according to their existing scenarios. For example:
* In general, discovering and connecting to shared semantic models is available to anyone. It isn't a feature restricted to Premium.
* Users without a Pro or Premium Per User (PPU) license can only use semantic models across workspaces for report authoring if those semantic models 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 or Premium Per User license.
* Copying reports from an app requires a Pro or Premium Per User license.
* Promoting and certifying semantic models requires a Pro or Premium Per User license.
Considerations and limitations
------------------------------
* As an app publisher, you have to make sure that your audience has access to semantic models outside of the workspace. Otherwise, users will encounter issues when interacting with your app: reports won't open without semantic model access and dashboard tiles will show as locked. Also, users won't able to open the app if the first item in its navigation is a report without access to the semantic model.
* By design, _Publish to web_ doesn't work for a report based on a shared semantic model.
* If two people are members of a workspace that is accessing a shared semantic model, it's possible that only one of them can see the related semantic model in the workspace. Only people with at least **Read** access to the semantic model can see the shared semantic model.
Related content
---------------
* [Promote semantic models](../collaborate-share/service-endorse-content#promote-content)
* [Certify semantic models](../collaborate-share/service-endorse-content#certify-content)
* [Request semantic model certification](../collaborate-share/service-endorse-content#request-content-certification)
* [Govern the use of semantic models across workspaces](service-datasets-admin-across-workspaces)
* Questions? [Try asking the Power BI Community](https://community.powerbi.com/)
* * *
Feedback
--------
Was this page helpful?
Yes No
[Provide product feedback](https://ideas.fabric.microsoft.com/?forum=2d80fd4a-16cb-4189-896b-e0dac5e08b41)
| [Ask the community](https://community.fabric.microsoft.com/powerbi)
* * *
Additional resources
--------------------
---
# Test single sign-on (SSO) configuration - Power BI | Microsoft Learn
Table of contents Exit focus mode
Ask Learn Ask Learn [Read in English](# "Read in English")
Save[](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-gateway-sso-test-configuration.md "Edit This Document")
Table of contents [Read in English](# "Read in English")
Add Add to plan [Edit](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-gateway-sso-test-configuration.md "Edit This Document")
* * *
#### Share via
[Facebook](#)
[x.com](#)
[LinkedIn](#)
[Email](#)
* * *
Print
* * *
Note
Access to this page requires authorization. You can try [signing in](#)
or changing directories.
Access to this page requires authorization. You can try changing directories.
Test single sign-on (SSO) configuration
=======================================
* Article
* 2025-02-28
* 5 contributors
Feedback
_Single sign-on (SSO)_ enables each Power BI user to access the precise data they have permissions for in an underlying data source. Many Power BI data sources are enabled for SSO, using either [Kerberos](service-gateway-sso-kerberos)
constrained delegation or Security Assertion Markup Language ([SAML](service-gateway-sso-saml)
). For more information, see [Overview of single sign-on for on-premises data gateways in Power BI](service-gateway-sso-overview)
.
Setting up SSO is complex, so you can use the _test single sign-on (SSO) configuration_ feature to test your configuration.
The single sign-on test:
* Lets the gateway connect to the data source by using a test User Principal Name (UPN) that you provide.
* Validates the SSO setup, which includes checking UPN mapping to a local Active Directory (AD) identity for impersonation and data source access.
* Helps identify problems if connection failures occur. For example, an error message indicates if a UPN maps to a local AD identity that doesn't have access to the data source.
The test single sign-on feature works for both Kerberos and SAML-based SSO for the data sources listed in [Supported data sources for SSO](service-gateway-sso-overview#supported-data-sources-for-sso)
. For Kerberos constrained delegation, the test single sign-on feature can help test SSO for both DirectQuery and Import, or only DirectQuery data sources.
Important
The test single sign-on feature requires the March 2021 gateway release or later.
Test SSO for the gateway
------------------------
To test the SSO configuration:
1. From **Manage connections and gateways** in Power BI, select **Settings** for the data source.

2. In the **Settings** pane, under **Single sign-on**, select **Test single sign-on**.

3. Provide a User Principal Name to test.

If the gateway cluster is able to impersonate the user and successfully connect to the data source, the test succeeds, as shown in the following image:

Troubleshooting
---------------
This section describes common errors you might see when testing single sign-on, and actions you can take to fix them.
### Impersonation error
If the gateway cluster can't impersonate the user and connect to the data source, the test fails with the error message: **Error: The on-premises data gateway's service account failed to impersonate the user.**

There can be the following possible causes and solutions:
* The user doesn't exist in Microsoft Entra ID. Check if the user is present in Microsoft Entra ID.
* The user isn't mapped correctly to a local AD account. Check configurations and follow the steps in [Overview of single sign-on for on-premises data gateways in Power BI](service-gateway-sso-overview)
.
* The gateway doesn't have impersonation rights. Grant the gateway service account local policy rights on the gateway machine as described in [Grant the gateway service account local policy rights on the gateway machine](service-gateway-sso-kerberos#step-6-grant-the-gateway-service-account-local-policy-rights-on-the-gateway-machine)
.
### Invalid credentials error
The error **Error: Invalid connection credentials** appears when the gateway can't connect to the data source, because the provided UPN doesn't have access to the data source.

Check whether the data source has been misconfigured to deny access to the user. You may need to work with your data source/database administrator to access the data source's configuration and settings.
Related content
---------------
* [Overview of single sign-on (SSO) for gateways in Power BI](service-gateway-sso-overview)
* [Single sign-on (SSO) - Kerberos](service-gateway-sso-kerberos)
* [Single sign-on (SSO) - SAML](service-gateway-sso-saml)
* * *
Feedback
--------
Was this page helpful?
Yes No
[Provide product feedback](https://ideas.fabric.microsoft.com/?forum=2d80fd4a-16cb-4189-896b-e0dac5e08b41)
| [Ask the community](https://community.fabric.microsoft.com/powerbi)
* * *
Additional resources
--------------------
---
# Create reports based on semantic models from different workspaces - Power BI | Microsoft Learn
Table of contents Exit focus mode
Ask Learn Ask Learn [Read in English](# "Read in English")
Save[](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-datasets-discover-across-workspaces.md "Edit This Document")
Table of contents [Read in English](# "Read in English")
Add Add to plan [Edit](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-datasets-discover-across-workspaces.md "Edit This Document")
* * *
#### Share via
[Facebook](#)
[x.com](#)
[LinkedIn](#)
[Email](#)
* * *
Print
* * *
Note
Access to this page requires authorization. You can try [signing in](#)
or changing directories.
Access to this page requires authorization. You can try changing directories.
Create reports based on semantic models from different workspaces
=================================================================
* Article
* 2024-07-15
* 9 contributors
Feedback
This article describes how you can create reports in your own workspaces based on semantic models in other workspaces.
Note
If you're building your report on multiple data sources, see also [Use composite models in Power BI Desktop](../transform-model/desktop-composite-models)
.
To build a report on top of an existing semantic model, you can start from Power BI Desktop or from the Power BI service, in your **My workspace** or in [another workspace](../collaborate-share/service-create-the-new-workspaces)
.
* In the Power BI service: **Create** > **Report** > **Pick a published semantic model**.
* In Power BI Desktop: from the **Home** ribbon, select **Get data** > **Power BI semantic models**.
In both cases, the semantic model discovery experience starts in the **Data hub**. You see all the semantic models that you have access to, regardless of where they are:
[](media/service-datasets-across-workspaces/power-bi-select-dataset.png#lightbox)
One of the semantic models is labeled **Promoted**. Learn about that label in the section [Find an endorsed semantic model](#find-an-endorsed-semantic-model)
, later in this article.
The semantic models in this list meet at least one of the following conditions:
* The semantic model is in a workspace that you're a member of. See \[Considerations and limitations\](service-semantic models-across-workspaces.md#considerations-and-limitations).
* You have Build permission for the semantic model.
* The semantic model is in your **My workspace**.
Note
If you're a free user, you see only datasets in your **My workspace**, or datasets for which you have Build permission that are in Premium or Fabric capacity workspaces.
When you select **Create**, you create a live connection to the semantic model. The report creation experience opens with the full semantic model available. You haven't made a copy of the semantic model. The semantic model still resides in its original location. You can use all tables and measures in the semantic model to build your own reports. Row-level security (RLS) restrictions on the semantic model 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 semantic models if the report is based on a semantic model outside of the workspace.
The entry shows information about the semantic model, and a few select actions.
[](media/service-datasets-across-workspaces/power-bi-dataset-actions.png#lightbox)
Find an endorsed semantic model
-------------------------------
There are two different kinds of endorsed semantic models. Semantic model owners can _promote_ a semantic model that they recommend to you. Also, the Power BI admin can designate experts in your organization who can _certify_ semantic models for everyone to use. Promoted and certified semantic models both display _badges_ that you see both when looking for a semantic model, and in the list of semantic models in a workspace. The name of the person who certified a semantic model is displayed in a tooltip during the semantic model discovery experience. Hover over the **Certified** label and you see it.
* In the Power BI service: **OneLake data hub**.
* In Power BI Desktop: **Get data** > **Power BI semantic models**.
In **OneLake data hub**, select **Endorsed in your org**.
[](media/service-datasets-across-workspaces/power-bi-dataset-promoted.png#lightbox)
Related content
---------------
* [Use semantic models across workspaces](service-datasets-across-workspaces)
* [Use composite models in Power BI Desktop](../transform-model/desktop-composite-models)
* Questions? [Try asking the Power BI Community](https://community.powerbi.com/)
* * *
Feedback
--------
Was this page helpful?
Yes No
[Provide product feedback](https://ideas.fabric.microsoft.com/?forum=2d80fd4a-16cb-4189-896b-e0dac5e08b41)
| [Ask the community](https://community.fabric.microsoft.com/powerbi)
* * *
Additional resources
--------------------
---
# Active Directory (AD) SSO - Power BI | Microsoft Learn
Table of contents Exit focus mode
Ask Learn Ask Learn [Read in English](# "Read in English")
Save[](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-gateway-active-directory-sso.md "Edit This Document")
Table of contents [Read in English](# "Read in English")
Add Add to plan [Edit](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-gateway-active-directory-sso.md "Edit This Document")
* * *
#### Share via
[Facebook](#)
[x.com](#)
[LinkedIn](#)
[Email](#)
* * *
Print
* * *
Note
Access to this page requires authorization. You can try [signing in](#)
or changing directories.
Access to this page requires authorization. You can try changing directories.
Active Directory (AD) SSO
=========================
* Article
* 2024-06-28
* 5 contributors
Feedback
The on-premises data gateway supports Active Directory (AD) SSO for connecting to your on-premises data sources that have Active Directory configured. AD SSO includes both [Kerberos](service-gateway-sso-kerberos)
constrained delegation and [Security Assertion Markup Language (SAML)](service-gateway-sso-saml)
. For more information on SSO and the list of data sources supported for AD SSO, see [Overview of single sign-on (SSO) for on-premises data gateways in Power BI](service-gateway-sso-overview)
.
Query steps when running Active Directory SSO
---------------------------------------------
A query that runs with SSO consists of three steps, as shown in the following diagram.
[](media/service-gateway-active-directory-sso/sso-query-steps.png#lightbox)
Here are more details about each step:
1. The Power BI service includes the _user principal name (UPN)_ for each query. The UPN is the fully qualified username of the user currently signed in to the Power BI service when the query request is sent to the configured gateway.
2. The gateway must map the Microsoft Entra UPN to a local Active Directory identity:
a. If Microsoft Entra DirSync (also known as _Microsoft Entra Connect_) is configured, then the mapping works automatically in the gateway. b. Otherwise, the gateway can look up and map the Microsoft Entra UPN to a local AD user by performing a lookup against the local Active Directory domain.
3. The gateway service process impersonates the mapped local user, opens the connection to the underlying database, and then sends the query. You don't need to install the gateway on the same machine as the database.
Related content
---------------
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](service-gateway-sso-kerberos)
* [Single sign-on (SSO) - SAML](service-gateway-sso-saml)
* [Overview of single sign-on (SSO) for on-premises data gateways in Power BI](service-gateway-sso-overview)
* * *
Feedback
--------
Was this page helpful?
Yes No
[Provide product feedback](https://ideas.fabric.microsoft.com/?forum=2d80fd4a-16cb-4189-896b-e0dac5e08b41)
| [Ask the community](https://community.fabric.microsoft.com/powerbi)
* * *
Additional resources
--------------------
---
# Microsoft Entra SSO - Power BI | Microsoft Learn
Table of contents Exit focus mode
Ask Learn Ask Learn [Read in English](# "Read in English")
Save[](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-gateway-azure-active-directory-sso.md "Edit This Document")
Table of contents [Read in English](# "Read in English")
Add Add to plan [Edit](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-gateway-azure-active-directory-sso.md "Edit This Document")
* * *
#### Share via
[Facebook](#)
[x.com](#)
[LinkedIn](#)
[Email](#)
* * *
Print
* * *
Note
Access to this page requires authorization. You can try [signing in](#)
or changing directories.
Access to this page requires authorization. You can try changing directories.
Microsoft Entra SSO
===================
* Article
* 2024-06-28
* 10 contributors
Feedback
You can use Microsoft Entra single sign-on (SSO) to authenticate to the data gateway and access cloud data sources that rely on Microsoft Entra ID based authentication. When you configure Microsoft Entra SSO on the on-premises data gateway for an applicable data source, queries run under the Microsoft Entra identity of the user that interacts with the Power BI report.
Azure Virtual Networks (VNets) offer network isolation and security for your resources on the Microsoft cloud. On-premises data gateways help you achieve a secure way to connect to these data sources. Microsoft Entra SSO allows users to see only data that they have access to.
Note
VNet data gateways, which are available in public preview for Power BI Premium Semantic models, eliminate the need to install an on-premises data gateway for connecting to your VNet data sources. To learn more about VNet gateways and their current limitations, see [What is a virtual network (VNet) data gateway](/en-us/data-integration/vnet/overview)
.
The data sources listed here aren't supported with Microsoft Entra SSO using an on-premises data gateway behind an Azure VNet:
* Analysis Services
* ADLS Gen1
* ADLS Gen2
* Azure Blobs
* CDPA
* Exchange
* OData
* SharePoint
* SQL Server
* Web
* AzureDevOpsServer
* CDSTOData
* Cognite
* CommonDataService
* Databricks
* EQuIS
* Kusto (when using the newer “DataExplorer” function)
* VSTS
* Workplace Analytics
For more information on SSO, and a list of supported data sources for Microsoft Entra SSO, see [Overview of single sign-on for on-premises data gateways in Power BI](service-gateway-sso-overview)
.
Query steps when running Microsoft Entra SSO
--------------------------------------------

Enable Microsoft Entra SSO for Gateway
--------------------------------------
Because the Microsoft Entra token of the user is passed via the gateway, it's possible for an admin of the gateway computer to obtain access to these tokens. To make sure a user with malicious intent isn't able to intercept these tokens, the following safeguard mechanisms are available:
* Only Fabric administrators can enable Microsoft Entra SSO for a tenant by enabling the setting in the Microsoft Fabric admin portal. For more information, see [Microsoft Entra single sign-on for gateways](/en-us/fabric/admin/service-admin-portal-integration#azure-ad-single-sign-on-sso-for-gateway)
.
* As a Fabric administrator, you can also control who can install gateways in your tenant. For more information, see [Manage gateway installers](/en-us/power-platform/admin/onpremises-data-gateway-management#manage-gateway-installers)
.
The Microsoft Entra SSO feature is disabled by default for on-premises data gateways. As a Fabric administrator, you have to enable the **Microsoft Entra Single Sign-On (SSO) for Gateway** tenant setting in the Admin portal before data sources can use Microsoft Entra SSO on an on-premises data gateway.

Related content
---------------
* [Overview of single sign-on for on-premises data gateways in Power BI](service-gateway-sso-overview)
* * *
Feedback
--------
Was this page helpful?
Yes No
[Provide product feedback](https://ideas.fabric.microsoft.com/?forum=2d80fd4a-16cb-4189-896b-e0dac5e08b41)
| [Ask the community](https://community.fabric.microsoft.com/powerbi)
* * *
Additional resources
--------------------
---
# Use composite models in Power BI Desktop - Power BI | Microsoft Learn
Table of contents Exit focus mode
Ask Learn Ask Learn [Read in English](# "Read in English")
Save[](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/transform-model/desktop-composite-models.md "Edit This Document")
Table of contents [Read in English](# "Read in English")
Add Add to plan [Edit](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/transform-model/desktop-composite-models.md "Edit This Document")
* * *
#### Share via
[Facebook](#)
[x.com](#)
[LinkedIn](#)
[Email](#)
* * *
Print
* * *
Note
Access to this page requires authorization. You can try [signing in](#)
or changing directories.
Access to this page requires authorization. You can try changing directories.
Use composite models in Power BI Desktop
========================================
* Article
* 2024-12-16
* 20 contributors
Feedback
Previously in Power BI Desktop, when you used a DirectQuery in a report, no other data connections, whether DirectQuery or import, were allowed for that report. With composite models, that restriction is removed. A report can seamlessly include data connections from more than one DirectQuery or import data connection, in any combination you choose.
The composite models capability in Power BI Desktop consists of three related features:
* **Composite models**: Allows a report to have two or more data connections from different source groups. These source groups can be one or more DirectQuery connections and an import connection, two or more DirectQuery connections, or any combination thereof. This article describes composite models in detail.
* **Many-to-many relationships**: With composite models, you can establish _many-to-many relationships_ between tables. This approach removes requirements for unique values in tables. It also removes previous workarounds, such as introducing new tables only to establish relationships. For more information, see [Apply many-many relationships in Power BI Desktop](desktop-many-to-many-relationships)
.
* **Storage mode**: You can now specify which visuals query back-end data sources. This feature helps improve performance and reduce back-end load. Previously, even simple visuals, such as slicers, initiated queries to back-end sources. For more information, see [Manage storage mode in Power BI Desktop](desktop-storage-mode)
.
Use composite models
--------------------
With composite models, you can connect to different kinds of data sources when you use Power BI Desktop or the Power BI service. You can make those data connections in a couple of ways:
* By importing data to Power BI, which is the most common way to get data.
* By connecting directly to data in its original source repository by using DirectQuery. To learn more about DirectQuery, see [DirectQuery in Power BI](../connect-data/desktop-directquery-about)
.
When you use DirectQuery, composite models make it possible to create a Power BI model, such as a single _.pbix_ Power BI Desktop file that does either or both of the following actions:
* Combines data from one or more DirectQuery sources.
* Combines data from DirectQuery sources and import data.
For example, by using composite models, you can build a model that combines the following types of data:
* Sales data from an enterprise data warehouse.
* Sales-target data from a departmental SQL Server database.
* Data imported from a spreadsheet.
A model that combines data from more than one DirectQuery source or that combines DirectQuery with import data is called a composite model.
You can create relationships between tables as you always have, even when those tables come from different sources. Any relationships that are cross-source are created with a cardinality of many-to-many, regardless of their actual cardinality. You can change them to one-to-many, many-to-one, or one-to-one. Whichever cardinality you set, cross-source relationships have different behavior. You can't use Data Analysis Expressions (DAX) functions to retrieve values on the `one` side from the `many` side. You might also see a performance impact versus many-to-many relationships within the same source.
Note
Within the context of composite models, all imported tables are effectively a single source, regardless of the actual underlying data sources.
Example of a composite model
----------------------------
For an example of a composite model, consider a report that connects to a corporate data warehouse in SQL Server by using DirectQuery. In this instance, the data warehouse contains **Sales by Country**, **Quarter**, and **Bike (Product)** data, as shown in the following image:

At this point, you could build simple visuals by using fields from this source. The following image shows total sales by _ProductName_, for a selected quarter.

But what if you have data in an Excel spreadsheet about the product manager assigned to each product, along with the marketing priority? If you want to view **Sales Amount** by **Product Manager**, it might not be possible to add this local data to the corporate data warehouse. Or it might take months at best.
It might be possible to import that sales data from the data warehouse, instead of using DirectQuery. And the sales data could then be combined with the data that you imported from the spreadsheet. However, that approach is unreasonable, for the reasons that led to using DirectQuery in the first place. The reasons could include:
* Some combination of the security rules enforced in the underlying source.
* The need to be able to view the latest data.
* The sheer scale of the data.
Here's where composite models come in. Composite models let you connect to the data warehouse by using DirectQuery and then use **Get data** for more sources. In this example, we first establish the DirectQuery connection to the corporate data warehouse. We use **Get data**, choose **Excel**, and then navigate to the spreadsheet that contains our local data. Finally, we import the spreadsheet that contains the _Product Names_, the assigned **Sales Manager**, and the **Priority**.

In the **Fields** list, you can see two tables: the original **Bike** table from SQL Server and a new **ProductManagers** table. The new table contains the data imported from Excel.

Similarly, in the **Relationship** view in Power BI Desktop, we now see another table called **ProductManagers**.

We now need to relate these tables to the other tables in the model. As always, we create a relationship between the **Bike** table from SQL Server and the imported **ProductManagers** table. That is, the relationship is between **Bike\[ProductName\]** and **ProductManagers\[ProductName\]**. As discussed earlier, all relationships that go across source default to many-to-many cardinality.

Now that we've established this relationship, it's displayed in the **Relationship** view in Power BI Desktop, as we would expect.

We can now create visuals by using any of the fields in the **Fields** list. This approach seamlessly blends data from multiple sources. For example, the total _SalesAmount_ for each _Product Manager_ is displayed in the following image:

The following example displays a common case of a _dimension_ table, such as **Product** or **Customer**, that's extended with some extra data imported from somewhere else. It's also possible to have tables use DirectQuery to connect to various sources. To continue with our example, imagine that **Sales Targets** per **Country** and **Period** are stored in a separate departmental database. As usual, you can use **Get data** to connect to that data, as shown in the following image:

As we did earlier, we can create relationships between the new table and other tables in the model. Then we can create visuals that combine the table data. Let's look again at the **Relationships** view, where we've established the new relationships:

The next image is based on the new data and relationships we created. The visual at the lower left shows total _Sales Amount_ versus _Target_, and the variance calculation shows the difference. The **Sales Amount** and **Target** data come from two different SQL Server databases.

Set the storage mode
--------------------
Each table in a composite model has a storage mode that indicates whether the table is based on DirectQuery or import. The storage mode can be viewed and modified in the **Property** pane. To display the storage mode, right-click a table in the **Fields** list, and then select **Properties**. The following image shows the storage mode for the **SalesTargets** table.
The storage mode can also be viewed on the tooltip for each table.

For any Power BI Desktop file (a _.pbix_ file) that contains some tables from DirectQuery and some import tables, the status bar displays a storage mode called **Mixed**. You can select that term in the status bar and easily switch all tables to import.
For more information about storage mode, see [Manage storage mode in Power BI Desktop](desktop-storage-mode)
.
Note
You can use _Mixed_ storage mode in Power BI Desktop and in the Power BI service.
Calculated tables
-----------------
You can add calculated tables to a model in Power BI Desktop that uses DirectQuery. The Data Analysis Expressions (DAX) that define the calculated table can reference either imported or DirectQuery tables or a combination of the two.
Calculated tables are always imported, and their data is refreshed when you refresh the tables. If a calculated table refers to a DirectQuery table, visuals that refer to the DirectQuery table always show the latest values in the underlying source. Alternatively, visuals that refer to the calculated table show the values at the time when the calculated table was last refreshed.
Important
Calculated tables aren't supported in the Power BI service using this feature unless you meet specific requirements. For more information about this, see the [Working with a composite model based on a semantic model](#working-with-a-composite-model-based-on-a-semantic-model)
section in this article.
Security implications
---------------------
Composite models have some security implications. A query sent to one data source can include data values that have been retrieved from another source. In the earlier example, the visual that shows **(Sales Amount)** by **Product Manager** sends an SQL query to the Sales relational database. That SQL query might contain the names of Product Managers and their associated Products.

So, information stored in the spreadsheet is now included in a query sent to the relational database. If this information is confidential, you should consider the security implications. In particular, consider the following points:
* Any administrator of the database who can view traces or audit logs could view this information, even without permissions to the data in its original source. In this example, the administrator would need permissions to the Excel file.
* The encryption settings for each source should be considered. You want to avoid retrieving information from one source by an encrypted connection and then inadvertently including it in a query sent to another source by an unencrypted connection.
To allow confirmation that you've considered any security implications, Power BI Desktop displays a warning message when you create a composite model.
Additionally, if an author adds _Table1_ from _Model A_ to a Composite Model (let's call it _Model C_ for reference), then a user viewing a report built on _Model C_ could query **any table** in _Model A_ that isn't protected by row-level security RLS.
For similar reasons, be careful when you open a Power BI Desktop file sent from an untrusted source. If the file contains composite models, information that someone retrieves from one source, by using the credentials of the user who opens the file, would be sent to another data source as part of the query. The information could be viewed by the malicious author of the Power BI Desktop file. When you initially open a Power BI Desktop file that contains multiple sources, Power BI Desktop displays a warning. The warning is similar to the one displayed when you open a file that contains native SQL queries.
Performance implications
------------------------
When you use DirectQuery, you should always consider performance, primarily to ensure that the back-end source has sufficient resources to provide a good experience for users. A good experience means that the visuals refresh in five seconds or less. For more performance advice, see [DirectQuery in Power BI](../connect-data/desktop-directquery-about)
.
Using composite models adds other performance considerations. A single visual can result in sending queries to multiple sources, which often pass the results from one query across to a second source. This situation can result in the following forms of execution:
* **A source query that includes a large number of literal values**: For example, a visual that requests total **Sales Amount** for a set of selected **Product Managers** would first need to find which **Products** were managed by those product managers. This sequence must happen before the visual sends an SQL query that includes all of the product IDs in a `WHERE` clause.
* **A source query that queries at a lower level of granularity, with the data later being aggregated locally**: As the number of **Products** that meet the filter criteria on **Product Manager** grows large, it can become inefficient or unfeasible to include all products in a `WHERE` clause. Instead, you can query the relational source at the lower level of **Products** and then aggregate the results locally. If the cardinality of **Products** exceeds a limit of 1 million, the query fails.
* **Multiple source queries, one per group by value**: When the aggregation uses **DistinctCount** and is grouped by a column from another source, and if the external source doesn't support efficient passing of many literal values that define the grouping, it's necessary to send one SQL query per group by value.
A visual that requests a distinct count of **CustomerAccountNumber** from the SQL Server table by **Product Managers** imported from the spreadsheet would need to pass in the details from the **Product Managers** table in the query sent to SQL Server. Over other sources, Redshift, for example, this action is unfeasible. Instead, there would be one SQL query sent per **Sales Manager**, up to some practical limit, at which point the query would fail.
Each of these cases has its own implications on performance, and the exact details vary for each data source. Although the cardinality of the columns used in the relationship that joins the two sources remains low, a few thousand, performance shouldn't be affected. As this cardinality grows, you should pay more attention to the impact on the resulting performance.
Additionally, the use of many-to-many relationships means that separate queries must be sent to the underlying source for each total or subtotal level, rather than aggregating the detailed values locally. A simple table visual with totals would send two source queries, rather than one.
Source groups
-------------
A source group is a collection of items, such as tables and relationships, from a DirectQuery source or all import sources involved in a data model. A composite model is made of one or more source groups. Consider the following examples:
* A composite model that connects to a Power BI semantic model called **Sales** and enriches the semantic model by adding a **Sales YTD** measure, which isn't available in the original semantic model. This model consists of one source group.
* A composite model that combines data by importing a table from an Excel sheet called **Targets** and a CSV file called **Regions**, and making a DirectQuery connection to a Power BI semantic model called **Sales**. In this case, there are two source groups as shown in the following image:
* The first source group contains the tables from the **Targets** Excel sheet, and the **Regions** CSV file.
* The second source group contains the items from the **Sales** Power BI semantic model.

If you added another DirectQuery connection to another source, such as a DirectQuery connection to a SQL Server database called **Inventory**, the items from that source are added another source group:

Note
Importing data from another source will **not** add another source group, because all items from all imported sources are in one source group.
### Source groups and relationships
There are two types of relationships in a composite model:
* **Intra source group relationships.** These relationships relate items within a source group together. These relationships are always regular relationships unless they're many-to-many, in which case they're limited.
* **Cross source group relationships.** These relationships start in one source group and end in a different source group. These relationships are always limited relationships.
[Read more about the distinction between regular and limited relationships and their impact.](desktop-relationships-understand#relationship-evaluation)
For example, in the following image we added three cross source group relationships, relating tables across the various source groups together:

### Local and remote
Any item that is in a source group that is a DirectQuery source group is considered **remote**, unless the item was defined locally as part of an extension or enrichment to the DirectQuery source and isn't part of the remote source, such as a measure or a calculated table. A calculated table based on a table from the DirectQuery source group belongs to the "Import" source group and is considered **local**. Any item that is in the "Import" source group is considered local. For example, if you define the following measure in a composite model that uses a DirectQuery connection to the Inventory source, the measure is considered local:
[Average Inventory Count] = Average(Inventory[Inventory Count])
### Calculation groups, query, and measure evaluation
[Calculation groups](/en-us/analysis-services/tabular-models/calculation-groups)
provide a way to reduce the number of redundant measures and grouping common measure expressions together. Typical use cases are time-intelligence calculations where you want to be able to switch from actuals to month-to-date, quarter-to-date, or year-to-date calculations. When working with composite models, it's important to be aware of the interaction between calculation groups and whether a measure only refers to items from a single remote source group. If a measure only refers to items from a single remote source group and the remote model defines a calculation group that impacts the measure, that calculation group is applied, even if the measure was defined in the remote model or in the local model. However, if a measure doesn't refer to items from a single remote source group exclusively but refers to items from a remote source group on which a remote calculation group is applied, the results of the measure might still be impacted by the remote calculation group. Consider the following example:
* Reseller Sales is a measure defined in the remote model.
* The remote model contains a calculation group that changes the result of Reseller Sales
* Internet Sales is a measure defined in the local model.
* Total Sales is a measure defined in the local model, and has the following definition:
[Total Sales] = [Internet Sales] + [Reseller Sales]
In this scenario, the **Internet Sales measure** isn't impacted by the calculation group defined in the remote model because they aren't part of the same model. However, the calculation group can change the result of the **Reseller Sales** measure, because they are in the same model. This fact means that the results returned by the **Total Sales** measure must be evaluated carefully. Imagine we use the calculation group in the remote model to return year-to-date results. The result returned by **Reseller Sales** is now a year-to-date value, while the result returned by **Internet Sales** is still an actual. The result of **Total Sales** is now likely unexpected, as it adds an actual to a year-to-date result.
Composite models on Power BI semantic models and Analysis Services
------------------------------------------------------------------
Using composite models with Power BI semantic models and Analysis Services, you can build a composite model using a DirectQuery connection to connect to Power BI semantic models, Azure Analysis Services (AAS), and SQL Server 2022 Analysis Services. Using a composite model, you can combine the data in these sources with other DirectQuery and imported data. Report authors who want to combine the data from their enterprise semantic model with other data they own, such as an Excel spreadsheet, or want to personalize or enrich the metadata from their enterprise semantic model, will find this functionality especially useful.
### Managing composite models on Power BI semantic models
To enable the creation and consumption of composite models on Power BI semantic models, your tenant needs to have the following switches enabled:
* [Allow XMLA Endpoints and Analyze in Excel with on-premises semantic models](/en-us/fabric/admin/service-admin-portal-integration#allow-xmla-endpoints-and-analyze-in-excel-with-on-premises-datasets)
. If this switch is disabled a DirectQuery connection to a Power BI semantic model can't be made.
* [Users can work with Power BI semantic models in Excel using a live connection](/en-us/fabric/admin/service-admin-portal-export-sharing#users-can-work-with-power-bi-datasets-in-excel-using-a-live-connection)
. If this switch is disabled, users can't make live connections to Power BI semantic models so the **Make changes to this model** button can't be reached.
* [Allow DirectQuery connection to Power BI semantic models](/en-us/fabric/admin/service-admin-portal-export-sharing#allow-directquery-connections-to-power-bi-datasets)
. See the following paragraphs for more information on this switch and the effect of disabling it.
Additionally, for Premium capacities and Premium Per User the ["XMLA endpoint" setting should be enabled and set to to either "Read Only" or "Read/Write"](../enterprise/service-premium-connect-tools#enable-xmla-read-write)
.
Tenant administrators can enable or disable DirectQuery connections to Power BI semantic models in the admin portal. While this is enabled by default, disabling it stops users from publishing new composite models on Power BI semantic models to the service.

Existing reports that use a composite model on a Power BI semantic model continue to work and users can still create the composite model in using Desktop but can't publish to the service. Instead, when you create a DirectQuery connection to the Power BI semantic model by selecting **Make changes to this model** you'll see the following warning message:

This way you can still explore the semantic model in your local Power BI Desktop environment and create the composite model. However, you aren't able to publish the report to the Service. When you publish the report and model, you'll see the following error message and publication is blocked:

Live connections to Power BI semantic models aren't influenced by the switch, nor are live or DirectQuery connections to Analysis Services. These continue to work regardless of if the switch has been turned off. Also, any published reports that use a composite model on a Power BI semantic model will continue to work even if the switch has been turned off after they were published.
### Building a composite model on a semantic model or model
Building a composite model on a Power BI semantic model or Analysis Services model requires your report to have a local model. You can start from a live connection and add or upgrade to a local model, or start with a DirectQuery connection or imported data, which automatically creates a local model in your report.
To see which connections are being used in your model, check the status bar in the bottom right corner of Power BI Desktop. If you're only connected to an Analysis Services source, you see a message like the following image:

If you're connected to a Power BI semantic model, you see a message telling you which Power BI semantic model you're connected to:

If you want to customize the metadata of fields in your live connected semantic model, select **Make changes to this model** in the status bar. Alternatively, you can select the **Make changes to this model** button in the ribbon, as shown in the following image. In **Report View** the **Make changes to this model** button in the **Modeling** tab. In Model View, the button is in the **Home** tab.

Selecting the button displays a dialog confirming addition of a local model. Select **Add a local model** to enable creating new columns or modifying the metadata, for fields from Power BI semantic models or Analysis Services. The following image shows the dialog shown.

When you're connected live to an Analysis Services source, there's no local model. To use DirectQuery for live connected sources, such as Power BI semantic models and Analysis Services, you must add a local model to your report. When you publish a report with a local model to the Power BI service, a semantic model for that local model is published a well.
### Chaining
Semantic models and the semantic models on which they're based form a _chain_. This process, called _chaining_, lets you publish a report and semantic model based on other Power BI semantic models, a feature that previously wasn't possible.
For example, imagine your colleague publishes a Power BI semantic model called _Sales and Budget_ based on an Analysis Services model called _Sales_, and combines it with an Excel sheet called _Budget_.
When you publish a new report (and semantic model) called _Sales and Budget Europe_ based on the _Sales and Budget_ Power BI semantic model published by your colleague, making some further modifications or extensions as you do so, you're effectively adding a report and semantic model to a chain of length three, which started with the _Sales_ Analysis Services model, and ends with your _Sales and Budget Europe_ Power BI semantic model. The following image visualizes this chaining process.

The chain in the previous image is of length three, which is the maximum length. Extending beyond a chain length of three isn't supported and results in errors.
### Permissions and licensing
Users accessing reports using a composite model need to have proper permissions to [all semantic models and models in the chain](#chaining)
.
The owner of the composite model requires **Build** permission on the semantic models used as sources so that other users can access those models on behalf of the owner. As a result, creating the composite model connection in Power BI Desktop or authoring the report in Power BI require **Build** permissions on the semantic models used as sources.
Users who view reports using the composite model will generally require **Read** permissions on the composite model itself and the semantic models used as sources. **Build** permissions might be required if the reports are in a Pro workspace. [These tenant switches](#managing-composite-models-on-power-bi-semantic-models)
should be enabled for the user.
The required permissions can be illustrated with the following example:
* **Composite Model A** (owned by **Owner A**)
* Data source A1: **Semantic Model B**.
**Owner A** must have **Build** permission on **Semantic Model B** for users to view the report using **Composite Model A**.
* **Composite Model C** (owned by **Owner C**)
* Data source C1: **Semantic Model D**
**Owner C** must have **Build** permission on **Semantic Model D** for users to view the report using **Composite Model C**.
* Data source C2: **Composite Model A**
**Owner C** must have **Build** permission on **Composite Model A** and **Read** permission on **Semantic Model B**.
A user viewing reports using **Composite Model A** must have **Read** permissions to both **Composite Model A** and **Semantic Model B**, while a user viewing reports using **Composite Model C** must have **Read** permissions on **Composite Model C**, **Semantic Model D**, **Composite Model A** and **Semantic Model B**.
Note
Refer to this blogpost for important information about [permissions required for composite models on Power BI semantic models and Analysis Services models](https://powerbi.microsoft.com/blog/announcing-general-availability-for-composite-models-on-power-bi-datasets-and-analysis-services-models/)
.
If any dataset in the chain is in a Premium Per User workspace, the user accessing it needs a [Premium Per User license](../fundamentals/service-features-license-type#premium-per-user-ppu-license)
. If any dataset in the chain is in a Pro workspace, the user accessing it needs a [Pro license](../fundamentals/service-features-license-type#pro-license)
. If all the datasets in the chain are on [Premium capacities](../fundamentals/service-features-license-type#premium-capacity)
or [Fabric F64 or greater capacity](/en-us/fabric/enterprise/licenses#capacity-and-skus)
, a user can access it using a [Free license](../fundamentals/service-features-license-type#free-per-user-license)
.
### Security warning
Using the **Composite models on Power BI semantic models and Analysis Services models** feature presents you with a security warning dialog, shown in the following image.

Data may be pushed from one data source to another, which is the same security warning for combining DirectQuery and import sources in a data model. To learn more about this behavior, see [using composite models in Power BI Desktop](desktop-composite-models)
.
### Supported scenarios
You can build composite models using data from Power BI semantic models or Analysis Services models to service the following scenarios:
* Connecting to data from various sources: Import (such as files), Power BI semantic models, Analysis Services models
* Creating relationships between different data sources
* Writing measures that use fields from different data sources
* Creating new columns for tables from Power BI semantic models or Analysis Services models
* Creating visuals that use columns from different data sources
* You can remove a table from your model using the field list, to keep models as concise, and lean as possible (if you connect to a perspective, you can't remove tables from the model)
* You can specify which tables to load, rather than having to load all tables when you only want a specific subset of tables. See Loading a subset of tables later in this document.
* You can specify whether to add any tables that are later added to the semantic model after you make the connection in your model.
### Working with a composite model based on a semantic model
When working with DirectQuery for Power BI semantic models and Analysis Services, consider the following information:
* If you refresh your data sources, and there are errors with conflicting field or table names, Power BI resolves the errors for you.
* You can't edit, delete, or create new relationships in the same Power BI semantic model or Analysis Services source. If you have edit access to these sources, you can make the changes directly in the data source instead.
* You can't change data types of columns that are loaded from a Power BI semantic model or Analysis Services source. If you need to change the data type, either change it in the source or use a calculated column.
* To build reports in the Power BI service on a composite model based on another semantic model, all credentials must be set.
* Connections to a SQL Server 2022 and later Analysis Services server on-premises or IAAS require an On-premises data gateway (Standard mode).
* All connections to remote Power BI semantic models are made using single sign-on. Authenticating with a service principal isn't currently supported.
* RLS rules are applied on the source on which they're defined, but aren't applied to any other semantic models in the model. RLS defined in the report aren't applied to remote sources, and RLS set on remote sources aren't applied to other data sources. Also, you can't define RLS on a table loaded from a remote source, and RLS defined on local tables do not filter any tables loaded from a remote source.
* KPIs, row level security, and translations aren't imported from the source.
* You might see some unexpected behavior when using a date hierarchy. To resolve this issue, use a date column instead. After adding a date hierarchy to a visual, you can switch to a date column by clicking on the down arrow in the field name, and then clicking on the name of that field instead of using Date Hierarchy:

For more information on using date columns versus date hierarchies, see [apply auto date or time in Power BI Desktop](desktop-auto-date-time)
.
* The maximum length of a chain of models is three. Extending beyond the chain length of three isn't supported and results in errors.
* A discourage chaining flag can be set on a model to prevent a chain from being created or extended. For more information, see [Manage DirectQuery connections to a published semantic model](../connect-data/desktop-discourage-directquery-connections-to-dataset)
.
* The connection to a Power BI semantic model or Analysis Services model isn't shown in Power Query.
The following **limitations** apply when working with DirectQuery for Power BI semantic models and Analysis Services:
* Parameters for database and server names are currently disabled.
* Defining RLS on tables from a remote source isn't supported.
* Using any of the following sources as a DirectQuery source isn't supported:
* SQL Server Analysis Services (SSAS) Tabular models before version 2022
* SSAS Multidimensional models
* SAP HANA
* SAP Business Warehouse
* Real-time semantic models
* Sample semantic models
* Excel Online Refresh
* Data imported from Excel or CSV files on the Service
* Usage metrics
* Semantic models stored in “My workspace”
* Using Power BI Embedded with semantic models that include a DirectQuery connection to an external Analysis Services model (Azure Analysis Services/SQL Server Analysis Services) isn't currently supported.
* Publishing a report to web using the publish to web feature isn't supported.
* Calculation groups on remote sources aren't supported, with undefined query results.
* Calculated tables and calculated columns that reference a DirectQuery table from a data source with single sign-on (SSO) authentication are supported in the Power BI service with an assigned [shareable cloud connection](../connect-data/service-create-share-cloud-data-sources)
and / or [granular access control](../connect-data/service-create-share-cloud-data-sources#granular-access-control)
.
* If you rename a workspace after the DirectQuery connection has been set up you need to update the data source in Power BI Desktop for the report to continue working.
* Automatic page refresh (APR) is only supported for some scenarios, depending on the data source type. For more information, see [Automatic page refresh in Power BI](../create-reports/desktop-automatic-page-refresh)
.
* Take over of a semantic model that is using the **DirectQuery to other semantic models** feature isn't currently supported.
* As with any DirectQuery data source, hierarchies defined in an Analysis Services model or Power BI semantic model aren't shown when connecting to the model or semantic model in DirectQuery mode using Excel.
There are a few other things to **consider** when working with DirectQuery for Power BI semantic models and Analysis Services:
* **Use low-cardinality columns in cross source group relationships:** When you create a relationship across two different source groups, the columns participating in the relationship (also called the join columns) should have low cardinality, ideally 50,000 or less. This consideration applies to nonstring key columns; for string key columns, see the following consideration.
* **Avoid using large strings key columns in cross source group relationships:** When creating a cross source group relationship, avoid using large string columns as the relationship columns, especially for columns that have larger cardinality. When you must use strings columns as the relationship column, calculate the expected string length for the filter by multiplying cardinality (C) by the average length of the string column (A). Make sure the expected string length is below 250,000, such that _A ∗ C < 250,000_.
For more considerations and guidance, refer to [composite model guidance](../guidance/composite-model-guidance)
.
### Tenant considerations
Any model with a DirectQuery connection to a Power BI semantic model or to Analysis Services must be published in the same tenant, which is especially important when accessing a Power BI semantic model or an Analysis Services model using B2B guest identities, as depicted in the following diagram. See Guest users who can edit and manage content to find the tenant URL for publishing.
Consider the following diagram. The numbered steps in the diagram are described in paragraphs that follow.

In the diagram, Ash works with Contoso and is accessing data provided by Fabrikam. With Power BI Desktop, Ash creates a DirectQuery connection to an Analysis Services model that is hosted in Fabrikam’s tenant.
To authenticate, Ash uses a B2B Guest user identity (step 1 in the diagram).
If the report is published to Contoso’s Power BI service (step 2), the semantic model published in the Contoso tenant can't successfully authenticate against Fabrikam’s Analysis Services model (step 3). As a result, the report doesn't work.
In this scenario, since the Analysis Services model used is hosted in Fabrikam’s tenant, the report also must be published in Fabrikam's tenant. After successful publication in Fabrikam’s tenant (step 4), the semantic model can successfully access the Analysis Services model (step 5) and the report works properly.
### Working with object-level security
When a composite model gets data from a Power BI semantic model or Analysis Services via DirectQuery, and that source model is secured by object-level security, consumers of the composite model might notice unexpected results. The following section explains how these results might come about.
Object-level security (OLS) enables model authors to hide objects that make up the model schema (that is, tables, columns, metadata, etc.) from model consumers (for example, a report builder or a composite model author). In configuring OLS for an object, the model author creates a role, and then removes access to the object for users who are assigned to that role. From the standpoint of those users, the hidden object simply doesn't exist.
OLS is defined for and applied on the source model. It can't be defined for a composite model built on the source model.
When a composite model is built on top of an OLS-protected Power BI semantic model or Analysis Services model via DirectQuery connection, the model schema from the source model is copied over into the composite model. What gets copied depends on what the composite model author is permitted see in the source model according to the OLS rules that apply there. The data isn't copied over to the composite model – rather, it's always retrieved via DirectQuery from the source model when needed. In other words, data retrieval always gets back to the source model, where OLS rules apply.
Since the composite model isn't secured by OLS rules, the objects that consumers of the composite model see are those that the composite model author could see in the source model rather than what they themselves might have access to. This might result in the following situations:
* Someone looking at the composite model might see objects that are hidden from them in the source model by OLS.
* Conversely, they might NOT see an object in the composite model that they CAN see in the source model, because that object was hidden from the composite model author by the OLS rules controlling access to the source model.
An important point is that in spite of the case described in the first bullet, consumers of the composite model never see actual data they aren't supposed to see, because the data isn't located in the composite model. Rather, because of DirectQuery, it's retrieved as needed from the source semantic model, where OLS blocks unauthorized access.
With this background in mind, consider the following scenario:

1. Admin\_user published an enterprise semantic model using a Power BI semantic model or an Analysis Services model that has a Customer table and a Territory table. Admin\_user publishes the semantic model to the Power BI service and sets OLS rules that have the following effect:
* Finance users can't see the Customer table
* Marketing users can't see the Territory table
2. Finance\_user publishes a semantic model called "Finance semantic model" and a report called "Finance report" that connects via DirectQuery to the enterprise semantic model published in step 1. The Finance report includes a visual that uses a column from the Territory table.
3. Marketing\_user opens the Finance report. The visual that uses the Territory table is displayed, but returns an error, because when the report is opened, DirectQuery tries to retrieve the data from the source model using the credentials of the Marketing\_user, who is blocked from seeing the Territory table as per the OLS rules set on the enterprise semantic model.
4. Marketing\_user creates a new report called "Marketing Report" that uses the Finance semantic model as its source. The field list shows the tables and columns that Finance\_user has access to. Hence, the Territory table is shown in the fields list, but the Customer table isn't. However, when the Marketing\_user tries to create a visual that uses a column from the Territory table, an error is returned, because at that point DirectQuery tries to retrieve data from the source model using Marketing\_user's credentials, and OLS rules once again kick in and block access. The same thing happens when Marketing\_user creates a new semantic model and report that connect to the Finance semantic model with a DirectQuery connection – they see the Territory table in the fields list, since that is what Finance\_user could see, but when they try to create a visual that uses that table, they are blocked by the OLS rules on the enterprise semantic model.
5. Now let's say that Admin\_user updates the OLS rules on the enterprise semantic model to stop Finance from seeing the Territory table.
6. The updated OLS rules are only reflected in the Finance semantic model when it's refreshed. Thus, when the Finance\_user refreshes the Finance semantic model, the Territory table is no longer shown in the fields list, and the visual in the Finance report that uses a column from the Territory table returns an error for Finance\_user, because they're now not allowed to access the Territory table.
To summarize:
* Consumers of a composite model see the results of the OLS rules that were applicable to the author of the composite model when they created the model. Thus, when a new report is created based on the composite model, the field list shows the tables that the author of the composite model had access to when they created the model, regardless of what the current user has access to in the source model.
* OLS rules can't be defined on the composite model itself.
* A consumer of a composite model will never see actual data they aren't supposed to see, because relevant OLS rules on the source model block them when DirectQuery tries to retrieve the data using their credentials.
* If the source model updates its OLS rules, those changes only affect the composite model when it's refreshed.
### Loading a subset of tables from a Power BI semantic model or Analysis Services model
When connecting to a Power BI semantic model or Analysis Services model using a DirectQuery connection, you can decide which tables to connect to. You can also choose to automatically add any table that might get added to the semantic model or model after you make the connection to your model. When you connect to a perspective, your model contains all tables in the semantic model and any tables not included in the perspective are hidden. Moreover, any table that might get added to the perspective is added automatically. In the **Settings** menu, you can decide to automatically connect to tables that are added to the semantic model after you first set up the connection.
This dialog isn't shown for live connections.
Note
This dialog will only show if you add a DirectQuery connection to a Power BI semantic model or Analysis Services model to an existing model. You can also open this dialog by changing the DirectQuery connection to the Power BI semantic model or Analysis Services model in the Data source settings after you created it.

### Setting up deduplication rules
You can specify deduplication rules to keep measure and table names unique in a composite model by using the **Settings** option in the dialog shown previously:

In the previous example, we added ' (marketing)' as a suffix to any table or measure name that is in conflict with another source in the composite model. You can:
* enter a text to be added to the name of conflicting tables or measures
* specify whether you want the text to be added to the table or measure name as a prefix or a suffix
* apply the deduplication rule to tables, measures or both
* Choose to apply the deduplication rule only when a name conflict occurs or apply it all the time. The default is to apply the rule only when duplication occurs. In our example, any table or measure from the marketing source that doesn't have a duplicate in the sales source won't get a name change.
After you make the connections and set up the deduplication rule, your field list will show both 'Customer' and 'Customer (marketing)' according to the deduplication rule set up in our example:

If you don't specify a deduplication rule, or the deduplication rules you specified don't resolve the name conflict, the standard deduplication rules are still applied. The standard deduplication rules add a number to the name of the conflicting item. If there is a name conflict on the 'Customer' table one of the 'Customer' tables is renamed 'Customer 2'.
XMLA modifications and composite models
---------------------------------------
When changing a semantic model using XMLA, you must update the _ChangedProperties_ and _PBI\_RemovedChildren_ collection for the changed object to include any modified or removed properties. If you don't perform that update, Power BI modeling tools might overwrite any changes the next time the schema is synchronized with the data source.
Learn more about semantic model object lineage tags in the [lineage tags for Power BI semantic models](/en-us/analysis-services/tom/lineage-tags-for-power-bi-semantic-models)
article.
Considerations and limitations
------------------------------
Composite models present a few considerations and limitations:
**Mixed-mode connections** - When using a mixed mode connection that contains online data (such as a Power BI semantic model) and an on-premises semantic model (such as an Excel workbook), you must have gateway mapping established for visuals to properly appear.
Currently, [incremental refresh](../connect-data/incremental-refresh-overview)
is supported for composite models connecting to SQL, Oracle, and Teradata data sources only.
The following Live Connect tabular sources can't be used with composite models:
* SAP HANA
* SAP Business Warehouse
* SQL Server Analysis Services earlier than version 2022
* [Usage metrics (My workspace)](../collaborate-share/service-usage-metrics)
Using streaming semantic models in composite models isn't supported.
The existing limitations of DirectQuery still apply when you use composite models. Many of these limitations are now per table, depending upon the storage mode of the table. For example, a calculated column on an import table can refer to other tables that aren't in DirectQuery, but a calculated column on a DirectQuery table can still refer only to columns on the same table. Other limitations apply to the model as a whole, if any of the tables within the model are DirectQuery. For example, the QuickInsights feature isn't available on a model if any of the tables within it has a storage mode of DirectQuery.
If you are using row-level security in a composite model with some of the tables in DirectQuery mode, you must refresh the model to apply new updates from the DirectQuery tables. For example, if a Users table in DirectQuery mode has new user records at the source, the new records will only be included after the next model refresh. Power BI Service caches the Users query to improve performance and doesn’t reload the data from the source until the next manual or scheduled refresh.
Related content
---------------
For more information about composite models and DirectQuery, see the following articles:
* [Apply many-to-many relationships in Power BI Desktop](desktop-many-to-many-relationships)
* [Manage storage mode in Power BI Desktop](desktop-storage-mode)
* [DirectQuery in Power BI](../connect-data/desktop-directquery-about)
* [Power BI data sources](../connect-data/power-bi-data-sources)
* [Model relationships in Power BI Desktop](desktop-relationships-understand)
* * *
Feedback
--------
Was this page helpful?
Yes No
[Provide product feedback](https://ideas.fabric.microsoft.com/?forum=2d80fd4a-16cb-4189-896b-e0dac5e08b41)
| [Ask the community](https://community.fabric.microsoft.com/powerbi)
* * *
Additional resources
--------------------
---
# On-premises data gateway FAQ - Power BI | Microsoft Learn
Table of contents Exit focus mode
Ask Learn Ask Learn [Read in English](# "Read in English")
Save[](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-gateway-power-bi-faq.yml "Edit This Document")
Table of contents [Read in English](# "Read in English")
Add Add to plan [Edit](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-gateway-power-bi-faq.yml "Edit This Document")
* * *
#### Share via
[Facebook](#)
[x.com](#)
[LinkedIn](#)
[Email](#)
* * *
Print
* * *
Note
Access to this page requires authorization. You can try [signing in](#)
or changing directories.
Access to this page requires authorization. You can try changing directories.
On-premises data gateway FAQ - Power BI
=======================================
* FAQ
* 5 contributors
Feedback
Note
We've split the on-premises data gateway docs into [content that's specific to Power BI](service-gateway-onprem)
and [general content that applies to all services](/en-us/data-integration/gateway/service-gateway-onprem)
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.
Do I need to upgrade the on-premises data gateway (personal mode)?
------------------------------------------------------------------
No, you can keep using the on-premises data gateway (personal mode) for Power BI.
Are any special permissions required to install the gateway and manage it in the Power BI service?
--------------------------------------------------------------------------------------------------
No special permissions are required. You need to sign in with either a work or school email account.
Can I upload Excel workbooks with Power Pivot data models that connect to on-premises data sources, and do I need a gateway for this scenario?
----------------------------------------------------------------------------------------------------------------------------------------------
Yes, you can upload the workbook. 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 reupload an updated workbook each time. Or, use the gateway with scheduled refresh.
If users share dashboards with a DirectQuery connection, will other users see the data even though they might not have the same permissions?
--------------------------------------------------------------------------------------------------------------------------------------------
For a dashboard connected to 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.
Why can't I connect to my Oracle server?
----------------------------------------
You might need to install the Oracle client and configure the _tnsnames.ora_ file with the proper server information to connect to your Oracle server. The oracle client is a separate installation outside of the gateway. For more information, see [Install the Oracle client](service-gateway-onprem-manage-oracle#install-the-oracle-client)
.
Are R scripts supported?
------------------------
R scripts are supported only for personal mode.
Can I use msmdpump.dll to create custom effective username mappings for Analysis Services?
------------------------------------------------------------------------------------------
No. This use isn't supported.
Can I use the gateway to connect to a multidimensional (OLAP) instance?
-----------------------------------------------------------------------
Yes. The on-premises data gateway supports live connections to both Analysis Services Tabular and Multidimensional models.
What if I install the gateway on a computer in a different domain from my on-premises server that uses Windows authentication?
------------------------------------------------------------------------------------------------------------------------------
No guarantees. It depends on the trust relationship between the two domains. If two different domains are in a trusted domain model, the gateway might be able to connect to the Analysis Services server, and the effective username can be resolved. If not, you might encounter a sign-in failure.
How can I find out what effective username is being passed to my on-premises Analysis Services server?
------------------------------------------------------------------------------------------------------
See [Troubleshoot gateways - Power BI](service-gateway-onprem-tshoot)
.
Next steps
----------
* [Troubleshoot the on-premises data gateway](/en-us/data-integration/gateway/service-gateway-tshoot)
* [Power BI implementation planning: Data gateways](../guidance/powerbi-implementation-planning-data-gateways)
More questions? Ask the [Power BI Community](https://community.powerbi.com/)
.
* * *
Feedback
--------
Was this page helpful?
Yes No
[Provide product feedback](https://ideas.fabric.microsoft.com/?forum=2d80fd4a-16cb-4189-896b-e0dac5e08b41)
| [Ask the community](https://community.fabric.microsoft.com/powerbi)
* * *
Additional resources
--------------------
---
# Connect to cloud data sources in the Power BI service - Power BI | Microsoft Learn
Table of contents Exit focus mode
Ask Learn Ask Learn [Read in English](# "Read in English")
Save[](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-connect-cloud-data-sources.md "Edit This Document")
Table of contents [Read in English](# "Read in English")
Add Add to plan [Edit](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-connect-cloud-data-sources.md "Edit This Document")
* * *
#### Share via
[Facebook](#)
[x.com](#)
[LinkedIn](#)
[Email](#)
* * *
Print
* * *
Note
Access to this page requires authorization. You can try [signing in](#)
or changing directories.
Access to this page requires authorization. You can try changing directories.
Connect to cloud data sources in the Power BI service
=====================================================
* Article
* 2025-03-11
* 7 contributors
Feedback
With Power BI, you can share cloud connections for semantic models and paginated reports, datamarts and dataflows, as well as Power Query Online experiences in _Get data_, enabling you to create multiple connection objects to the same cloud data source. For example, you can create separate connections to the same data source, with different credentials or privacy settings, and share the connections with others, alleviating the need for those users to manage their own separate cloud connections.
Types of data connections
-------------------------
The following table shows how various types of connections map to the two primary connection types: data gateway connections, and direct cloud connections. The new capability described in this article is **Shareable cloud connections**.
| Data gateway connections | Direct cloud connections |
| --- | --- |
| Connections using a personal data gateway | Personal cloud connections |
| Connections using an enterprise or VNET data gateway | Shareable cloud connections (new) |
Advantages of shareable cloud connections
-----------------------------------------
Connections using a personal cloud connection come with several limitations. For example, with a personal cloud connection you can only create a single personal cloud connection object to a given data source. All semantic models that connect to the data source use the same personal cloud connection object, so if you change the credentials of the personal cloud connection, all semantic models using that personal cloud connection are affected. Often that's not a desired outcome.
Another limitation of a personal cloud connection is that they can't be shared with others, so other users can't bind their semantic models and paginated reports to the personal cloud connection you own; users must maintain their own personal cloud connections.
Shareable connections have no such limitations, and provide for more streamlined, more flexible connection management, including the following:
* **Support multiple connections to the same data source** - support for multiple connections on the same data source is particularly useful when you want to use different connection settings for different semantic models, and other artifacts. It's also useful when you want to assign individual artifacts their own separate connections, to ensure their connection settings are isolated from each other.
* **You can share these connections with other users** - with shareable connections you can assign other users _Owner_ permissions, enabling them to manage all aspects of the connection configuration, including credentials. You can provide other users with _Resharing_ permissions so they can use and reshare the connection with others. You can also provide _User_ permissions, enabling them to use the connection to bind their artifacts to the data source.
* **Lower the overhead of maintaining data connections and credentials** - when combined with the data source and gateway management experience, you can centralize data source connection management for gateway and cloud connections. Such centralization and management is already common for enterprise and VNET data gateways, for which a gateway administrator creates, shares, and maintains the connections. With shareable connections, you can now extend such centralized connection management to cloud data sources as well.
Compare shareable cloud connection to other connections
-------------------------------------------------------
By default, when you create a Power BI Desktop report that connects to a cloud data source, then upload it into a workspace in the Power BI service, Power BI creates a personal cloud connection and binds it to your semantic model, for which you must provide credentials. If an existing personal cloud connection is available, you likely provided the credentials previously.
In contrast, if you have access to at least one shareable cloud connection to the same data source, you can use the shareable cloud connection, which has already been configured for you by its owner, instead of having to use your only available personal cloud connection for the data source.
To use the shareable cloud connection, on the **Semantic models** settings page, under **Gateway and cloud connections**, find **Cloud connections** and can select the shareable cloud connection you want to use for the connection, then select **Apply**. The following screenshot shows the settings.

Create a new shareable cloud connection
---------------------------------------
You can create a new shareable cloud connection directly from the **Semantic model** settings page. Under **Gateway connections** > **Cloud connections**, select the **Maps to** dropdown and then select **Create a connection**.

A pane appears called **New connection** and automatically populates the configuration parameters.

Enabling the creation of new connections makes it easy to create separate shareable cloud connections for individual semantic models, if needed. You can also display the connection management page from anywhere in the Power BI service by selecting the **Settings** gear in the upper right corner of the Power BI service, then select **Manage connections and gateways**.
### Create a shareable cloud connection using workspace identity
You can also create a shareable cloud connection using the **Workspace identity** authentication method, which uses the automatically managed service principal associated with the Fabric workspace to connect to data. To use the connection, the model owner must have _Contributor_ (or higher) access to the workspace.
To create a **Workspace identity**, follow these steps:
1. Configure the workspace to have a **Workspace identity**. The Workspace identity is an automatically managed service principal associated with the Fabric workspace.
2. Create a shareable cloud connection (SCC) with **Workspace identity** as the authentication method.
3. Bind the data source to the SCC in the semantic model settings.
Keep the following considerations in mind when creating or using a **Workspace identity**:
* **Workspace identity** is supported with Fabric data sources.
* **Workspace identity** is also supported for Power BI semantic models. Set the _Authentication method_ in the Analysis Services data connection to **Workspace identity**. For **Workspace identity** authentication to work properly your organization must enable the tenant setting **Service principals can use Fabric APIs** because Analysis Services data connections must resolve the connection name to a workspace and to the target semantic model by using Fabric REST APIs.
* The connection type being used must support the **Workspace identity** authentication type, which includes SQL Server and ADLS connectors. For the connection type being used, if there's a **Workspace identity** option under the _Authentication_ setting, then that connector is supported.
Default connection settings
---------------------------
When connecting to a Fabric data source specifically, your Entra ID Single Sign-On (SSO) credentials are used by default.
You can also use a shareable cloud connection instead of the default connection settings to connect a semantic model to a Fabric data source, and thereby apply the settings you configured for that shareable cloud connection, such as fixed credentials. This enables you to bind the data source to the shareable cloud connection, and override the default SSO connection for that data source.
To select your shareable cloud connection instead of your default SSO settings, select the shareable cloud connection in the **Maps to:** drop-down for the data source to which you want your semantic model to connect, as shown in the following image:

If you don't have a shareable cloud connection, you can select _Create a connection_ and create a new connection, as described in the previous section of this article.
Using shareable cloud connections with paginated reports
--------------------------------------------------------
When you share your paginated report in the Power BI service, you can update the cloud connections from within the report itself. To modify the cloud connections for your paginated report, navigate to your workspace in the Power BI service, select the **More** button (ellipses) and then select **Manage**.

Selecting **Manage** presents a page with several tabs. Select the **Reports** tab from the top row, then you can update the connection from within the **Cloud connections** area, as shown in the following screenshot.

Limitations and considerations
------------------------------
* **Shareable cloud connections also share your credentials** - when you allow others to user your shareable cloud connections, it's important to understand that you're letting others connect their own semantic models, paginated reports, and other artifacts to the corresponding data sources by using the connection details and credentials you provided. Make sure you only share connections (and their credentials) that you're authorized to share.
* **Every user is limited to maximum 1000 data source connections in every cloud tenant**: If you reach the maximum number of data sources limit, verify that the number of data sources per user isn't over the limit of 1,000 connections. To resolve any related issues, you can manually remove existing data sources from the admin center or, alternatively, use the following PowerShell script to find and bulk-delete any data sources that exceed that limit.
## required module "mcirosoftpowerbimgmt" Install-Module -Name DataGateway and sign in the same user who exceeded the 1000 limit
Import-Module -name microsoftpowerbimgmt
## get the gateway information per the sign in person. Choose Environment: Public, USGov, China, USGovHigh, USGovMil
$environment = "Public"
Connect-PowerBIServiceAccount -Environment $environment
switch ($environment) {
"Public" { $baseURL = "https://api.powerbi.com/v2.0/myorg/me/"; Break }
"USGov" { $baseURL = "https://api.powerbigov.us/v2.0/myorg/me/"; Break }
"China" { $baseURL = "https://api.powerbi.cn/v2.0/myorg/me/"; Break }
"USGovHigh" { $baseURL = "https://api.high.powerbigov.us/v2.0/myorg/me/"; Break }
"USGovMil" { $baseURL = "https://api.mil.powerbigov.us/v2.0/myorg/me/"; Break }
}
$getDatasourcesURL = $baseURL + "gatewayClusterDatasources?$expand=users"
$datasources = Invoke-PowerBIRestMethod -Url $getDatasourcesURL -Method GET | ConvertFrom-Json
foreach($dataource in $datasources.value)
{
if($datasource.gatewayType -eq "TenantCloud")
{
"cloud datasource found with id = {0}, name = {1}" -f $dataource.id, $datasource.datasourceName
$gatewayId = $datasource.clusterId
$datasourceId = $dataource.id
## conditional logic to determine if name matches set
$deleteDatasourceURL = $baseURL + "gatewayClusters/$gatewayId/datasources/$datasourceId"
Invoke-PowerBIRestMethod -Url $deleteDatasourceURL -Method DELETE
}
}
If you're an ISV or any other Power BI Embedded app owner with many customers, use service principal profiles for multi-tenancy apps in Power BI embedded. If you're not an ISV, you might reach this limit because you're creating a new data source for every CSV or Excel file. To solve this, you might want to use the "upload file box" in Power BI Desktop to select multiple Excel files, which creates multiple data source connections. In this scenario, to ensure that only a single data source is selected, we recommend that you instead select the folder containing those Excel files.
* You can't mix an Excel on-premises data source with an existing Analysis Services DirectQuery data source; you can only include an Excel on-premises data source to your report if it's in a separate query. In such situations, you can map the Excel data source to a gateway, and leave the Analysis Services DirectQuery cloud data source as-is.
* Power BI Dataflow Gen1 and Fabric Dataflow Gen2 don't support sharable cloud connections. Other versions, like Power Apps dataflows, do support sharable cloud connections.
Related content
---------------
For more information about creating shareable cloud connections:
* [Create and share cloud data sources in the Power BI service](service-create-share-cloud-data-sources)
You can do all sorts of things with the Power BI service and Power BI Desktop. For more information on its capabilities, check out the following resources:
* [What is Power BI Desktop?](../fundamentals/desktop-what-is-desktop)
* [Query overview with Power BI Desktop](../transform-model/desktop-query-overview)
* [Data types in Power BI Desktop](desktop-data-types)
* [Shape and combine data with Power BI Desktop](desktop-shape-and-combine-data)
* [Common query tasks in Power BI Desktop](../transform-model/desktop-common-query-tasks)
* * *
Feedback
--------
Was this page helpful?
Yes No
[Provide product feedback](https://ideas.fabric.microsoft.com/?forum=2d80fd4a-16cb-4189-896b-e0dac5e08b41)
| [Ask the community](https://community.fabric.microsoft.com/powerbi)
* * *
Additional resources
--------------------
---
# Manage semantic model access permissions - Power BI | Microsoft Learn
Table of contents Exit focus mode
Ask Learn Ask Learn [Read in English](# "Read in English")
Save[](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-datasets-manage-access-permissions.md "Edit This Document")
Table of contents [Read in English](# "Read in English")
Add Add to plan [Edit](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-datasets-manage-access-permissions.md "Edit This Document")
* * *
#### Share via
[Facebook](#)
[x.com](#)
[LinkedIn](#)
[Email](#)
* * *
Print
* * *
Note
Access to this page requires authorization. You can try [signing in](#)
or changing directories.
Access to this page requires authorization. You can try changing directories.
Manage semantic model access permissions (preview)
==================================================
* Article
* 2024-11-04
* 5 contributors
Feedback
The semantic model manage permissions page enables you to monitor and manage access to your semantic model. It has two tabs that help you control access to your semantic model:
* **Direct access**: Enables you to monitor, add, modify, or delete access permissions for specific people or groups (distribution groups or security groups).
* **Shared report links**: Shows you [links that were generated for sharing reports](../collaborate-share/service-share-dashboards)
. Such links sometimes also give access to your semantic model. On this tab you can review them and remove them if necessary.
This document explains how to use the semantic model manage permissions page.
Note
In order to be able to access a semantic model's manage permissions page, you must have an [Admin or Member role](../collaborate-share/service-roles-new-workspaces)
in the workspace where the semantic model is located.
Open the semantic model manage permissions page
-----------------------------------------------
To open the semantic model manage permissions page:
* From the [OneLake data hub](service-data-hub#find-the-data-you-need)
or from the workspace for the semantic model: Select **Manage permissions** from the **More options (…)** menu available next to the semantic model name in the list.

* From the [semantic model details page](service-dataset-details-page#supported-actions)
: Select the **Share** icon on the action bar at the top of the page and choose **Manage permissions**.

These actions open the semantic models manage permissions page. The manage permissions page has two tabs to help you manage semantic model access.
Manage direct access
--------------------
The direct access tab lists users who have been granted access. For each user, you can see their email address and the permissions they have.
* To modify a user’s permissions, select **More options (…)** and choose one of the available options.

* To grant semantic model access to another user, select **\+ Add user**. The [Share semantic model dialog](service-datasets-share)
opens.

### Managing permissions granted through an app
Permissions on the semantic model granted through an app are indicated by the word "App" followed by the permissions enclosed in parentheses, as shown in the following image:

You can't modify permissions granted through an app directly from the Direct access tab. You must first remove them from the app configuration. To remove such permissions:
1. [Edit the app](../collaborate-share/service-create-distribute-apps#change-your-published-app)
and unselect the relevant permissions on the Permissions tab of the app's configuration settings.
2. Republish the app.
3. Go to the Direct access tab of the semantic model's manage semantic model permissions page as described in [Manage direct access](#manage-direct-access)
. The user still has the permissions granted via the app before update, but now they're not tied to the app (note that the parentheses are gone). Now you can remove whatever permissions you desire.

Manage links generated for report sharing
-----------------------------------------
The shared report links tab lists [links that have been created to shared reports](../collaborate-share/service-share-dashboards)
that are based on your semantic model. Such links might also grant access to the report’s underlying semantic model, and so these links are listed here. You can see what permissions the link carries and who created the link. You can also delete the link from the system if you so desire.
Warning
Deleting a link removes it from the system. Users who use the link to access a report may lose access to that report.

Related content
---------------
* [Semantic model permissions](service-datasets-permissions)
* [Share access to a semantic model](service-datasets-share)
* [Use semantic models across workspaces](service-datasets-across-workspaces)
* [Share a report via link](../collaborate-share/service-share-dashboards#share-a-report-via-link)
* Questions? [Try asking the Power BI Community](https://community.powerbi.com/)
* * *
Feedback
--------
Was this page helpful?
Yes No
[Provide product feedback](https://ideas.fabric.microsoft.com/?forum=2d80fd4a-16cb-4189-896b-e0dac5e08b41)
| [Ask the community](https://community.fabric.microsoft.com/powerbi)
* * *
Additional resources
--------------------
---
# Get data from comma separated value (CSV) files - Power BI | Microsoft Learn
Table of contents Exit focus mode
Ask Learn Ask Learn [Read in English](# "Read in English")
Save[](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-comma-separated-value-files.md "Edit This Document")
Table of contents [Read in English](# "Read in English")
Add Add to plan [Edit](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-comma-separated-value-files.md "Edit This Document")
* * *
#### Share via
[Facebook](#)
[x.com](#)
[LinkedIn](#)
[Email](#)
* * *
Print
* * *
Note
Access to this page requires authorization. You can try [signing in](#)
or changing directories.
Access to this page requires authorization. You can try changing directories.
Get data from comma separated value (CSV) files
===============================================
* Article
* 2024-01-17
* 9 contributors
Feedback

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 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](https://go.microsoft.com/fwlink/?LinkID=619356)
.
If you have a CSV, it’s time to get it into your Power BI site as a semantic model 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 semantic model in Power BI stays in-sync with your updated file, be sure the file is saved to OneDrive with the same name.
Where your file is saved makes a difference
-------------------------------------------
**Local** - If you save your CSV file to a local drive on your computer or another location in your organization, you can _import_ your file into Power BI. Your file will actually remain on your local drive, so the whole file isn’t imported into Power BI. What really happens is a new semantic model is created in Power BI and data from the CSV file is loaded into the semantic model.
**OneDrive for work or school** – If you have OneDrive for work or school and you sign into it with the same account you use to sign into Power BI, this method is the most effective way to keep your CSV file and your semantic model, reports, and dashboards in Power BI in-sync. Because both Power BI and OneDrive are in the cloud, Power BI _connects_ to your file on OneDrive about every hour. If any changes are found, your semantic model, reports, and dashboards are automatically updated in Power BI.
**OneDrive - Personal** – If you save your files to your own OneDrive account, you’ll get many of the same benefits as you would with OneDrive for work or school. The biggest difference is when you first connect to your file you’ll need to sign in to your OneDrive with your Microsoft account, which is different from what you use to sign in to Power BI. When signing into your OneDrive with your Microsoft account, be sure to select the **Keep me signed in** option. This way, Power BI will be able to connect to your file about every hour and make sure your semantic model in Power BI is in-sync.
**SharePoint** – Saving your Power BI Desktop files to SharePoint is much the same as saving to OneDrive for work or school. The biggest difference is how you connect to the file from Power BI. You can specify a URL or connect to the root folder.
Import or connect to a CSV file
-------------------------------
Important
The maximum file size you can import into Power BI is 1 GB.
1. In a Power BI workspace, select **New item**, then under **Store data**, select **Semantic model**.
[](media/service-comma-separated-value-files/new-upload-menu.png#lightbox)
2. In the window that appears, select **CSV**.

3. Go to the file you want to upload and then choose **Import**. A new **Semantic model details** window appears in the main pane of Power BI.

Related content
---------------
**Explore your data** - Once you get data from your file into Power BI, it's time to explore. Select **More options (...)**, and then choose an option from the menu.

**Schedule refresh** - If your file is saved to a local drive, you can schedule refreshes so your semantic model and reports in Power BI stay up-to-date. To learn more, see [Data refresh in Power BI](refresh-data)
. If your file is saved to OneDrive, Power BI will automatically synchronize with it about every hour.
* * *
Feedback
--------
Was this page helpful?
Yes No
[Provide product feedback](https://ideas.fabric.microsoft.com/?forum=2d80fd4a-16cb-4189-896b-e0dac5e08b41)
| [Ask the community](https://community.fabric.microsoft.com/powerbi)
* * *
Additional resources
--------------------
---
# Semantic model permissions - Power BI | Microsoft Learn
Table of contents Exit focus mode
Ask Learn Ask Learn [Read in English](# "Read in English")
Save[](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-datasets-permissions.md "Edit This Document")
Table of contents [Read in English](# "Read in English")
Add Add to plan [Edit](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-datasets-permissions.md "Edit This Document")
* * *
#### Share via
[Facebook](#)
[x.com](#)
[LinkedIn](#)
[Email](#)
* * *
Print
* * *
Note
Access to this page requires authorization. You can try [signing in](#)
or changing directories.
Access to this page requires authorization. You can try changing directories.
Semantic model permissions
==========================
* Article
* 2024-10-30
* 9 contributors
Feedback
This article describes semantic model permissions in the Power BI service and how these permissions are acquired by users.
What are the semantic model permissions?
----------------------------------------
The following table describes the four levels of permission that control access to semantic models in the Power BI service. The table also describes the permissions that the semantic model owner has on the semantic model, and other actions that only the semantic model owner can perform.
| Permission | Description |
| --- | --- |
| Read | Allows user to access reports and other solutions, such as composite models on Premium/PPU workspaces, that read data from the semantic model.
Allows user to view semantic model settings. |
| Build | Allows user to build new content from the semantic model and find content that uses the semantic model.
Allows user to access reports that access composite models on Power BI Pro workspaces.
Allows user to build composite models.
Allows user to pull the data into Analyze in Excel.
Allows querying using external APIs such as XMLA.
Allows user to see hidden data fields. |
| Reshare | Allows user to grant semantic model access. |
| Write | Allows user to republish the semantic model.
Allows user to [backup and restore the semantic model](../enterprise/service-premium-backup-restore-dataset)
.
Allows user to make changes to the semantic model via XMLA.
Allows user to edit semantic model settings, except data refresh, credentials, and automatic aggregations. |
| Owner | The semantic model owner isn't a permission in itself, but rather a conceptual role that has all the permissions on a semantic model. The first semantic model owner is the person who created the semantic model, and afterwards the last person to configure the semantic model after taking it over in the semantic model settings.
In addition to the permissions described in this table that can be granted explicitly, a semantic model owner can configure semantic model refresh, credentials, and automatic aggregations. |
Note
Build permission is primarily a discoverability feature. It enables users to easily discover semantic models and build Power BI reports and other consumable items based on the discovered models, such as Excel PivotTables and non-Microsoft data visualization tools, using the XMLA endpoint. Users who have Read permission without Build permission can consume and interact with existing reports that have been shared with them. Granting Read permission without Build permission should not be relied upon to secure sensitive data. Users with Read permission, even without Build permission, are able to access and interact with data in the semantic model.
How are semantic model permissions acquired?
--------------------------------------------
### Permissions acquired implicitly via workspace role
A user's role in a workspace implicitly grants them permissions on the semantic models in the workspace, as described in the following table.
| | Admin | Member | Contributor | Viewer |
| --- | --- | --- | --- | --- |
| **Read** |  |  |  |  |
| **Build** |  |  |  |  |
| **Reshare** |  |  |  |  |
| **Write** |  |  |  |  |
Note
Permissions inherited via workspace role can only be changed or taken away from a user by changing or removing their role in the workspace. They can't be changed or removed explicitly using the [manage permissions page](service-datasets-manage-access-permissions)
.
### Permissions granted explicitly via the manage semantic model permissions page
A user with an Admin or Member role in the workspace can explicitly grant permissions to other users using the [manage permissions page](service-datasets-manage-access-permissions)
.
### Permissions acquired via a link
When users share reports or semantic models, links are created that provide permissions on the semantic model. Users authorized to use those links are able to access the semantic model. Users with Admin or Member roles in the workspace where a semantic model is located can manage these links on the [manage permissions page](service-datasets-manage-access-permissions#manage-links-generated-for-report-sharing)
.
### Permissions granted in an app
Users can acquire permissions on a semantic model used in an app if the app owner allows this in the [app permissions configuration](../collaborate-share/service-create-distribute-apps#create-and-manage-multiple-audiences)
.
### Permissions granted via REST APIs
Semantic model permissions can be set via REST APIs. For more information, see [Semantic model permissions in the context of the Power BI REST APIs](../developer/embedded/datasets-permissions)
.
Semantic model permissions and row-level security (RLS)
-------------------------------------------------------
[Row-level security (RLS)](/en-us/fabric/security/service-admin-row-level-security)
might affect the ability of users with read or build permission on a semantic model to read data from the semantic model.
* When RLS **isn't** defined on the semantic model, users with write, read, or build permission on the semantic model can read data from the semantic model.
* When RLS **is** defined on the semantic model:
* Users with only read or build permission on the semantic model can't read data from the semantic model unless they belong to one of its RLS roles.
* Users with write permission on the semantic model can read data from the semantic model regardless of whether or not they belong to any of its RLS roles.
Related content
---------------
* [Share access to a semantic model](service-datasets-share)
* [Manage semantic model access permissions](service-datasets-manage-access-permissions)
* [Semantic model REST API permissions](../developer/embedded/datasets-permissions)
* * *
Feedback
--------
Was this page helpful?
Yes No
[Provide product feedback](https://ideas.fabric.microsoft.com/?forum=2d80fd4a-16cb-4189-896b-e0dac5e08b41)
| [Ask the community](https://community.fabric.microsoft.com/powerbi)
* * *
Additional resources
--------------------
---
# Publish to Power BI from Microsoft Excel - Power BI | Microsoft Learn
Table of contents Exit focus mode
Ask Learn Ask Learn [Read in English](# "Read in English")
Save[](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-publish-from-excel.md "Edit This Document")
Table of contents [Read in English](# "Read in English")
Add Add to plan [Edit](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-publish-from-excel.md "Edit This Document")
* * *
#### Share via
[Facebook](#)
[x.com](#)
[LinkedIn](#)
[Email](#)
* * *
Print
* * *
Note
Access to this page requires authorization. You can try [signing in](#)
or changing directories.
Access to this page requires authorization. You can try changing directories.
Publish to Power BI from Microsoft Excel
========================================
* Article
* 2024-07-20
* 9 contributors
Feedback
Important
Publish to Power BI will be deprecated from Excel in Microsoft 365 starting August 19th, 2024, and Publish to Power BI will not be included in the Excel 2024 perpetual release. This doesn't impact prior versions of on-premises Office.
The following capabilities are deprecated and will no longer be available starting September 29th, 2023:
* Upload of local workbooks to Power BI workspaces will no longer be allowed.
* Configuring scheduling of refresh and refresh now for Excel files that don’t already have scheduled refresh configured will no longer be allowed.
The following capabilities are deprecated and will no longer be available starting October 31, 2023:
* Scheduled refresh and refresh now for existing Excel files that were previously configured for scheduled refresh will no longer be allowed.
* Local workbooks uploaded to Power BI workspaces will no longer open in Power BI.
After October 31, 2023:
* You can download existing local workbooks from your Power BI workspace.
* You can publish your Excel data model as a Power BI semantic model and schedule refresh.
* You can import Excel workbooks from OneDrive and SharePoint Document libraries to view them in Power BI.
If your organization uses these capabilities, see more details in [Migrating your Excel workbooks](service-excel-workbook-files#migrating-your-excel-workbooks)
.
With Microsoft Excel 2016 and later, you can publish your Excel workbooks directly to your [Power BI](https://powerbi.microsoft.com)
workspace. In Power BI, you can create highly interactive reports and dashboards based on your workbook data. You can then share your insights with others in your organization.

When you publish a workbook to Power BI, there are few things to consider:
* You must use the same account to sign in to Office, OneDrive for work or school if your workbooks are saved there, and Power BI.
* You can't publish an empty workbook, or a workbook that doesn't have any Power BI supported content.
* You can't publish encrypted or password protected workbooks, or workbooks with Information Protection Management applied.
* Publishing to Power BI requires modern authentication to be enabled, the default. Otherwise, the **Publish** option isn't available from the **File** menu.
* Publishing to Power BI from Excel Desktop isn't supported for sovereign clouds.
Publish your Excel workbook
---------------------------
To publish your Excel workbook to Power BI, in Excel, select **File** > **Publish** and select either **Upload** or **Export**. The following screenshot shows the two options for how to get your workbook into Power BI:

* If you select **Upload**, you can interact with the workbook just as you would in Excel Online. You can also pin selections from your workbook onto Power BI dashboards, and share your workbook or selected elements through Power BI.
* If you select **Export**, you can export table data and its data model into a Power BI semantic model, and use the semantic model to create Power BI reports and dashboards.
When you select **Publish**, you can select the workspace to publish to. If your Excel file is on OneDrive for work or school, you can publish only to your _My Workspace_. If your Excel file is on a local drive, you can publish to _My Workspace_ or to a shared workspace you can access.

### Publish local files
Excel supports publishing local Excel files. Files don't need to be saved to OneDrive for work or school or to SharePoint Online.
Important
You can publish local files only 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 work or school or to SharePoint Online.
Once published, the workbook content you publish imports into Power BI, separate from the local file. If you want to update the file in Power BI, you must update the local file and publish the updated version again. Or, you can refresh the data by configuring scheduled refresh on the workbook or semantic model in Power BI.
### Publish from a standalone Excel installation
When you publish from a standalone Excel installation, you must save the workbook to OneDrive for work or school. Select **Save to Cloud** and choose a location in OneDrive for work or school.

Once you save your workbook to OneDrive for work or school, when you select **Publish**, you can use the **Upload** or **Export** options to get your workbook into Power BI.

#### Upload your workbook to Power BI
When you choose the **Upload** option, your workbook appears in Power BI just as it would in Excel Online. But unlike in Excel Online, you have options to let you pin elements from your worksheets to dashboards.
If you choose **Upload**, you can't edit your workbook in Power BI. If you need to change the data, you can select **Edit**, and then choose to edit your workbook in Excel Online or open it in Excel on your computer. Any changes you make are saved to the workbook on OneDrive for work or school.
When you choose **Upload**, no semantic model is created in Power BI. Your workbook appears in your workspace navigation pane under **Reports**. Workbooks uploaded to Power BI have an Excel icon that identifies them as uploaded Excel workbooks.
Choose the **Upload** option if you only have data in worksheets, or you have PivotTables and Charts you want to see in Power BI.
Using **Upload** from **Publish to Power BI** in Excel is a similar experience to using **Upload** > **OneDrive for Business** > **Upload** in Power BI, and then opening the file in Excel Online from Power BI in your browser.
#### Export workbook data to Power BI
When you choose the **Export** option, any supported data in tables and/or a data model are exported into a new semantic model in Power BI. You can continue editing your workbook. When you save your changes, they synchronize with the semantic model in Power BI, usually within about an hour. If you need more immediate updates, you can select **Publish** again from Excel to export your changes immediately. Any visualizations in reports and dashboards update too.
Choose the **Export** option if you used the **Get & Transform data** or **Power Pivot** features to load data into a data model.
Using **Export** is similar to using **New** > **Upload a file** > **Excel** > **Import** from Power BI in your browser.
### Publish
When you choose either **Upload** or **Export**, Excel signs in to Power BI with your current account and publishes your workbook to your Power BI workspace. You can monitor the status bar in Excel to see publishing progress.

When publishing is complete, you can go to Power BI directly from Excel.

Related content
---------------
* [Excel data in Power BI](service-excel-workbook-files)
* More questions? [Try the Power BI Community.](https://community.powerbi.com/)
* * *
Feedback
--------
Was this page helpful?
Yes No
[Provide product feedback](https://ideas.fabric.microsoft.com/?forum=2d80fd4a-16cb-4189-896b-e0dac5e08b41)
| [Ask the community](https://community.fabric.microsoft.com/powerbi)
* * *
Additional resources
--------------------
---
# Reduce the size of an Excel workbook to view it in Power BI - Power BI | Microsoft Learn
Table of contents Exit focus mode
Ask Learn Ask Learn [Read in English](# "Read in English")
Save[](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/reduce-the-size-of-an-excel-workbook.md "Edit This Document")
Table of contents [Read in English](# "Read in English")
Add Add to plan [Edit](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/reduce-the-size-of-an-excel-workbook.md "Edit This Document")
* * *
#### Share via
[Facebook](#)
[x.com](#)
[LinkedIn](#)
[Email](#)
* * *
Print
* * *
Note
Access to this page requires authorization. You can try [signing in](#)
or changing directories.
Access to this page requires authorization. You can try changing directories.
Reduce the size of an Excel workbook to view it in Power BI
===========================================================
* Article
* 2024-10-21
* 6 contributors
Feedback
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 work or school**, connect to it from Power BI, and view it in Excel Online:
* The workbook can be up to 1 GB.
* The core worksheet contents can be up to 30 MB.
This article tells you what you can do to limit or reduce the size of an Excel workbook so that it meets the size requirements for uploading data.
What makes core worksheet contents larger than 30 MB
----------------------------------------------------
Here are some elements that can make the core worksheet contents larger than 30 MB:
* Images
* [Shaded cells](https://support.office.com/article/Add-or-change-the-background-color-of-cells-ac10f131-b847-428f-b656-d65375fb815e)
* [Colored worksheets](https://support.office.com/article/add-or-remove-a-sheet-background-3577a762-8450-4556-96a2-cc265abc00a8)
* Text boxes
* Clip art
Consider removing these elements, if possible.
If the report has a data model, you can reduce the overall size of the report using information in [Create a memory-efficient Data Model](https://support.office.com/article/Create-a-memory-efficient-Data-Model-using-Excel-2013-and-the-Power-Pivot-add-in-951c73a9-21c4-46ab-9f5e-14a2833b6a70)
.
You can also refer to this article on [File size limits for Excel workbooks in SharePoint](https://support.office.com/article/File-size-limits-for-workbooks-in-SharePoint-Online-9e5bc6f8-018f-415a-b890-5452687b325e)
.
Workbook size optimizer
-----------------------
If your workbook contains a data model, you can run the workbook size optimizer to reduce the size of your workbook. For more information, see [Download Workbook Size Optimizer](https://www.microsoft.com/download/details.aspx?id=38793)
.
Related content
---------------
* [Create a memory-efficient Data Model by using Excel and the Power Pivot add-in](https://support.office.com/article/Create-a-memory-efficient-Data-Model-using-Excel-2013-and-the-Power-Pivot-add-in-951c73a9-21c4-46ab-9f5e-14a2833b6a70)
* [Use OneDrive for work or school links in Power BI Desktop](desktop-use-onedrive-business-links)
* * *
Feedback
--------
Was this page helpful?
Yes No
[Provide product feedback](https://ideas.fabric.microsoft.com/?forum=2d80fd4a-16cb-4189-896b-e0dac5e08b41)
| [Ask the community](https://community.fabric.microsoft.com/powerbi)
* * *
Additional resources
--------------------
---
# Control the use of semantic models across workspaces - Power BI | Microsoft Learn
Table of contents Exit focus mode
Ask Learn Ask Learn [Read in English](# "Read in English")
Save[](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-datasets-admin-across-workspaces.md "Edit This Document")
Table of contents [Read in English](# "Read in English")
Add Add to plan [Edit](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-datasets-admin-across-workspaces.md "Edit This Document")
* * *
#### Share via
[Facebook](#)
[x.com](#)
[LinkedIn](#)
[Email](#)
* * *
Print
* * *
Note
Access to this page requires authorization. You can try [signing in](#)
or changing directories.
Access to this page requires authorization. You can try changing directories.
Control the use of semantic models across workspaces
====================================================
* Article
* 2024-04-02
* 6 contributors
Feedback
Using semantic models 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 semantic models across workspaces**, you can restrict semantic model reuse either completely or partially per security groups.

Some of the effects of turning off this setting are listed below:
* The button to copy reports across workspaces isn't available.
* In a report based on a shared semantic model, the **Edit report** button isn't available.
* In the Power BI service, the discovery experience only shows semantic models in the current workspace.
* In Power BI Desktop, the discovery experience only shows semantic models from workspaces where you're a member.
* In the Data hub, users see semantic models that were shared with them outside of the workspace, but they can't interact with them.
* In Power BI Desktop, if users open a _.pbix_ file with a live connection to a semantic model outside any workspaces they are a member of, they see an error message asking them to connect to a different semantic model. See the "Limitations" section of [Download a report from the Power BI service to Power BI Desktop](../create-reports/service-export-to-pbix#limitations)
for more information.
Provide a link for the certification process
--------------------------------------------
As a Power BI admin, you can provide a URL for the **Learn more** link on the **Endorsement** setting page. See [Enable content certification](../admin/service-admin-setup-certification)
for detail. This link can go to documentation about your certification process. If you don't provide a destination for the **Learn more** link, by default it points to the [Endorse your content](../collaborate-share/service-endorse-content)
article.

Related content
---------------
* [Use semantic models across workspaces](service-datasets-across-workspaces)
* Questions? [Try asking the Power BI Community](https://community.powerbi.com/)
* * *
Feedback
--------
Was this page helpful?
Yes No
[Provide product feedback](https://ideas.fabric.microsoft.com/?forum=2d80fd4a-16cb-4189-896b-e0dac5e08b41)
| [Ask the community](https://community.fabric.microsoft.com/powerbi)
* * *
Additional resources
--------------------
---
# Copy reports from other apps or workspaces - Power BI | Microsoft Learn
Table of contents Exit focus mode
Ask Learn Ask Learn [Read in English](# "Read in English")
Save[](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-datasets-copy-reports.md "Edit This Document")
Table of contents [Read in English](# "Read in English")
Add Add to plan [Edit](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-datasets-copy-reports.md "Edit This Document")
* * *
#### Share via
[Facebook](#)
[x.com](#)
[LinkedIn](#)
[Email](#)
* * *
Print
* * *
Note
Access to this page requires authorization. You can try [signing in](#)
or changing directories.
Access to this page requires authorization. You can try changing directories.
Copy reports from other workspaces
==================================
* Article
* 2023-11-10
* 9 contributors
Feedback
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 - the copy of report will still reference the same semantic model as the original report. 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 semantic models across workspaces"](service-datasets-across-workspaces#considerations-and-limitations)
for details.
Prerequisites
-------------
* To copy a report, you need a Pro or Premium Per User (PPU) license, even if the original report is in a workspace in a Premium capacity.
* To copy a report to another workspace, or to create a report in one workspace based on a semantic model in another workspace, you need [Build permission for the semantic model](service-datasets-build-permissions)
. If you have at least the Contributor role in the workspace where the semantic model is located, you automatically have Build permission through your workspace role. You also need at least the Contributor role in the workspace where the report you're copying is located, and in the workspace where you want to create the copy of the report. See [Roles in workspaces](../collaborate-share/service-roles-new-workspaces)
for details.
Save a copy of a report in a workspace
--------------------------------------
1. In a workspace, find a report in the list. Open the **More options** menu and **select Save a copy**.

You only see the **Save a copy** option if you have [Build permission](service-datasets-build-permissions)
. Even if you have access to the workspace, you have to have Build permission for the semantic model.
2. In **Save a copy of this report**, 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 in which you're a member.
3. Select **Save**.
Power BI automatically creates a copy of the report in the workspace you selected. In the list view of that workspace, you won't see the referenced semantic model if it is located in another workspace. To see the shared semantic model, on the report copy in list view select **More options** > **View lineage**.
[](media/service-datasets-copy-reports/power-bi-dataset-actions.png#lightbox)
In lineage view, semantic models that are located in other workspaces show the name of the workspace they're located in. This makes it easy to see which reports and dashboards use semantic models that are outside the workspace.
See [Your copy of the report](#your-copy-of-the-report)
in this article for more about the report and related semantic model.
Copy a report in an app
-----------------------
1. In an app, open the report you want to copy.
2. In the menu bar, select **File** > **Save a copy**.

You only see the **Save a copy** option if app permissions grant [Build permission](service-datasets-build-permissions)
for the underlying semantic model, and allow users to make copies of the report.
3. Give your report a name, select a destination workspace, and then select **Save**.

Your copy is automatically saved to the workspace you selected.
4. Select **Go to report** to open your copy.
Your copy of the report
-----------------------
When you save a copy of the report, you create a live connection to the semantic model, and you can open the report creation experience with the full semantic model available.

You haven't made a copy of the semantic model. The semantic model still resides in its original location. You can use all tables and measures in the semantic model in your own report. Row-level security (RLS) restrictions on the semantic model are in effect, so you only see data you have permissions to see based on your RLS role.
View related semantic models
----------------------------
When you have a report in one workspace based on a semantic model in another workspace, you may need to know more about the semantic model it's based on.
1. In the report, select **More options** > **See related content**.

2. The **Related content** dialog box shows all related items. In this list, the semantic model looks like any other. There is no indication of where the semantic model resides.

Delete a report copy
--------------------
If you want to delete the copy of the report, in the list of reports in the workspace, hover over the report you want to delete, select **More options**, and choose **Delete**.

Note
Deleting a report doesn't delete the semantic model it is built on.
Related content
---------------
* [Use semantic models across workspaces](service-datasets-across-workspaces)
* Questions? [Try asking the Power BI Community](https://community.powerbi.com/)
* * *
Feedback
--------
Was this page helpful?
Yes No
[Provide product feedback](https://ideas.fabric.microsoft.com/?forum=2d80fd4a-16cb-4189-896b-e0dac5e08b41)
| [Ask the community](https://community.fabric.microsoft.com/powerbi)
* * *
Additional resources
--------------------
---
# Use OneDrive for work or school links in Power BI Desktop - Power BI | Microsoft Learn
Table of contents Exit focus mode
Ask Learn Ask Learn [Read in English](# "Read in English")
Save[](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/desktop-use-onedrive-business-links.md "Edit This Document")
Table of contents [Read in English](# "Read in English")
Add Add to plan [Edit](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/desktop-use-onedrive-business-links.md "Edit This Document")
* * *
#### Share via
[Facebook](#)
[x.com](#)
[LinkedIn](#)
[Email](#)
* * *
Print
* * *
Note
Access to this page requires authorization. You can try [signing in](#)
or changing directories.
Access to this page requires authorization. You can try changing directories.
Use OneDrive for work or school links in Power BI Desktop
=========================================================
* Article
* 2025-02-26
* 6 contributors
Feedback
Many people have Excel workbooks stored in OneDrive for work or school 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 work or school to create reports and visuals. You can use a OneDrive for work or school group account or your individual OneDrive for work or school account.
Getting an online link from OneDrive for work or school 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.
Get a link from Excel
---------------------
1. Navigate to your OneDrive for work or school location using a browser. Select the ellipses (...) to open the **More** menu, then select **Details**.

Note
Your browser interface might not look exactly like this image. There are many ways to select **Open in Excel** for files in your OneDrive for work or school browser interface. You can use any option that allows you to open the file in Excel.
2. In the **More details** pane that appears, select the _copy_ icon next to **Path**.

Use the link in Power BI Desktop
--------------------------------
In Power BI Desktop, you can use the link that you 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.

3. 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 work or school sites.

A **Navigator** dialog appears. It allows you to select from the list of tables, sheets, and ranges found in the Excel workbook. From there, you can use the OneDrive for work or school file just like any other Excel file. You can create reports and use it in semantic models like you would with any other data source.
Note
To use a OneDrive for work or school file as a data source in the Power BI service, with **Service Refresh** enabled for that file, make sure you select **OAuth2** as the **Authentication method** when you configure refresh settings. Otherwise, you might encounter an error when you attempt to connect or to refresh, such as, _Failed to update data source credentials_. Selecting **OAuth2** as the authentication method avoids that credentials error.
* * *
Feedback
--------
Was this page helpful?
Yes No
[Provide product feedback](https://ideas.fabric.microsoft.com/?forum=2d80fd4a-16cb-4189-896b-e0dac5e08b41)
| [Ask the community](https://community.fabric.microsoft.com/powerbi)
* * *
Additional resources
--------------------
---
# Manage DirectQuery connections to a published semantic model - Power BI | Microsoft Learn
Table of contents Exit focus mode
Ask Learn Ask Learn [Read in English](# "Read in English")
Save[](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/desktop-discourage-directquery-connections-to-dataset.md "Edit This Document")
Table of contents [Read in English](# "Read in English")
Add Add to plan [Edit](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/desktop-discourage-directquery-connections-to-dataset.md "Edit This Document")
* * *
#### Share via
[Facebook](#)
[x.com](#)
[LinkedIn](#)
[Email](#)
* * *
Print
* * *
Note
Access to this page requires authorization. You can try [signing in](#)
or changing directories.
Access to this page requires authorization. You can try changing directories.
Manage DirectQuery connections to a published semantic model
============================================================
* Article
* 2023-11-10
* 5 contributors
Feedback
By default, when you publish a semantic model to the Power BI service, you can make a DirectQuery connection to it, assuming you have proper permissions. You can use this connection to create new composite models on top of the semantic model.
In some situations, however, you need to discourage these connections from happening. Discouraging these connections is especially important in the composite models scenario, where you might want to prohibit creation of new composite models on top of the semantic model (so-called _chaining_). By discouraging DirectQuery connections to a semantic model, you're effectively ending the chain or stopping it from forming in the first place.
Note
Power BI honors this setting and disables making DirectQuery connections to a semantic model, but third-party tools might not. Third-party tools might allow users to make DirectQuery connections to a semantic model even if you disabled it.
Use Power BI Desktop to discourage DirectQuery connections to a semantic model
------------------------------------------------------------------------------
1. To discourage DirectQuery connections to a semantic model, go to **File > Options and settings > Options > Current File > Published semantic model settings**.
2. On this page, choose the **Discourage DirectQuery connections** option, and select **OK**.

Use third-party tools to discourage DirectQuery connections to a semantic model
-------------------------------------------------------------------------------
By using third-party tools, you can discourage DirectQuery connections to a semantic model by setting the `DiscourageCompositeModels` property on a model to `True`.
Related content
---------------
* [Using DirectQuery in Power BI](desktop-directquery-about)
* [Semantic models in the Power BI service](service-dataset-modes-understand)
* [Use composite models in Power BI Desktop](../transform-model/desktop-composite-models)
* More questions? [Ask the Power BI Community](https://community.powerbi.com/)
* * *
Feedback
--------
Was this page helpful?
Yes No
[Provide product feedback](https://ideas.fabric.microsoft.com/?forum=2d80fd4a-16cb-4189-896b-e0dac5e08b41)
| [Ask the community](https://community.fabric.microsoft.com/powerbi)
* * *
Additional resources
--------------------
---
# Semantic model modes in the Power BI service - Power BI | Microsoft Learn
Table of contents Exit focus mode
Ask Learn Ask Learn [Read in English](# "Read in English")
Save[](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-dataset-modes-understand.md "Edit This Document")
Table of contents [Read in English](# "Read in English")
Add Add to plan [Edit](https://github.com/MicrosoftDocs/powerbi-docs/blob/main/powerbi-docs/connect-data/service-dataset-modes-understand.md "Edit This Document")
* * *
#### Share via
[Facebook](#)
[x.com](#)
[LinkedIn](#)
[Email](#)
* * *
Print
* * *
Note
Access to this page requires authorization. You can try [signing in](#)
or changing directories.
Access to this page requires authorization. You can try changing directories.
Semantic model modes in the Power BI service
============================================
* Article
* 2025-02-28
* 7 contributors
Feedback
This article provides a technical explanation of Power BI semantic model modes. It applies to semantic models that represent a live connection to an external-hosted Analysis Services model, and also to models developed in Power BI Desktop. The article emphasizes the rationale for each mode, and possible impacts on Power BI capacity resources.
The three semantic model modes are:
* [Import](#import-mode)
* [DirectQuery](#directquery-mode)
* [Composite](#composite-mode)
Import mode
-----------
_Import_ mode is the most common mode used to develop semantic models. This mode delivers fast performance thanks to in-memory querying. It also offers design flexibility to modelers, and support for specific Power BI service features (Q&A, Quick Insights, etc.). Because of these strengths, it's the default mode when creating a new Power BI Desktop solution.
It's important to understand that imported data is always stored to disk. When queried or refreshed, the data must be fully loaded into memory of the Power BI capacity. Once in memory, Import models can then achieve very fast query results. It's also important to understand that there's no concept of an Import model being partially loaded into memory.
When refreshed, data is compressed and optimized and then stored to disk by the VertiPaq storage engine. When loaded from disk into memory, it's possible to see 10-times compression. So, it's reasonable to expect that 10 GB of source data can compress to about 1 GB in size. Storage size on disk can achieve a 20% reduction from the compressed size. The difference in size can be determined by comparing the Power BI Desktop file size with the Task Manager memory usage of the file.
Design flexibility can be achieved in three ways:
* Integrate data by caching data from dataflows, and external data sources, whatever the data source type or format.
* Use the entire set of [Power Query M formula language](/en-us/powerquery-m/)
, referred to as _M_, functions when creating data preparation queries.
* Apply the entire set of [Data Analysis Expressions (DAX)](/en-us/dax/)
functions when enhancing the model with business logic. There's support for calculated columns, calculated tables, and measures.
As shown in the following image, an Import model can integrate data from any number of supported data source types.

However, while there are compelling advantages associated with Import models, there are disadvantages, too:
* The entire model must be loaded to memory before Power BI can query the model, which can place pressure on available capacity resources, especially as the number and size of Import models grow.
* Model data is only as current as the latest refresh, and so Import models need to be refreshed, usually on a scheduled basis.
* A full refresh removes all data from all tables and reloads it from the data source. This operation can be expensive in terms of time and resources for the Power BI service, and the data sources.
Note
Power BI can achieve incremental refresh to avoid truncating and reloading entire tables. For more information, including supported plans and licensing, see [Incremental refresh and real-time data for semantic models](incremental-refresh-overview)
.
From a Power BI service resource perspective, Import models require:
* Sufficient memory to load the model when it's queried or refreshed.
* Processing resources and extra memory resources to refresh data.
DirectQuery mode
----------------
_DirectQuery_ mode is an alternative to Import mode. Models developed in DirectQuery mode don't import data. Instead, they consist only of metadata defining the model structure. When the model is queried, native queries are used to retrieve data from the underlying data source.

There are two main reasons to consider developing a DirectQuery model:
* When data volumes are too large, even when [data reduction methods](../guidance/import-modeling-data-reduction)
are applied, to load into a model, or practically refresh.
* When reports and dashboards need to deliver _near real-time_ data, beyond what can be achieved within scheduled refresh limits. Scheduled refresh limits are eight times a day for shared capacity, and 48 times a day for a Premium capacity.
There are several advantages associated with DirectQuery models:
* Import model size limits don't apply.
* Models don't require scheduled data refresh.
* Report users see the latest data when interacting with report filters and slicers. Also, report users can refresh the entire report to retrieve current data.
* Real-time reports can be developed by using the [Automatic page refresh](../create-reports/desktop-automatic-page-refresh)
feature.
* Dashboard tiles, when based on DirectQuery models, can update automatically as frequently as every 15 minutes.
However, there are some limitations associated with DirectQuery models:
* Power Query/Mashup expressions can only be functions that can be transposed to native queries understood by the data source.
* DAX formulas are limited to use only functions that can be transposed to native queries understood by the data source. Calculated tables aren't supported.
* Quick Insights features aren't supported.
From a Power BI service resource perspective, DirectQuery models require:
* Minimal memory to load the model (metadata only) when it's queried.
* Sometimes the Power BI service must use significant processor resources to generate and process queries sent to the data source. When this situation arises, it can affect throughput, especially when concurrent users are querying the model.
For more information, see [Use DirectQuery in Power BI Desktop](desktop-use-directquery)
.
Composite mode
--------------
_Composite_ mode can mix Import and DirectQuery modes, or integrate multiple DirectQuery data sources. Models developed in Composite mode support configuring the storage mode for each model table. This mode also supports calculated tables, defined with DAX.
The table storage mode can be configured as Import, DirectQuery, or Dual. A table configured as Dual storage mode is both Import and DirectQuery, and this setting allows the Power BI service to determine the most efficient mode to use on a query-by-query basis.

Composite models strive to deliver the best of Import and DirectQuery modes. When configured appropriately, they can combine the high query performance of in-memory models with the ability to retrieve near real-time data from data sources.
For more information, see [Use composite models in Power BI Desktop](../transform-model/desktop-composite-models)
.
Pure Import and DirectQuery tables
----------------------------------
Data modelers who develop Composite models are likely to configure dimension-type tables in Import or Dual storage mode, and fact-type tables in DirectQuery mode. For more information about model table roles, see [Understand star schema and the importance for Power BI](../guidance/star-schema)
.
For example, consider a model with a **Product** dimension-type table in Dual mode, and a **Sales** fact-type table in DirectQuery mode. The **Product** table could be efficiently and quickly queried from in-memory to render a report slicer. The **Sales** table could also be queried in DirectQuery mode with the related **Product** table. The latter query could enable the generation of a single efficient native SQL query that joins **Product** and **Sales** tables, and filters by the slicer values.
Hybrid tables
-------------
Data modelers who develop Composite models can also configure fact tables as hybrid tables. A hybrid table is a table with one or multiple Import partitions and one DirectQuery partition. The advantage of a hybrid table is that it could be efficiently and quickly queried from in-memory while at the same time including the latest data changes from the data source that occurred after the last import cycle, as the following visualization illustrates.

The easiest way to create a hybrid table is to configure an incremental refresh policy in Power BI Desktop and enable the option **Get the latest data in real time with DirectQuery (Premium only)**. When Power BI applies an incremental refresh policy that has this option enabled, it partitions the table like the partitioning scheme displayed in the previous diagram. To ensure good performance, configure your dimension-type tables in Dual storage mode so that Power BI can generate efficient native SQL queries when querying the DirectQuery partition.
Note
Power BI supports hybrid tables only when the semantic model is hosted in workspaces on Premium capacities. Accordingly, you must upload your semantic model to a Premium workspace if you configure an incremental refresh policy with the option to get the latest data in real time with DirectQuery. For more information, see [Incremental refresh and real-time data for semantic models](incremental-refresh-overview)
.
It's also possible to convert an Import table to a hybrid table by adding a DirectQuery partition using Tabular Model Scripting Language (TMSL) or the Tabular Object Model (TOM) or by using a third-party tool. For example, you can partition a fact table such that the bulk of the data is left in the data warehouse while only a fraction of the most recent data is imported. This approach can help to optimize performance if the bulk of this data is historical data that is infrequently accessed. A hybrid table can have multiple Import partitions, but only one DirectQuery partition.
Related content
---------------
* [Storage mode in Power BI Desktop](../transform-model/desktop-storage-mode)
* [Using DirectQuery in Power BI](desktop-directquery-about)
* [Use composite models in Power BI Desktop](../transform-model/desktop-composite-models)
* More questions? [Try asking the Power BI Community](https://community.powerbi.com/)
* * *
Feedback
--------
Was this page helpful?
Yes No
[Provide product feedback](https://ideas.fabric.microsoft.com/?forum=2d80fd4a-16cb-4189-896b-e0dac5e08b41)
| [Ask the community](https://community.fabric.microsoft.com/powerbi)
* * *
Additional resources
--------------------
---