Enabling Power BI integration with Business Central

Note

Azure Active Directory is now Microsoft Entra ID. Learn more

This article describes how to get Business Central ready for integration with Power BI. Business Central online is already enabled for integration, although there's some information about licensing that you might want to read. For Business Central on-premises, you'll have set up your environment to connect to Power BI before users can work with it.

Power BI Licensing

With Business Central, users get a free Power BI license that provides access to the most common features in Business Central and Power BI. You can also purchase a Power BI Pro license that provides access to additional features. The following table provides an overview of the features available with each license.

Power License View reports Create reports Share reports Refresh reports Business Central Power BI Apps
Power BI free a checkmark. (in your personal workspace) another checkmark (in your personal workspace) (limited) (limited)
Power BI Pro yet another checkmark. it's a checkmark again a checkmark (extensive) last checkmark

You can't use a Power BI free license for the Business Central Power BI Apps. To learn more, go to Prerequisites for installing Power BI apps for Business Central

To learn more about Power BI licensing in general, go to Licensing the Power BI service for users in your organization or Sign up for the Power BI service as an individual.

Expose data through API or OData web services

Business Central offers two ways to expose data that can be consumed by Power BI reports:

  • API pages or queries
  • Open Data Protocol (OData) web services

APPLIES TO: Business Central online only.

Developers can define page objects and query objects that are of the type API. This way, they can expose data from database tables through a webhook-supported, OData v4-enabled, REST service. This type of data can't be displayed in the user interface, but is intended for building reliable integration services.

Business Central online comes with a set of built-in APIs that you can use to get data for typical business entities, like customers, items, sales orders, and more. No extra work or setup is required to use these APIs as a data source for Power BI reports. To learn more about these APIs, go to Business Central API V2.0.

Business Central online also supports custom APIs. Application developers of Business Central solutions can create their own API pages and queries and package them into apps. You then install the apps on your tenant. When they're installed, you use the API pages for your Power BI reports, like you'd do with the built-in APIs (v2.0). To learn more about how to create an API by exposing pages or queries, go to Developing a Custom API.

Important

Starting in February 2022, Power BI reports for Business Central online are sourced from a secondary, read-only database replica for performance reasons. AL developers should avoid designing API pages that make database modifications while the pages are opening or loading records. In particular, consider the code on the AL triggers: OnInit, OnOpenPage, OnFindRecord, OnNextRecord, OnAfterGetRecord, and OnAfterGetCurrRecord. In some cases, these database modifications might cause performance problems and prevent the report from refreshing data. To learn more, go to Performance Articles For Developers in the Business Central development content.

In rare cases, the behavior causes an error when you try to get data from the API for a report in Power BI Desktop. However, if the custom API requires database modifications, Power BI Desktop users can force the behavior. To learn more, go to Building Power BI Reports to Display Business Central Data.

You can publish Business Central application objects, such as codeunits, pages, and queries, as OData web services. With Business Central online, there are many web services published by default. An easy way to find the web services is to search for web services in Business Central. On the Web Services page, make sure the Publish field is selected for the web services. To learn more about publishing web services, go to Publish a Web Service.

To learn about what you can do to ensure the best performance of web services, as seen from the Business Central server (the endpoint) and from the consumer (the client), read Writing efficient Web Services.

Choosing whether to use API pages or OData web services

We recommend that you use API pages instead of OData web services. API pages load data faster in Power BI reports than OData web services. Plus, they're more flexible because they let you get data from table fields that aren't defined in a page object.

Stability is another reason for why you shouldn't base your Power BI reports on UI pages exposed as OData web services. Fields on UI pages in Business Central can change between updates. The changes are done either by the app publisher (the organization that develops the code), or with per-tenant extensions or apps that modify the page. In both cases, Business Central doesn't know about Power BI report dependencies on page objects, so the change in the UI page might break your Power BI reports. This problem doesn't happen if you base your reports on API pages or queries.

Setting up Dataflows

Dataflows enable you to ingest, transform, and load data into a Power BI workspace and then use the data as the basis for your reports. These dataflows can in some cases experience transient errors while doing a scheduled refresh. The error message looks like this: DataSource.Error: OData: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.

Using PowerAutomate, you can set up retries for this situation. For more information, see Automatically retry a dataflow on failure.

See also

Business Central and Power BI
Power BI Integration Component and Architecture Overview for Business Central
Power BI for consumers
The 'new look' of the Power BI service
Quickstart: Connect to data in Power BI Desktop
Power BI documentation
Business Intelligence
Getting Ready for Doing Business
Importing Business Data from Other Finance Systems
Setting Up Business Central
Use Business Central as a Power BI Data Source
Use Business Central as a Power Apps Data Source
Use Business Central in Power Automate

Find free e-learning modules for Business Central here