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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
vikramkumawat
Advocate II
Advocate II

How to change power bi data source parameter in .NET MVC application ?

Hello,

I made a Power BI report that connects to a SQL database and lets me change databases by updating a parameter. This works well when I publish the report and change the parameter in Power BI online. Now, I want to add this report to a .NET MVC application. I need to know how to change the database parameter from within the .NET app, like I can in Power BI online. Is it possible to do this?

Thanks.

2 REPLIES 2
vikramkumawat
Advocate II
Advocate II

@Anonymous thank you for your reply.

 

Your solution will work and it will update the Paramter which is being used to fetch the database.

 

The scernario is, we have multi tenant application and each tenant has it's own database. Now, we want to load the report for the logged in tenant.

 

e.g. if the Tenant1 is logged in then our mvc application should pass the Tenant database name as parameter value and it should load the report for that tenant, if Tenant2 logged in then it should load the report for that tenant only and so on.

 

So is it possible?

Anonymous
Not applicable

Hi @vikramkumawat ,

Base on your description, it seems like you want to change the database parameter from within the .NET app as you can in Power BI. Please try the following steps and check if can achieve your requirement:

  1.  Embed the report: 

          Creating Embedded Reports in Your Web Apps with Power BI Embedded (codemag.com)

          Embed Power BI report in a Power BI embedded analytics application for your organization - Power BI

      2. Pass the dynamic parameter to embed report in .NET:

         Power BI Embedded Query Parameters API | Azure updates | Microsoft Azure

         Can I pass a dynamic query parameter to an embedded Power BI report in ASP.Net MVC? - Stack Overflow

Best Regards

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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