Forum Discussion

riyajain12345's avatar
riyajain12345
Frequent Visitor
2 years ago
Solved

How to replace data in power bi

I have created a dashbord using Import SQL Statement 

Now i wanted to create same dashbord just need change the table name in SQL code ,  so i have dupicate the dashbord  now just i wnat to replce the dast source so do we have option to replace the data source?

  • AmiraBedh's avatar
    AmiraBedh
    2 years ago

    -Open your duplicated report in Power BI Desktop.
    -Go to the "Home" tab and click on "Transform Data" to open Power Query Editor.
    -Find the query that is currently fetching data for the "Open Inventory".
    -Either modify this query to fetch "Closed Inventory" data (by changing the SQL query) or add a new query for the "Closed Inventory" if you plan to use both datasets in different visualizations.
    -If you modify the existing query, make sure to adjust the table name or any filters in the SQL statement to fetch the "Closed Inventory".
    -After modifying or adding your new query, click "Close & Apply" to update the report.

3 Replies

  • In your duplicated dashboard, locate where the SQL query is being used and once you do it, you should be able to edit it. Simply replace the old table name with the new table name in the SQL code. Make sure the new table has the same schema or adjust the query to accommodate any differences.

    After editing, save the changes and refresh the dashboard to ensure that it now pulls data from the new table.

     

    • riyajain12345's avatar
      riyajain12345
      Frequent Visitor

      AmiraBedh thanks for your help

      In this case what is hepping -

      Acutlly For example- i have created open inventory dahsboard using SQL code , now i have duplicated the dashbord , in dupilcated dashbord still data is poining for open inventory, i want to change  dupliacated dashbord  for closed invontray data if i am chnaging data for duplicated dashbord even its chnaging for actul dashboard as well which i don't want. so acutual dashbord should be with open data and duplicated dashbord i should replace with new sql code which is closed inventory data.

      • AmiraBedh's avatar
        AmiraBedh
        Super User

        -Open your duplicated report in Power BI Desktop.
        -Go to the "Home" tab and click on "Transform Data" to open Power Query Editor.
        -Find the query that is currently fetching data for the "Open Inventory".
        -Either modify this query to fetch "Closed Inventory" data (by changing the SQL query) or add a new query for the "Closed Inventory" if you plan to use both datasets in different visualizations.
        -If you modify the existing query, make sure to adjust the table name or any filters in the SQL statement to fetch the "Closed Inventory".
        -After modifying or adding your new query, click "Close & Apply" to update the report.