Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
dartdoka
Frequent Visitor

PowerBI Javascript API usage in Angular

Hi,

 

We managed to embed a Power BI report in our angular app.

We now want to test the Dynamic Binding feature but we're facing issues.

If the config is of type IEmbedConfiguration, we have an error because datasetBinging is not defined in type IEmbedConfiguration.

If the config is of type IReportLoadConfiguration, we have an error because when we call the embed method, IReportLoadConfiguration is not compatible with IEmbedConfiguration.

 

Any help on how to achieve that would be really appreciated.

 

Here is an extract of our code:

import * as pbi from 'powerbi-client';
import * as pbimodels from 'powerbi-models';

config: pbi.IEmbedConfiguration;
// config: pbimodels.IReportLoadConfiguration;

this.config = {
        // Remove type when use IReportLoadConfiguration type
        type: 'report',
        accessToken: this.token,
        tokenType: pbimodels.TokenType.Embed,
        embedUrl: this.reportEmbedUrl,
        id: this.reportId,
        permissions: pbimodels.Permissions.All,

        datasetBinding: {
          datasetId: "notOriginalDatasetId", // The wanted dataset id
        },
        settings: {
          filterPaneEnabled: true,
          navContentPaneEnabled: false
        }
    };

this.report = this.powerbi.embed(this.reportContainer.nativeElement, this.config) as pbi.Report;

Thanks

0 REPLIES 0

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.