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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Zain26
Helper I
Helper I

Change Data Source for Table

Hi guys, I want to change the data source of my existing tables. Currently I have 4 tables A,B,C,D which I use in my report. Each of these tables is created by appending 10 csv files. For Example:
TABLE A= 1A.csv+2A.csv+3A.csv+4A.csv+5A.csv+6A.csv+7A.csv+8A.csv+9A.csv+10A.csv
TABLE B= 1B.csv+2B.csv+3B.csv+4B.csv+5B.csv+6B.csv+7B.csv+8B.csv+9B.csv+10B.csv 

Same for Table C and D. 
Initially (when I was pretty new to PowerBI), I took data from each of the CSVs (Get Data) and appended those into these 4 tables in the Query editor. However I realized that this is a pretty vague approach thus I created a SQL Server Database where I have fully populated Table A,B,C and D with data from all the CSVs.  All I want is to change the source of Table A,B,C & D  in the report from append query to sql server database. How can I achieve this ? 

1 ACCEPTED SOLUTION


@Zain26 wrote:

Can you elaborate this with some example. 


@Zain26

In advanced editor, you just replace the hightlighted part from csv query with the highlight part from SQL Server.

Capture.PNG

View solution in original post

3 REPLIES 3

The best way I have found (and best way to learn) is to create a new query to the data in its new location. Then go into the advanced editor and cut the code. Then go into the original query, paste the code at the top, and then delete the old source lines of code leaving just he new ones. See how you go.  Each line of code normally refers to the previous line of code in the first parameter. So as long as you get those right, you should be fine



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.

Can you elaborate this with some example. 


@Zain26 wrote:

Can you elaborate this with some example. 


@Zain26

In advanced editor, you just replace the hightlighted part from csv query with the highlight part from SQL Server.

Capture.PNG

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.