This blog post covers the latest updates for the Power BI Developer community. Donโt forget to check out our last developer blog posts, if you havenโt done so already.
Here is the list of updates for this month:
Embedded analytics updates
Automation & life-cycle management
A new API for updating paginated reports data sources
Get Dataset/s APIs return new additional properties
Embed capabilities
Persistent filters support for embedding in your organization
Phased embedding
Control focus behavior for create/clone visual
Additional JavaScript API enhancements
Selected learning resources
Power BI Developer in a Day course
Power BI Developer Guide to Azure AD Security
Power BI for Developers – Embed Analytics in Your Application
Power BI visuals platform updates
Embedded analytics
Automation & life-cycle management
A new API for updating paginated reports data sources
The powerful Power BI REST API calls were extended to support important, yet repeatable tasks, related to paginated reports. The new Paginated reports – Update data sources API complements the deployment workflow shown in the diagram below which is built entirely on REST APIs.
Get Dataset/s APIs return new additional properties
Two new properties were added to the responses of the Get Dataset and Get Datasets APIs:
- CreateReportEmbedURL – The dataset create report embed URL
- QnaEmbedURL – The dataset QnA embed URL
These properties allow developers to fetch dataset create report or QnA embed URL dynamically. This means that developers no longer need to generate an embed URL themselves or get it from another report and fix it. One of the advantages of fetching the embed URL from the API is getting a config parameter, that is added to the end of the embed URL for performance improvements.
Embed capabilities
Persistent filters support for embedding in your organization
The persistent filters feature, already supported in the Power BI Service, is now supported for the embedding in your organization scenario. All embedded reports will now automatically retain the filters, slicers, and other data view changes that users make. Users no longer need to spend their valuable time slicing and dicing their report and repeating the same steps each time they return to the embedded report. With this feature, users will be able to pick up right where they left off last time and quickly get to their insights!
To reset the persistent filters in an embed scenario, developers will need to implement a button and use the Reset persistent filters API. Other Persistent filters APIs include Save persistent filters and Persistent filters applied, used to determine the โResetโ button state.
Phased embedding
The loading of an embedded report is done using powerbi.embed
. Once called, the embedded report is loaded in front of the end-user, and any interaction with the report is done while shown to the end-user. To improve the end-user experience and provide more flexibility for developers, we have extended this flow with API calls that add phases to the embedding process for report embed. powerbi.load(...)
allows developers to stop the report from rendering, and to interact with the report before the end-user can see the results. As an example, developers can use it to get pages and then decide which page to present to the end-user. Once the load is completed, aย ‘loaded’ย event is fired.
In case developers useย powerbi.load()
, they need to useย report.render()
ย to continue the report rendering. Aย ‘rendered’ย event will be fired once the render is completed
Phased embedding example:
const config = {
...
};
var report = powerbi.load(config);
report.on('loaded', async () => {
await report.setFilters(fitlers);
report.render();
});
Control focus behavior for create/clone visualโ
Previously, when adding visuals programmatically, the entire page would scroll to focus on the created/cloned visual. This could cause an issue when trying to add visuals to an embedded report in a section of the page that is not currently being visible (for example when the visual is embedded at the bottom of a long page).
Now weโve added a parameter that can be used to disable this behavior. By setting the optional โautofocusโ parameter value to false, in createVisual and cloneVisual, the page will no longer focus on the new visual and it would be possible to add multiple visuals programmatically without forcing the page to focus each time on the last added visual.
Additional JavaScript API enhancements
Control Power BI panes programmatically
Up to now in Power BI embedded analytics there was only a limited control of the Power BI panes, achieved by three distinct properties: filterPaneEnabled, bookmarksPaneEnabled and navContentPaneEnabled.
To allow greater control over the existing panes and to make it easier to support new panes in the future, we added a new ‘panes’ object to the Power BI embedded settings,ย that unifies all the existing โpanesโ properties and adds support for controlling more panes programmatically. For example, it is now possible to open an embedded report in edit mode with all the panes collapsed, allowing the report itself more space. It is also possible to open the Sync slicers and Selection panes programmatically.
Visual authoring data field enhancements
Previously, when adding a data field to a visual data role, the data field would be added last. Now weโve added an optional โindexโ parameter to define where the data field should be added. This option provides developers the flexibility to build the visuals they need, for example, they can add a columnย to the middle of an existing table.
Relative Time Filters/Slicers supportโ
Power BI JavaScript APIs allow to apply filters and slicers when loading a report and change them dynamically. Various Filter types and Native slicers are already supported and now weโve added support for RelativeTime filter type which also applies for slicers.
Extend page operationsโ
As part of the Page Operations API, developers can now add and delete pages from a report during an embed session.
โVisual Renderedโ event
A new visualRendered event was recently added to the list of supported events, and it can be useful for developers that want to show reports to their end-users only after a specific or several visuals have completed rendering.
Enabling the firing of this event requires setting visualRenderedEvents to โtrueโ in the settings object. It is recommended to enable it only when necessary.
Learn more on handling events in Power BI Embedded
Selected learning resources
Power BI Developer in a Day course
Theย Power BI Developer in a Day video-based course empowersย app developers with the technical knowledge required to embed Power BI content. It comprises 3 hours 20 minutes of viewable contentโavailable on demand and is free of charge. There’s also aย self-study kitย that you can download and use to complete a series of five hands-on labs.
Power BI Developer Guide to Azure AD Security
Power BI Developers Guide to Azure AD Security is a video-based training course which teaches Power BI developers how to develop secure web applications which interact with Azure Active Directory. The course begins by explaining the fundamentals of OAuth 2.0 and OpenID Connect and then demonstrates how to write code using the Microsoft Authentication Libraries (MSAL) to acquire and cache Azure AD access tokens and to call the Power BI Service API. The goal of this video-based training course is to teach the essential security topics related to developing with Power BI embedding.
Power BI for Developers – Embed Analytics in Your Application
This technical video session was presented at โPOWERful Devsโ conference. It shows developers how to get up and running with Power BI Embedded, allowing them to enhance their web application with embedded analytics, using Service Principal to authenticate to Power BI and JavaScript SDK for total control of visuals and user experience.
Power BI Visuals Platform
Context menu support
What is the context menu?
Typically, users hover over data points in a visual for the right-click menu to be available.
To provide a unified and smooth experience to all users using any Power BI visuals, we recommend that our developers and partners enable the context menu in their existing and new visuals’ submissions. We have also updated our guidelines for Power BI visuals.
We want to keep improving our AppSource visuals.ย Visuals that are in-par with the default ones. For the best customer experience, it is very important to preserve the same look and feel experiences for the AppSource visuals. We recommend to keep updating the visuals with the latest API release. In addition, to support the features as documented in our How-To guides, such as report page tooltips and drill down features.
This is a heads-up that we’ll add this new requirement of supporting the context menu to our submission process for any new submitted visuals or any updates of existing visuals.
The policy will take action on the first of September.
When does my version get updated?
Publication time of new and existing visuals vary, please check out this link to understand when your version and certification badge will be available in the AppSource.
Reporting a bug or feature request for Power BI team
The best way to report a bug or submit a feature request for a new existing API is through the github issues page https://github.com/microsoft/PowerBI-visuals-tools/issues. Our support team will constantly go over the list and reply to your requests and questions.
Power BI visuals certification requirements
The process and policies for Power BI visual certification is continuingย toย improve.ย The newย requirementsย are effective for new visualย submissions.ย Please check the new requirements before your new Power BI certification request to save turnaround time.
API v3.2.0 is now available
We highly recommend you update your visuals to the latest and greatest releases to enjoy the new functionalities, and improvements. The API v3.2.0 is ready for you to update your visuals.
The new API supports the Multi visuals select feature which allows to use selection in multiple visuals in a report.
Thatโs all for this post. We hope you found it useful. Please continue sending us your feedback โ itโs very important for us! Have an amazing feature in mind? Please share it or vote in our Power BI Ideas forum