Power bi

Let me thiết lập a scenario for you. You get a data file from an automated system, it has the same number of columns but the data changes for every new file. Being the data savvy person that you are you’ve sầu spent some time working in excel khổng lồ make a template where you can copy your new data into lớn và then automatically all your equations và graphs magically work. You pat your self on the baông xã và happily sover out your fantastic report khổng lồ everyone you know. Then tomorrow when the data comes to you again you repeat the same process over again. Still enamored by your awesome report, you skết thúc it out again knowing you have sầu saved your self so much time not having lớn bởi vì the analysis or creation of your reports over & over again. Now, fast forward 3 months. That stupid report shows up again, và now you have sầu to lớn lug all that data from file lớn file & begrudgingly you sent out your report. Thus, is the store of the analyst. You love sầu data, but you hate it as well. Well in this tutorial I’ll show you how to lớn remove some of the pain of that continual data loading process by loading new data from a folder.

You watching: Power bi

My previous post (found here) talks about loading data from a folder. In this tutorial we will add some ngắn gọn xúc tích lớn this method that will look at a folder but only load the most recently added tòa tháp from that folder.

Data for this tutorial is located this linkMonthly Data Zip File. This data in the ZIPhường tệp tin is a monthly data sample from Feb 2016 khổng lồ April of 2016.

Download the zip tệp tin mentioned above and extract the Monthly Data folder down to lớn your desktop. Open up quansulienminh.vn Desktop and cliông chồng on theGet Databutton và selectAllon the left side. Click on thesản phẩm labeledFolder and clickConnectto continue.

*
Get Data from Folder

Select the newly unzippedMonthly Data folder that should be on your desktop. Click OK khổng lồ continue. Upon opening that thư mục location you will be presented with the multiple files. ClickEdit khổng lồ edit the query.

*
Edit Query for Folder Load

Now you are in the Query Editor. This is where the fancy query editing will work lớn our advantage. We could load all the data into lớn one large query. However, depending on the form size of your data sets or how you want to report your data this may not always be desirable. Instead you may only want data from April, then May when the new data is sent next month.

Thus, our first step khổng lồ start pairing down the data will be lớn first filter the files in sequential order. In this case because I have named the files with a Year-Month-Day format I can sort the files according to lớn their names.

Note: When using quansulienminh.vn desktop it is a good practice to name the files beginning with a YYYY-MM-DD file name. This makes it really easy when sorting and ingesting information into quansulienminh.vn. I have used other columns of information such as Date Accessed or Date Created before but have sầu gotten inconsistent results as these dates can change depending on when a tệp tin was moved or copied from one place khổng lồ another.

Cliông xã the drop down next lớn Name & sort the files in SortDescending.

See more: Top 7 Thuốc Đặc Trị Đạo Ôn Trên Lúa Chất Lượng Hàng Đầu Hiện Nay

*
Name in Sort Descending

This places the files with the most recent tệp tin at the top of the danh sách.

*
File List in Descending Order

Next cliông chồng on the Keep Rows button on theHomeribbon, select Keep Top Rows.

*
Keep Top Rows

Enter the number 1when the popup appears. ClickOK lớn continue.

*
Keep Top Rows Menu

Now you’ll notice you have only one file selected which is our lathử nghiệm file from April. Clichồng the Load File button found in theContent column.

*
Load File Button

We have sầu completed the activities in the Query Editor & can now load the data. ClickCthua thảm và Apply found on theHome ribbon. All our April data has loaded. by making a simple table we can now see all the data that was just loaded.

*
Loaded Data from April
*
Two Files Left

Return baông xã lớn nguồn BI Desktop và cliông chồng the Refresh button on theHome ribbon. Notice now how all our data has changed. We are now looking at the March data because it is the most recent file in our folder based on the file name.

*
March Data Load

To verify this we open the query editor (Click theEdit Queries on theHome ribbon). ClickRefresh Preview on theHome ribbon và finally select the Applied Step calledKept First Rows. This will reveal the month of March as our data source.

*
Month of March Loaded

Now, every time you add a new tệp tin khổng lồ our thư mục và refresh quansulienminh.vn the lathử nghiệm file (based on the naming convention we talked about earlier) will always be loaded.

See more: Họ Và Tên Tiếng Hàn Hay Cho Nữ Và Ý Tưởng Đặt Tên Con Gái, Tên Tiếng Hàn Của Bạn Là Gì

Note: This method works great when your data source is coming from an automated system. The file format must always be the same for this to work reliability. If the file naming convention changes, or the number of columns or location of those columns changes then the query will most likely fail.