This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreDid you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now
This blog post covers the latest updates for Power BI Developers community. Don’t forget to check out our latest developer blog post, if you haven’t done so already.
Here is the list of updates for this month-
‘Try-it’ enables you to explore how each REST call works, what are the required params, structure of response or errors, and what data comes back, all within a minute!
Power_BI_Developer_community_April_May_update
There are cases where this coupling is not optimal, and you might prefer to handle each object separately for automation scenarios. So in order to manage datasets separately from reports, we added ‘skipReport’ parameter to the ‘Import’ API that only uploads the dataset into the specified workspace.
This new API can be useful in few cases:
The new ‘refresh user permissions’ API will run an update behind the scenes of the user permissions and make sure he can access everything he has permissions to, while avoiding the unpleasant scenarios described above.
We recommend calling this API at the beginning of every user session in your external application.
The Key influencers visual surfaces what factors influence a KPI’s rise or fall. For example, you want to analyze the factors that impact the user satisfaction of a product they bought from you. Factors that can impact this KPI can be the type of product they bought, the price, or even if the user is a first-time buyer vs a returning customer.
Machine learning is used to rank influencers, from most to least impactful, and a likelihood score and text description is provided to explain the impact. Users can drill into a factor to see the distribution of their data for that variable/category. As users interact with their reports, either through filtering or selecting visuals, the key drivers are re-evaluated and updated in real time.
Power_BI_Developer_community_April_May_update
However, there’s a specific caveat to using Apps- users must have the App installed before they can access content. If they consume through powerbi.com, that’s not really a problem, but for users who consume embedded content, that can be blocker. They don’t want to go into the portal just to install the App, and some of those users don’t know how to use Power BI portal.
To overcome this, we added the option to auto install Apps for users when opening an embedded report/ dashboard. As the developer, you should first make sure you install the app yourself to be able to get the appId (either through the URL in the portal, or through API). Once acquired, you can add the parameter ‘&appId=bf98…’ to the end user's embedUrl. Then, when a user tries to open a report from an uninstalled App, the App will be auto installed in the background, and the report will open for that user.
The new E2E sample provides a simple .net web application that authenticates an application user via AAD, generates the necessary AAD token for SQL Azure, and then generates a Power BI Embed token that passes through the AAD token to SQL Azure. The sample includes a detailed step by step guide for setting up all the configuration steps necessary within the different products.
Huge thanks to Chris Mitchell and Jon Lester for building this sample and contributing to all developers using Power BI Embedded.
If you are puzzled or run into a few issues, be sure to check our resources that can help you get by:
This release brings a lot of new features and goodies for the Power BI visuals development experience.
With new Typescript v3 and support for ES6 modules, users can integrate modern versions of all popular libraries like D3 and v5.
What’s new in powerbi-visuals-tools v3?
How to start using the new release?
For the full details and migration guide for powerbi-visuals-tools v3, please check this article.
See samples of visuals that were already migrated to the new toolset: Timeline slicer, Chord chart, Dual KPI, PowerKPI, Tornado, and more.
Please note that this toolset version is 3.1 which currently supports API v2.6.0.
Starting from our next release, the toolset will only support the modern toolset version as specified above. This means that future API versions will only be supported using the modern toolset.
For any question and help please contact pbicvsupport@microsoft.com
It’s time to view, edit and extend!
PowerKPI
Power_BI_Developer_community_April_May_update
PowerKPI Matrix
Power_BI_Developer_community_April_May_update
Every time a visual needs to refresh its data, it issues a data fetch request to the Power BI backend. The data the visual ordinarily requests is the values of the fields the user dragged into the field wells of the visual. In certain scenarios the visual may need to additionally request some aggregations/subtotals (e.g., sum, count) applied to the above fields. The API customizes the outgoing data query to request for the extra aggregation/subtotal data.
Without the API the visual would need to calculate the aggregations on its own. This would have been either computationally expensive (as opposed to backend calculations) or impossible since the bigger datasets can’t be fully fetched to the visual, resulting in data being cut off and the result of the calculation being incorrect. For each data-view type (currently just the matrix) the API offers Boolean customization switches, as listed below:
rowSubtotals
- Indicates if the subtotal data should be requested for all fields in the rows field well
rowSubtotalsPerLevel
- Indicates if the subtotal data can be toggled for individual fields in the rows field well
columnSubtotals
- Indicates if the subtotal data should be requested for all fields in the columns field well
columnSubtotalsPerLevel
- Indicates if the subtotal data can be toggled for individual fields in the columns field well
levelSubtotalEnabled
- Unlike all other properties, this property is applied to individual rows/columns. The property indicates if the subtotals are requested for the row/column
Each of the switches above gets assigned a value based on the values of the related properties in the property pane and the defaults. In the capabilities file, the visual has to specify a property each of the above switches maps to and also provide the default value to be used if the property is undefined.
The switches all look like this:
"rowSubtotals": {
"propertyIdentifier": {
"objectName": "subTotals",
"propertyName": "rowSubtotals"
},
"defaultValue": true
},
The above, for example, indicates (to the standard logic) that the row subtotals are enabled by the property "rowSubtotals" in the "subTotals" object. And, if the value is supplied in the dataview (which happens if the property is not dirty), the default value of “true” will be assumed by the customization logic.
The API is automatically enabled for a visual whenever the subtotals structure and all the switch mappings are defined in the capabilities JSON file.
Below is an example of the complete API configuration in the capabilities JSON file (copied from the API sample visual):
"subtotals": {
"matrix": {
"rowSubtotals": {
"propertyIdentifier": {
"objectName": "subTotals",
"propertyName": "rowSubtotals"
},
"defaultValue": true
},
"rowSubtotalsPerLevel": {
"propertyIdentifier": {
"objectName": "subTotals",
"propertyName": "perRowLevel"
},
"defaultValue": false
},
"columnSubtotals": {
"propertyIdentifier": {
"objectName": "subTotals",
"propertyName": "columnSubtotals"
},
"defaultValue": true
},
"columnSubtotalsPerLevel": {
"propertyIdentifier": {
"objectName": "subTotals",
"propertyName": "perColumnLevel"
},
"defaultValue": false
},
"levelSubtotalEnabled": {
"propertyIdentifier": {
"objectName": "subTotals",
"propertyName": "levelSubtotalEnabled"
},
"defaultValue": true
}
}
}
Please note that it’s important that the enumerateProperities() function of the visual is aligned with the defaults specified in the capabilities. E.g., if no properties are hanged by the user (no properties are dirty) the properties pane will display the subtotal defaults returned by enumerateProperties(). At the same time, the customization logic will operate according to the defaults specified in the capabilities (since no objects will be supplied in the dataview). Now, the two must be aligned. Otherwise, the actual subtotal customizations will differ from the user’s perception.
Check out this link for a sample. The sample report is in the DOC folder.
The visual is a functionally-reduced version of the native Matrix visual that offers the same subtotal-related customizations that are available in the Matrix visual.
Power_BI_Developer_community_April_May_update
To review the available customizations please expand the Subtotals drop-down menu in the property pane, modify the subtotals settings, and track the changes to the subtotals presentation (named Totals) by the visual.
switchFocusModeState: (on: boolean) => void
Parameters:
on – when true the visual will enter focus mode, when false the visual will exit focus mode.
The flag isInFocus in VisualUpdateOptions can be checked to find out if the visual is in a focus mode or not.
As always, feel free to use all the communication channels at your disposal to connect with our team, share your thoughts and ask questions:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.