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
Jmole123
Regular Visitor

Is it possible to refresh a report using a new excel file with the same table column names?

I recieve a new excel data file every week from a company, it contains the same table columns just with new weekly data, is it possible for me to get Power BI to refresh my report using these new excel files without having to update the original file? Am I able to create a folder and have Power BI refresh with whatever is inside that folder? My goal is to update my Power BI dashboard and reports with as little manual labour as possible.  I am new to power BI and I am unsure whether this is possible or not. Any tips on how I could make this work will be great. 

1 ACCEPTED SOLUTION
TeigeGao
Solution Sage
Solution Sage

Hi @Jmole123 ,

In your scenario, we can use the PowerBI folder connector. 

PBIDesktop_NPMYpvk9b2.png

Then select the Combine (Combine & Edit) button:
PBIDesktop_rHZdHQRHSl.png

We will get a table like below, after that, we can delete a column Source.Name:

PBIDesktop_vqvYi0kZLL.png

Close & Apply, we will get a table:

PBIDesktop_W7Q795ZR7n.png

Then, we can add a new file to the folder, refresh it:

PBIDesktop_qnXlmEfvdB.png

The power query like below:

let
    Source = Folder.Files("C:\Users\teigeg\Desktop\Excel"),
    #"Filtered Hidden Files1" = Table.SelectRows(Source, each [Attributes]?[Hidden]? <> true),
    #"Invoke Custom Function1" = Table.AddColumn(#"Filtered Hidden Files1", "Transform File", each #"Transform File"([Content])),
    #"Renamed Columns1" = Table.RenameColumns(#"Invoke Custom Function1", {"Name", "Source.Name"}),
    #"Removed Other Columns1" = Table.SelectColumns(#"Renamed Columns1", {"Source.Name", "Transform File"}),
    #"Expanded Table Column1" = Table.ExpandTableColumn(#"Removed Other Columns1", "Transform File", Table.ColumnNames(#"Transform File"(#"Sample File"))),
    #"Removed Columns" = Table.RemoveColumns(#"Expanded Table Column1",{"Source.Name"})
in
    #"Removed Columns"

Best Regards,

Teige

View solution in original post

1 REPLY 1
TeigeGao
Solution Sage
Solution Sage

Hi @Jmole123 ,

In your scenario, we can use the PowerBI folder connector. 

PBIDesktop_NPMYpvk9b2.png

Then select the Combine (Combine & Edit) button:
PBIDesktop_rHZdHQRHSl.png

We will get a table like below, after that, we can delete a column Source.Name:

PBIDesktop_vqvYi0kZLL.png

Close & Apply, we will get a table:

PBIDesktop_W7Q795ZR7n.png

Then, we can add a new file to the folder, refresh it:

PBIDesktop_qnXlmEfvdB.png

The power query like below:

let
    Source = Folder.Files("C:\Users\teigeg\Desktop\Excel"),
    #"Filtered Hidden Files1" = Table.SelectRows(Source, each [Attributes]?[Hidden]? <> true),
    #"Invoke Custom Function1" = Table.AddColumn(#"Filtered Hidden Files1", "Transform File", each #"Transform File"([Content])),
    #"Renamed Columns1" = Table.RenameColumns(#"Invoke Custom Function1", {"Name", "Source.Name"}),
    #"Removed Other Columns1" = Table.SelectColumns(#"Renamed Columns1", {"Source.Name", "Transform File"}),
    #"Expanded Table Column1" = Table.ExpandTableColumn(#"Removed Other Columns1", "Transform File", Table.ColumnNames(#"Transform File"(#"Sample File"))),
    #"Removed Columns" = Table.RemoveColumns(#"Expanded Table Column1",{"Source.Name"})
in
    #"Removed Columns"

Best Regards,

Teige

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.

Top Solution Authors
Top Kudoed Authors