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 Embedded Analytics...
Q&A support with row-level security (RLS)
Token- based identity for AAD users in SQL Azure (Preview)
New AAD application registration page for Power BI
Track workspace assignment to capacity with ‘Status’ API
Managing multi-tenancy with Power BI Embedded analytics
Want to ensure your end-users have the optimal experience with analytics?
We hear you! What’s important for your end-users is important for us too. We recently made significant work to improve the loading time of reports. To make sure your users enjoy and get the best experience when loading reports, please follow the guidelines in this article. Here are some of the useful tips you can find in the article:
When generating the embed token, you can specify the effective identity of a user in Azure SQL by passing the AAD access token to the server. The access token will be used to pull only the relevant data for that user from Azure SQL, for that specific session.
Token-based identity can be used to manage each user’s view in SQL Azure, or to sign-in to SQL Azure as a specific customer in a multi-tenant database. It can also be used to apply row-level security on that session in SQL Azure and retrieve only the relevant data for that session, removing the need to manage row-level security in Power BI.
To use token-based identity, you first need to get an AAD access token, and then add it into the ‘identitiyBlob’ property when generating the embed token:
{
"accessLevel": "View",
"identities": [
{
"datasets": [ "fe0a1aeb-f6a4-4b27-a2d3-b5df3bb28bdc"],
“identityBlob”: {
“value”: “eyJ0eXAiOiJKV1QiLCJh….”
}
}
]
}
token-based identity only works for DirectQuery models on dedicated capacity. Learn more on how to use token-based identity with SQL Azure.
The new page is used for registering new applications only. To view and edit existing applications, go to the Azure portal. Learn more on app registration process.
For embedding, we recommend to register applications as part of setting up your embedding environment.
Power_BI_Developer_community_December_update
We are now adding Workspace assignment status, that enables checking the current state of the assignment of a workspace to a capacity (e.g. CompletedSuccessfully). Checking the status API can help in few scenarios:
To help you choose the best model for your needs and your customers, we published this article to help weigh the different options across several important evaluation criteria. We hope that this article will make it easier to build the right solution and scale to production faster.
Power_BI_Developer_community_December_update
If you are puzzled or run into few issues, be sure to check our resources that can help you get by:
As of API 2.3.0, you will be able to edit this page (watermark) and add information on how to use the visual, features, and license related issues if your visual is offering additional purchases.
See this code example:
export class BarChart implements IVisual {
//...
private element: HTMLElement;
private isLandingPageOn: boolean;
private LandingPageRemoved: boolean;
private LandingPage: d3.Selection<any>;
constructor(options: VisualConstructorOptions) {
//...
this.element = options.element;
//...
}
public update(options: VisualUpdateOptions) {
//...
this.HandleLandingPage(options);
}
private HandleLandingPage(options: VisualUpdateOptions) {
if(!options.dataViews || !options.dataViews.length) {
if(!this.isLandingPageOn) {
this.isLandingPageOn = true;
const SampleLandingPage: Element = this.createSampleLandingPage(); //create a landing page
this.element.appendChild(SampleLandingPage);
this.LandingPage = d3.select(SampleLandingPage);
}
} else {
if(this.isLandingPageOn && !this.LandingPageRemoved){
this.LandingPageRemoved = true;
this.LandingPage.remove();
}
}
}
The landing page of the bar chart from the above code:
Power_BI_Developer_community_December_update
Tuple filter API is similar to Basic filter, but it allows defining conditions for several columns and tables.
The following is the filter interface:
interface ITupleFilter extends IFilter {
$schema: string;
filterType: FilterType;
operator: TupleFilterOperators;
target: ITupleFilterTarget;
values: TupleValueType[];
}
Fields:
target: is an array of columns with table names:
declare type ITupleFilterTarget = IFilterTarget[];
The filter can address columns from different tables.
$schema: is "https://powerbi.com/product/schema#tuple"
filterType: is FilterType.Tuple
Operator: only allows to use "In" operator
Values: is an array of value tuples, where each tuple represents one permitted combination of the target column values.
declare type TupleValueType = ITupleElementValue[];
interface ITupleElementValue {
value: PrimitiveValueType
}
Complete example:
let target: ITupleFilterTarget = [
{
table: "DataTable",
column: "Team"
},
{
table: "DataTable",
column: "Value"
}
];
let values = [
[
// the 1st column combination value (aka column tuple/vector value) that the filter will pass through
{
value: "Team1" // the value for `Team` column of `DataTable` table
},
{
value: 5 // the value for `Value` column of `DataTable` table
}
],
[
// the 2nd column combination value (aka column tuple/vector value) that the filter will pass through
{
value: "Team2" // the value for `Team` column of `DataTable` table
},
{
value: 6 // the value for `Value` column of `DataTable` table
}
]
];
let filter: ITupleFilter = {
$schema: "https://powerbi.com/product/schema#tuple",
filterType: FilterType.Tuple,
operator: "In",
target: target,
values: values
}
To apply the filter with multi the new capability:
visualHost.applyJsonFilter(filter, "general", "filter", FilterAction.merge);
Note that order of column names and values of condition are sensitive.
The equivalent SQL query is:
SELECT * FROM DataTable WHERE Team = "Team1" AND Value = 5 OR Team = "Team2" AND Value = 6;
As always, feel free to use all the communication channels at your disposal to connect with our team, share your thoughts and ask questions:
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 embedded analytics Ideas forum, or our Custom Visuals Ideas forum.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.