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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
kian0417
Regular Visitor

Power Bi Embedded - Dynamic Binding

Hi Team,

I would like to design the dashboards & reports and embed them in my web application.

Users will just be using our web application.

I want to create the dashboards/reports once for all our users to use.

Then I require the dashboards/reports to have dynamic binding to connect to different datasets/databases based on the user's login.

I.e. when users log in as Company A they will only see “ Company A” data presented on the dashboard.

When users log in to “ Company B” they will only see “Company B” data presented on the same dashboard.

However, the most important thing is to be able to change the connection/data at run time dynamically through the web application code.

Is it possible to achieve and how can I do it? Thanks.

5 REPLIES 5
MattCalderwood
Responsive Resident
Responsive Resident

Hi @kian0417 

Sounds as though the 'Dynamic Binding' settings should work for you: https://github.com/microsoft/PowerBI-JavaScript/wiki/Dynamic-Binding

A report can have its data source changed at the point of creating the embedding configuration.

I notice that the wiki doesn't mention Dashboards though - so you might have to test it to see if it works. The behaviour might be different with dashboards as each dashboard can already bind to multiple data-models, so it might not be possible to specify a new set of ID's to bind to.

Be sure to check the known limitations on that Wiki page too - as there are a couple of additional things to consider.

@MattCalderwood 

Hi, thanks for your reply.
I had tried and put in different dataset ID but the report still remain and no any changes.

Have you confirmed that you aren't hitting any of the known limitations?

Limitations and considerations

  • The dynamically selected dataset must have the same data schema used in the report.
  • When embedding for your organization, you'll need to generate an embed token using the new API.
  • When embedding for customers, the user has to have permissions for both the report and dataset.
  • Only the new workspaces are supported. The report and datasets must be inside a new workspace.

 

I am yet to try this functionality - so cannot confirm what would happen if this is misconfigured. I would have expected an error as opposed to the report simply rendering as before.

I used another way (row-level-security) to achieve this goal, by the way, thanks to you.

Anonymous
Not applicable

I can confirm dynamic binding works pretty well for a multi-tenant SaaS app.  So, basically single report template, many datasets, all bound at run time.

I still have not yet figured out how Printing works with dynamic daasets.

 

To get this to work, the front end "embedd config" needs to indicate datasetBinding, and the Embedd token generation needs to reference the datasetID. (backend)

 

phil

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.