Forum Discussion

Krunalbpatel's avatar
Krunalbpatel
Helper III
9 years ago
Solved

Change Published report data's Dynamically

Hi,

 

I have Prepare a report In Power BI Desktop using my Local Database(Local Server) and Published that report to Power BI Account. Its working fine for me. Now I want to use this same report for my QA Server Database.

 

How can I use this single report for both the database(for different server)? Is there a way where I can change the dataset dynamically.

 

I do not want to goto edit query and change the connection sting and republish on the Power BI Account. This Option is the last option for me to do that. But I want that 1 single report is worked for both the server. 

 

Is this can possible to change connection parqameter dynamically?

FYI - I want to display this report in my MVC Application.

 

Thanks

Krunal Patel

  • v-qiuyu-msft's avatar
    v-qiuyu-msft
    9 years ago

    Hi Krunalbpatel,

     

    If you are satisfied with the answer, would you please mark the helpful reply as an answer, so that we can close this thread? 

     

    Best Regards,
    Qiuyun Yu

6 Replies

  • ankitpatira's avatar
    ankitpatira
    Community Champion

    Krunalbpatel You can explore the possibility of using power bi rest apis using which you maybe able to to change dataset connection strings.

     

    Other option i can think of is if your data source is sql server then write sql query to import data from both the database. For example

     

    Select *, 'Prd' as [database] from table1

    union 

    Select *, 'QA' as [database] from table2

     

    Then use slicer to differentiate on data between two databases. When published to power bi service this will work.

  • v-qiuyu-msft's avatar
    v-qiuyu-msft
    Community Support

    Hi Krunalbpatel,

     

    Based on my research, on Power BI Service, one dataset can be used by one report or more than one reports. Once the relation between report and dataset is established on the service, we are not able to replace dataset for the report currently, except republish reports from the Power BI Desktop, or deign a new report from the other dataset on service.

     

    So in your scenario, I'm afraid you need to change connection string then republish report to service. Also there is same idea which you can vote and comment on: Accessing multiple datasets in single report.

     

    If you have any question, please feel free to ask.

     

    Best Regards,
    Qiuyun Yu

      • v-qiuyu-msft's avatar
        v-qiuyu-msft
        Community Support

        Hi Krunalbpatel,

         

        If you are satisfied with the answer, would you please mark the helpful reply as an answer, so that we can close this thread? 

         

        Best Regards,
        Qiuyun Yu