Forum Discussion

dvandolder's avatar
dvandolder
Frequent Visitor
1 year ago
Solved

Changing database selection from power bi Web App

Hi everyone, I want to set up a way to be able to have users within the power bi web app to be able to change the database source directly from their end. I assume this would be through some sort of direct real time streaming to an internal SQL database. We have multiple databases housing different data for different clients. Our team needs to be able to switch between each database within the SQL server to be able to see whichever client they are working on. I would like it to be all done using the power bi web application and not done individually on each of their power bi desktop. Please let me know if there is a solution on power bi for this.

  • You can parameterize the server/database connection but after changing that value, the model would need to be refreshed and everything about the structure of the tables would need to be identical.

    I would think it would be easier for you to set up the model to include all the data from all databases and then add a slicer to the report to only show what is required.

     

3 Replies

  • KNP's avatar
    KNP
    Super User

    You can parameterize the server/database connection but after changing that value, the model would need to be refreshed and everything about the structure of the tables would need to be identical.

    I would think it would be easier for you to set up the model to include all the data from all databases and then add a slicer to the report to only show what is required.

     

    • dvandolder's avatar
      dvandolder
      Frequent Visitor

      Yes I agree with you, that is our long term plan to have one database that stores everything. The paramater worked after I set up a gateway on my computer. Do you know if it is possible for the end user to update the parameter if I share the power bi report with them?

  • KNP's avatar
    KNP
    Super User

    The only way passing a parameter would work for users consuming the report is if you were using direct query and that's not a good idea.

     

    My thinking around pulling all the data in would be using Power Query to combine the data from all databases.

    so queries,

    stage_databaseA

    stage_databaseB etc.

     

    combined_databases

     

    In the combined query you can ensure data exists for filtering via slicer or RLS.