cancel
Showing results for 
Search instead for 
Did you mean: 
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 a 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

View solution in original post

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are You Ready?

Test your skills now with the Cloud Skills Challenge.

Top Solution Authors
Users online (4,387)