Modify the code in Advanced Editor in Power Query as follows:Īs you can see, we need to obtain the data source dynamic and split the second step of the first picture into three smaller steps (picture 2).įirst use the temp step to customize the excel file name, which can include a combination of text and date.The method of getting data is the same as above, then we can see original generated code:.We need to import the table data in the folder into excel first, and custom the code in PQ advanced editor to dynamically obtain the source data, so when refreshing the data, it will automatically find the file with the latest date in the folder. Sample 2: Select the latest data based on the date in the file name Reference: Combine files (binaries) in Power BI Desktop - Power BI | Microsoft Docs
0 Comments
Leave a Reply. |