Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
1 year ago

Dynamically DataBase Connection based on User Selection of the Database Name

Hello everyone,

 

We have a requirement to connect to differenet DB based on the users selection of the DB Name in the slicer.

 

We have list of the DB Name in a field. We have different DB with same table structure in each DB in bothe direct . Based on the user selection of the DB Name in the field that list different DB, tables are corresponding DB tables to be connected.

 

Tried parameterized way to implementing the same but its not working as expected.

 

Please let me know if there is any alternate way to achieve the same.

4 Replies

  • Hey Anonymous ,

     

    this is not possible.

     

    We created Azure DevOps pipelines to deploy a single report to different workspaces where a workspace represents a customer. There is a dedicated database per customer.

     

    Regards,

    Tom

  • Anonymous 

    Power BI currently doesn't support dynamically changing data sources at runtime based on slicer selection.

    You can try- Import data from all databases into separate tables within the model and use a slicer to filter between them.

     

    πŸ’Œ If this helped, a Kudos πŸ‘ or Solution mark βœ… would be great! πŸŽ‰
    Cheers,
    Kedar
    Connect on LinkedIn

  • The requirement to dynamically connect to different databases based on user selection in a slicer is a common challenge in Power BI. Unfortunately, Power BI doesn't natively support dynamic data source switching at runtime based on slicer selection.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Thanks for the reply from anmolmalviya05, Kedar_Pande and TomMartens , please allow me to add some more information:
    Hi  Anonymous ,

     

    As far as I know, Power BI doesn't support this feature for now, the slicer can't dynamically switch the data source, the visual objects are only affected after loading the data into the semantic model.

    You can try to use the use parameter or define a parameter SQL query as proposed in the link below:

    Dynamically Change Data Source Using Parameter and... - Microsoft Fabric Community

     

    You can submit an idea for it at Home (microsoft.com) and wait for users with the same needs as you to vote for you to help make it happen as soon as possible.

     

    This is the related document, you can view this content:

    Change data source dynamically using a Slicer by b... - Microsoft Fabric Community

    Solved: Dynamically change data source - Microsoft Fabric Community

     

    Best Regards,

    Liu Yang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.