Elvino Michel
Elvino Michel

Reputation: 447

Power BI getting new data from a file: how could this be done better?

I have a Power BI in my local folder.

I have inputs, excel files.

When I have a new input with new data, in the form of a new excel file, I only care about these new data. I do not care about anything data in the past file.

Currently, when I receive a new excel input:

  1. I change the name of the excel file giving it the same name as the file that it will replace.
  2. I suppress the old excel file in the folder where it is stored
  3. I replace it with the new excel file, with the name of the old one in the folder of the old excel file

To provide a concrete example, here is my folder with two files and my power bi:

enter image description here

If I have a new file with corresponding to the "Rabbit employed by Batman", I supress this excel file in the folder. I change the name of my new excel input, calling it "Rabbit employed by Batman". I replace it in the folder with the Power BI.

I feel that this might not be very clever, and I wonder if there is a better way to proceed.

Upvotes: 0

Views: 283

Answers (1)

Patricio Lobos
Patricio Lobos

Reputation: 136

In Power Query use excel from folder, sort by date and choose the latest one, If you have more than one file with the same name, create an Index, rank over filename sort descending and use the number 1 as your binary source.

Upvotes: 1

Related Questions