Forum Discussion
Connect Dash Board report to different Database based on Parameter Value
I am new to Power BI. We have multiple databases. The user will pass the database name through a parameter. The dashboard report needs to connect to the particular database and fetch the data. The dashboard reports are launched into the Power BI service. Please suggest the better way to approach this.
- Anonymous2 years ago
HI paraparam_1972,
Did you mean to use the query parameter or control the connection string? If that is the case, you can refer to the following blog:
Using the Power BI Service Parameters to change connection strings (To possibly change between Dev
Notice: these datasources should has same structure or they will return the error for datasource table key feild not match.
Regards,
Xiaoxin Sheng
4 Replies
- AnonymousNot applicable
HI paraparam_1972,
Did you mean to use the query parameter or control the connection string? If that is the case, you can refer to the following blog:
Using the Power BI Service Parameters to change connection strings (To possibly change between Dev
Notice: these datasources should has same structure or they will return the error for datasource table key feild not match.
Regards,
Xiaoxin Sheng
- paraparam_1972New Member
Thanks for the reply Xiaoxin Sheng. Let me check and revert to you if I have any issue. Thanks alot.
- paraparam_1972New Member
Hi Xiaoxin Sheng,
Can we pass a parameter based on login in our mobile app and render the dashboard without making changes in the Power BI Service In other words, should the dashboard automatically fetch data from different databases based on the parameter with out making changes in the connection string
- AnonymousNot applicable
HI paraparam_1972,
Perhaps you can take a look at the following document about power bi rest api to update parameters:
Datasets - Update Parameters In Group - REST API (Power BI Power BI REST APIs) | Microsoft LearnBTW, you can also consider getting these data source records to power bi side, remark the records source and bind users to the source field.
After these steps, you can create a RLS role based on current username and filter on these records.
Row-level security (RLS) with Power BI - Microsoft Fabric | Microsoft Learn
Regards,
Xiaoxin Sheng