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
mjs_81
Frequent Visitor

Embedded report with dynamically changing data source

Hi there,

 

I'm relatively new to Power BI and need a little help with embedding a report with dynamically data source into a web page.

 

Therefor, I want to use a rest API to get and display daily changing data. I have already managed to get a flexible data source in Power BI Desktop by using query parameters and to embed a static report in the web page.

But the next step needed would be to define the parameters in the code of the web application in which the report should be embedded and pass these parameters by the embedding call.


I've done a lot of research on it, but I just haven't found anything that has helped me.

Does anyone know my problem and perhaps can help me or give tips for another solution?

Thanks a lot!

3 REPLIES 3
TedPattison
Employee
Employee

Yes, you can use parameters in a Power BI Desktop project to allow for dynamically switching a dataset in the Power BI service to point to a different data source. There is also support in the Power BI Service API to automate changing the parameter value so your application can update the value.

 

But here is the rub. Power BI does not really support updating the data source for a dataset within the context of a single request. Changing the parameter value will not take effect instantly and any change you make will be seen across all users.  It works great if your scenario involves occasionally redirecting a dataset to a different underlying database and then running a refresh operation. It will not work at all if your goal is to have a single dataset where you can redirect the connection to a different underlying database depending on who the user is.

Thank you very much for your reply.


Maybe to clear it up a little:
I wanted to change the underlying source of the dataset (an API like https:// myurl. com/year_month_day, where year, month and day are replaced by parameters. The schema of the APIs remains the same) by passing the values of the parameters via the embedding call (I used the ngx-powerbi component) in the code of an angular-based web app.

It should be done automatically so that changing manually over desktop or service is not what I'm looking for.


So, did I get it right that there is no real solution to my problem in Power BI? Or does your suggested solution with the Power BI Service API to automate the parameter value change fit my problem and if so, how can I apply it?

Yes, you can change paremeter values with the Power BI Service API. Therefore, you will not be required to update parameters by hand in the Power BI portal.

 

Just remember that changing parameters affects all users and it is something you do occasionally and not frequently. As long as you design fits in with these assumptions, you can build solutions using parameters.

 

Once again, I see quite a few people who want to change dataset parameters values that take effect within the context of a single request. The goal of these people is to have several users executing requests at the same time while each users gets a common dataset to rediected to a different data source. This functionality is defintely not supported.

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.