Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
riyajain12345
Frequent Visitor

How to replace data in power bi

I have created a dashbord using Import SQL Statement 

riyajain12345_0-1713433618713.png

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?

1 ACCEPTED SOLUTION
AmiraBedh
Most Valuable Professional
Most Valuable Professional

-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.


Proud to be a Power BI Super User !

Microsoft Community : https://docs.microsoft.com/en-us/users/AmiraBedhiafi
Linkedin : https://www.linkedin.com/in/amira-bedhiafi/
StackOverflow : https://stackoverflow.com/users/9517769/amira-bedhiafi
C-Sharp Corner : https://www.c-sharpcorner.com/members/amira-bedhiafi
Power BI Community :https://community.powerbi.com/t5/user/viewprofilepage/user-id/332696

View solution in original post

3 REPLIES 3
AmiraBedh
Most Valuable Professional
Most Valuable Professional

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.

 


Proud to be a Power BI Super User !

Microsoft Community : https://docs.microsoft.com/en-us/users/AmiraBedhiafi
Linkedin : https://www.linkedin.com/in/amira-bedhiafi/
StackOverflow : https://stackoverflow.com/users/9517769/amira-bedhiafi
C-Sharp Corner : https://www.c-sharpcorner.com/members/amira-bedhiafi
Power BI Community :https://community.powerbi.com/t5/user/viewprofilepage/user-id/332696

@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
Most Valuable Professional
Most Valuable Professional

-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.


Proud to be a Power BI Super User !

Microsoft Community : https://docs.microsoft.com/en-us/users/AmiraBedhiafi
Linkedin : https://www.linkedin.com/in/amira-bedhiafi/
StackOverflow : https://stackoverflow.com/users/9517769/amira-bedhiafi
C-Sharp Corner : https://www.c-sharpcorner.com/members/amira-bedhiafi
Power BI Community :https://community.powerbi.com/t5/user/viewprofilepage/user-id/332696

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.