Loading...

EMBEDDING POWER BI CONTENT

ACCESS POWER BI CONTENT WITHIN MAGENTO PLATFORM

Users that have their Power BI accounts can access their content directly from Magento Platform.

Opening page Reports Power BI Reports will show list of reports user have access to.

Power BI Reports list inside Magento
Platform
Picture: Power BI Reports list inside Magento Platform

Clicking on the row in the list of reports will open the report within Magento.

Opening Power BI report within Magento
Platform
Picture: Opening Power BI report within Magento Platform

Opening page Reports Power BI Dashboards will show the list of dashboards.

List of Power BI dashboards inside Magento
Platform
Picture: List of Power BI dashboards inside Magento Platform

Same as with reports, user can open dashboard by selecting the row in the list.

ENABLE AND CONFIGURE EMBEDDED CONTENT

Pages with Embedded Content

Embedded analytics can significantly improve the usability of statistical information by bringing the statistics to the place where it is needed.

Power BI Integration Extension may come with functionality that supports embedding of Power BI content to some of the pages inside Magento Platform. At the moment this includes the following pages (all in Magento Admin area):

  • Question & Answer (QnA) section on Overview page.

  • Product statistics tab on Product properties page

  • Customer statistics tab on Customer properties page

  • Order statistics tab on Order details page

Each embedded report will be described below.

In "AAD Token: User owns data" mode that will be described later in "Embedded Modes" section of this documentation, the embedded content will not be shown in case if the user did not connect Magento Platform to its Power BI Service account.

Question & Answer section

Question & Answer section is based on natural language processing features provided by Power BI. This will allow user to enter a question to a text filed and get answer to that question provided by Power BI. The Question & Answer embedded functionality at the moment can only take data from one dataset, though Microsoft have plans to extend this to more datasets.

Embedded Question & Answer section inside Magento
Platform
Picture: Embedded Question & Answer section inside Magento Platform

This is quite powerful features with very user-friendly interface.

You need to activate "Charts" if you want to see QnA section. Stores Configuration Advanced Admin Dashboard Enable Charts to "Yes".

The quality of the answers may depend a lot on the underlying data modeling in the dataset. To get most benefit from Question & Answer section it is recommended to use Sales Cube Dataset.

Order statistics tab

Embedded report might be added to order details page in Magento Platform. This will allow opening separate repot for each order.

The embedding functionality expects the embedded report to have Order table with Order Id field and will filter data by this filed.

This functionality is compatible with Sales Cube Dataset. In particular, report template "SC Embedded Order Statistics" that comes with Sales Cube functionality might be used to be embedded to order statistics tab.

Embedded Order Statistics report on an order's
page
Picture: Embedded Order Statistics report on an order's page

Product statistics tab

Embedded report might be added to product edit page in Magento Platform. This will allow opening separate repot for each product.

The embedding functionality expects the embedded report to have Products table with Product Id field and will filter data by this field.

This functionality is compatible with Sales Cube Dataset. In particular, report template "SC Embedded Product Statistics" that comes with Sales Cube functionality might be used to be embedded to product statistics tab.

Customer statistics tab

Embedded report might be added to customer details page in Magento Platform. This will allow opening separate repot for each customer.

The embedding functionality expects the embedded report to have Orders table with Customer Id field and will filter data by this field.

This functionality is compatible with Sales Cube Dataset. In particular, report template "SC Embedded Customer Statistics" that comes with Sales Cube functionality might be used to be embedded to customer statistics tab.

Embedding Modes

There are two embedding modes (types of tokens) for embedding the content supported by Power BI Integration Extension:

  • AAD Token: User owns data -- in this mode user who will get access to the embedded content needs to have an account in Power BI Service.

  • Embed Token: App owns data -- in this mode user who will get access to the embedded content does not need to have an account in Power BI Service, but the functionality requires purchasing Power BI Embedded capacity.

The suitable mode may depend on the amount of users who should get access to the embedded content. If the amount of users is less than 80 users, then it might be preferable to first option, if more then 100 -- second option might become more cost-efficient.

In the first option content should either be created by the user or be shared with him. Sharing the content would require to have Power BI Pro subscription for all users show want to share or access shared content inside Power BI. Second option requires Power BI Embedded capacity.

Let's review all of the possibilities in details.

AAD Token with Power BI Free accounts

This is the option where there might be no need to pay any license fees for Power BI Service. But this is very inefficient and limited option. Power BI Free subscription is more intended to be used as a trial version of Power BI Service and is very limited.

First of all, the limitations relate to the capacity and slow data delivery:

  • Max amount of rows in a table is limited by 10,000 rows (compared with 5,000,000 rows in Pro subscription)

  • Max amount of rows sent to Power BI per hour per dataset is limited by 10,000 rows

Additionally, with Power BI Free subscription users cannot share content with each other. This means that each user should load his data to Power BI separately. More about this case can be read in "General concepts: Multiple users: Simplest multiuser use case: multiple independent users".

AAD Token with Power BI Pro accounts

With Power BI Pro accounts users can enjoy fool flexibility of usage of Power BI Service. Limitations will be extended compared to free account to allow storing more data and sending it faster to Power BI Service.

Users can get access not only to embedded content, but also access reports and dashboards with Power BI Service or Power BI Mobile App, create and store their reports, share their reports, configure notifications and exchange their ideas with their colleagues through Power BI Service.

But each Power BI Pro license needs to be purchased from Microsoft and the more users there will be, the more expensive it becomes.

Embed Token: App owns data

This is a typical embedded use case and ideal for companies that have multiple users who will access embedded content without the need to have Power BI account.

The users will not be able to create and share reports. They will not get access to content in Power BI Service and will not access the reports through Power BI Mobile App.

This use case requires purchasing Power BI Embedded capacity from Microsoft.

Note: for development purpose Microsoft allows to use this kind of token with very limited capacity. This is useful for development and testing of this embedding mode.

To obtain an access token in Embed Token mode for Power BI, the application developer must have the necessary permissions to access a workspace. However, there are specific requirements that the workspace must meet to be compatible with Embed Token mode:

  • The workspace should not be "My Workspace," which is a personal workspace that is only accessible to the user who created it. Embed Token mode requires a workspace that can be accessed by multiple users, hence the workspace must not be "My Workspace."

  • The workspace should be owned by the user who generates the access token. This is because the user who generates the access token is responsible for controlling access to the content. If the workspace is owned by someone else, the access token may not grant the correct level of access to the content.

Configuring the Embedded Content

Embedded content can be configured in Magento Configuration (Stores Configuration in Magento 2 or System Configuration in Magento 1), section Insights Ready Power BI Integration Power BI Embedded.

Power BI Embedded content configuration inside Magento
Platform
Picture: Power BI Embedded content configuration inside Magento Platform

Embedding Mode allows configuring the embedding mode that will be used for the embedded content. Read "Embedded Modes" section of this documentation for more information on the modes.

Enable QnA Section on Overview Page will add Question & Answer section on Magento Platform's overview page (home page of Admin Panel).

QnA Workspace ID includes ID of the workspace from Power BI Service. This workspace should include a dataset that will be used for QnA. The easiest way to find out this value is to copy this value from the URL after navigating to the workspace inside Power BI Service.

QnA Dataset ID includes ID of the dataset from Power BI Service that will be used for the QnA section. The easiest way to get this value for a dataset is to copy this value from the URL after navigating to the dataset inside Power BI Service.

Enable Statistics Tab on Product Page allows enabling on the statistics tab on products page in Magento Platform.

Product Statistics Workspace ID includes ID of the workspace from Power BI Service. This workspace should include a report that will be embedded to statistics tab on product edit page. The easiest way to find out this value is to copy this value from the URL after navigating to the workspace inside Power BI Service.

Product Statistics Report ID includes ID of the report from Power BI Service that will be embedded to statistics tab on product edit page. The easiest way to find out this value is to copy this value from the URL after navigating to the report inside Power BI Service.

Enable Statistics Tab on Order Page allows enabling on the statistics tab on order details in Magento Platform.

Order Statistics Workspace ID includes ID of the workspace from Power BI Service. This workspace should include a report that will be embedded to statistics tab on order details page. The easiest way to find out this value is to copy this value from the URL after navigating to the workspace inside Power BI Service.

Order Statistics Report ID includes ID of the report from Power BI Service that will be embedded to statistics tab on order details page. The easiest way to find out this value is to copy this value from the URL after navigating to the report inside Power BI Service.

Enable Statistics Tab on Customer Page allows enabling on the statistics tab on customer details in Magento Platform.

Customer Statistics Workspace ID includes ID of the workspace from Power BI Service. This workspace should include a report that will be embedded to statistics tab on customer details page. The easiest way to find out this value is to copy this value from the URL after navigating to the workspace inside Power BI Service.

Customer Statistics Report ID includes ID of the report from Power BI Service that will be embedded to statistics tab on customer details page. The easiest way to find out this value is to copy this value from the URL after navigating to the report inside Power BI Service.

Displaying Power BI Reports Dashboards List

To enable the list of reports and dashboards to be displayed in Magento, please follow the steps below:

  1. Go to Store Configuration.

  2. Under the Power BI Integration section, click on Power BI Embedded.

  3. Change the options Show List of PBI Reports In Magento or Show List of PBI Dashboards to Yes.

  4. Click on Save Configuration.

Once you have made these changes, the lists will be displayed under Reports Power BI Reports and Reports Power BI Dashboards menus.

Clearing cache

After making changes to your Magento configuration, it's important to clear your cache to ensure that the changes take effect. To do this, follow the steps below:

  1. Go to System Cache Management.

  2. Select all caches and choose Refresh from the Actions dropdown.

  3. Click on Submit.

This will clear your cache and ensure that the changes you made to your configuration are properly applied.

USAGE OF POWER BI EMBEDDED CAPACITY

Power BI Embedded is an alternative Power BI licensing model. It is perfect for the cases where Power BI Reports should be accessed by external employees who may not have an Azure account in the organization.

It is also well suited for the cases when lot of employees should get access to the embedded Power BI reports, but they may not necessarily have Power BI Pro licenses. If the number of employees is higher then 30, company may save costs on Power BI licenses by switching to Power BI Embedded capacity.

Configure Power BI Embedded in Microsoft Azure

Step 1. Azure Subscription

Here you can create an Azure Subscription -- all resources that you will be using in Azure might be billed together in one Subscription. Create a new Subscription if you did not create one before. You can select a Free Trial option or go for Pay-As-You-Go.

Opening Azure Subscriptions in Microsoft
Azure
Picture: Opening Azure Subscriptions in Microsoft Azure

Step 2. Resource group

Go to Resource Groups inside your Azure Portal and create a new Resource Group. You may also reuse existing resource group if it was created before.

Opening Resource Groups settings in Microsoft
Azure
Picture: Opening Resource Groups settings in Microsoft Azure

There are very few configuration options, so you should be able to create a resource group without any difficulties.

Step 3. Create Power BI Embedded Capacity

Before creating a Power BI Embedded capacity, Microsoft is asking to make sure you have signed into Power BI at least once.

Under Azure services, select Power BI Embedded. Or search for Power BI Embedded in Azure search:

Opening Power BI Embedded section Microsoft
Azure
Picture: Opening Power BI Embedded section Microsoft Azure

Click on "Create" button and provide the settings for the embedded Capacity.

Here you can select the Azure Subscription, specify the name of the Resource Group you have previously created.

Step 4. Assign Power BI Embedded capacity to Workspace

Power BI Embedding capacity should be started first.

Go to the Settings for the Workspace you wish to be accessed via the Embedded Capacity.

Go to "Premium" tab. Here you can select the Embedded option and select the capacity you have configured in Azure portal.

Opening Workspace settings in Power
BI
Picture: Opening Workspace settings in Power BI

Selecting Embedded capacity in Workspace settings in Power BI
Picture: Selecting Embedded capacity in Workspace settings in Power BI

Automated Power BI Capacity Management

Power BI Embedded is a capacity, and you pay for it only while this capacity is active. You can turn it off and on at any time. The Power BI will charge for every minute while the capacity was active. It cost starts from 1\$ per hour.

Sometimes it makes sense to turn the Power BI Capacity off. For example, you may expect that no one will be accessing the reports over night or during the weekends. In this case you can significantly decrease the costs you pay for the capacity usage.

The extension supports different ways of how the Power BI Embedded capacity could be managed:

  • Scheduled - capacity is enabled by schedule, e.g. 5 days per week, from 8 to 17

  • Auto - capacity is enabled when someone opens a report and disabled if no one is using the reports for some time

  • Capacity Management is Disabled -- capacity is managed manually. E.g. it is always turned on

Development mode for Power BI Embedded capacity

Power BI allows you to test Power BI Embedded capacity without paying for its usage. There is a limited number of Power BI Embedded tokens that could be generated for free.

With Capacity Management enabled you have possibility to configure if you wish the development mode be allowed to be used or not.

In the configuration you can set Development mode to be:

  • Forbidden -- it is not allowed to load report before capacity is running. In this case a message will be displayed to the user, notifying him that the report cannot be used at this moment.

  • Allowed -- report is always loaded immediately. In auto mode, capacity will be started in parallel with report opening, In scheduled mode - report will be allowed to be opened also in the hours out of the schedule (the development tokens will be used out of schedule).

Please, not that some features may not be working in development mode. In particular, some RLS functionality is not working if actual Power BI Embedded capacity is not running.

Monitoring the Power BI Embedded Capacity State

The monitoring helps to make sure that you will not be using the Capacity out of schedule. For example, in case if it was turned on manually or it if was not turned off due to some system error. The monitoring will turn the capacity off if it expects that it should not be running at the moment.

The monitoring can be configured to work in one of the following modes:

  • Disabled - monitoring is not used

  • Turn on and off - capacity will be turned off/on if its state differs from the expected state

  • Turn off only - capacity will be turned off if needed. But it will never be turned on by the monitoring

Configuring Power BI Capacity Management

Setup Azure configuration

Go to Azure Portal App registrations page and create a new App registration. This should have similar parameters as the App registration for the Power BI. You may also reuse the same App registration.

Please, make sure to configure Redirect URL for the App Registration that is specified under the Azure Management App ID (Client ID) field on Magento Configuration page.

This App registration should have the following permissions specified in API permissions section:

  • Azure Service Management user_impersonation

Permissions for Capacity Management App
Registration
Picture: Permissions for Capacity Management App Registration

The following information from Azure needs to be provided inside Magento in order to start using Capacity Management:

  • Azure Management App ID (Client ID) -- In Azure you can find it under App Registrations. This will be the Application (client) ID value for the App, used to manage the Capacity (it should have the Azure Service Management permissions).

  • Azure Management API Secret (Client Secret) -- the client secret generated for the same App Registration (please, make sure to copy the Client Secret value and not the Secret ID).

  • Azure Management Subscription ID -- Open Azure Subscriptions and copy Subscription ID from the subscription where you have your Power BI Embedded capacity assigned.

  • Azure Resource Group Name -- the name of the Resource Group where Power BI Embedded capacity is assigned.

  • Azure Capacity Name -- the name of the Power BI Embedded capacity inside Azure Portal.

Additional parameters allow you to configure the behavior of Capacity Management:

  • Capacity Management Mode. Possible options are:

    • Auto -- capacity will be started automatically once someone opens a report. This might be followed by some delay for the first person, who has opened the report before he can start using it.

    • Scheduled -- capacity will be always on during some pre-set schedule

  • Idle Capacity Time - In Auto Capacity Management mode will define, how long the capacity will stay turned on once all users stopped using the reports.

  • Capacity Schedule Start Cron Expression -- define the cron expression to start Embedded Capacity in Scheduled Capacity Management Mode.

  • Capacity Schedule End Cron Expression - define the cron expression to stop Embedded Capacity in Scheduled Capacity Management Mode.

  • Capacity Monitoring Enabled -- allows to turn on/off Capacity Monitoring

  • Capacity Status Monitoring Mode -- allows to configure the behavior of the Capacity Monitoring

  • Capacity Status Monitoring Frequency -- defines, how often the Capacify Monitoring should check the status of Embedded Capacity

  • Allow usage of free Embed Tokens (Trial Tokens) -- specifies if development token could be used or not.

Once configured, press the "Connect to Azure Management API" button in order to establish the connection with Azure APIs.

Configuration inside Magento related to Capacity
Management
Picture: Configuration inside Magento related to Capacity Management

\newpage