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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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

-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
Resident Rockstar
Resident Rockstar

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.

-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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.