Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hey there.
This is saumil here. I am new to the power bi and I do have a question. I hope you guys makes me clear about it.
I have a multi-tenant app and have one power bi report. In that report I have a Tenant parameter with the list of values "Tenant1" & "Tenant2". Please refer the screenshot. Now I am using this paramter value to connect to the database as dbname.
When I publish the report to the power bi service then from there I can able to change the Tenant value and it loads the report accordingly.
Wha I wanted to do is, I want to change the database name from my angular or .net core application by passing the value of Tenant Parameter.
So, can you guys help me out on this?
@Anonymous thanks for your reply. Now what if i want to set the value of that parameter from my client app which made in .net mvc?
Thanks for your reply. I have completed at this level but once I publish that report to power bi server and when I try to pass the parameter value from my angular or .net mvc app then it does not change the database name.
So, I want to pass that dynamic parameter from my client app and needs to get the report details as per the login user's database.
Thanks
Hi @Saumil ,
Please try below steps:
1. Create a Parameter:
- Open your Power BI Desktop.
- Go to the Home tab and click on Manage Parameters.
- Create a new parameter (e.g., "DatabaseName") and set its value to the initial database name (e.g., "AdventureWorksDW2012").
2. Modify Your Data Source:
- Connect to your data source (e.g., SQL Server database) using Power Query.
- In the Power Query Editor, locate the step where you specify the database connection.
- Instead of hard-coding the database name, replace it with the parameter you created (e.g., '#"AdventureWorksDW2012"').
3. Change the Data Source Dynamically:
- Now you can go to the query where you want the source to be dynamically changing.
- Click on the relevant source step (e.g., the one specifying the database name).
- Set the database name to come from the parameter you created earlier (e.g., '#"AdventureWorksDW2017BIG"').
- That's it! Your report will now adapt to the new data source without manual intervention.
For more details, you could read related document: Change the Source of Power BI Datasets Dynamically Using Power Query Parameters - RADACAD
Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 6 | |
| 3 | |
| 3 | |
| 3 | |
| 3 |