Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
YasirKazi77
Frequent Visitor

Upload weekly extracted excel files and show progress

Hi,
I extract a file from a system that lists the weekly progress of Team objectives. It includes the below columns (it doesn't include any date columns) : 

Week 1 extraction : (File Name : Objectives 20220201)

YasirKazi77_1-1645359173496.png

 

 

Week 1 extraction : (File Name : Objectives 20220208)

YasirKazi77_0-1645359151075.png

 

I want :

1) Upload each weekly file into PowerBI

2) Extract the date from the file name.

3) Show the Historical Weekly Progress for each Objective and the Average progress across all objectives (something like below. The dates are in the report are the dates on which the file was exported (taken from the File Name)

 

YasirKazi77_2-1645359663635.png


 Updating Media

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi  @YasirKazi77 ,

Put both Excels into the same folder.

vyangliumsft_0-1645581785417.png

Here are the steps you can follow:

1. Use Power BI to connect to a folder, click Transform data to enter Power query.

vyangliumsft_1-1645581785420.png

2. In Power Query, click Home - Advance Editor. Put this code in. (hint: replace the file name with your own file name path)

vyangliumsft_2-1645581785422.png

let
    folder = "C:\Users\xxx\xxx\excel folder",
    Source = Folder.Files(folder),
    RemoveUnused = Table.SelectColumns(Source,{"Content","Name"}),
    Addtables = Table.AddColumn(
        RemoveUnused,
        "Custom",
        each Table.PromoteHeaders(Excel.Workbook([Content]){[Item = "Sheet1",Kind = "Sheet"]}[Data])
    ),
    Addtables2 = Table.AddColumn(
        Addtables,
        "Custom2",
        each Table.PromoteHeaders(Excel.Workbook([Content]){[Item = "Sheet2",Kind = "Sheet"]}[Data])
),
    #"Removed Columns" = Table.RemoveColumns(Addtables2,{"Content"})
in
#"Removed Columns"

Result:

vyangliumsft_3-1645581785423.png

3. Click [Custom] to expand the chart and select two columns

vyangliumsft_4-1645581785424.png

Result:

vyangliumsft_5-1645581785426.png

4. Result.

put into the matrix

vyangliumsft_6-1645581785429.png

 

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi  @YasirKazi77 ,

Put both Excels into the same folder.

vyangliumsft_0-1645581785417.png

Here are the steps you can follow:

1. Use Power BI to connect to a folder, click Transform data to enter Power query.

vyangliumsft_1-1645581785420.png

2. In Power Query, click Home - Advance Editor. Put this code in. (hint: replace the file name with your own file name path)

vyangliumsft_2-1645581785422.png

let
    folder = "C:\Users\xxx\xxx\excel folder",
    Source = Folder.Files(folder),
    RemoveUnused = Table.SelectColumns(Source,{"Content","Name"}),
    Addtables = Table.AddColumn(
        RemoveUnused,
        "Custom",
        each Table.PromoteHeaders(Excel.Workbook([Content]){[Item = "Sheet1",Kind = "Sheet"]}[Data])
    ),
    Addtables2 = Table.AddColumn(
        Addtables,
        "Custom2",
        each Table.PromoteHeaders(Excel.Workbook([Content]){[Item = "Sheet2",Kind = "Sheet"]}[Data])
),
    #"Removed Columns" = Table.RemoveColumns(Addtables2,{"Content"})
in
#"Removed Columns"

Result:

vyangliumsft_3-1645581785423.png

3. Click [Custom] to expand the chart and select two columns

vyangliumsft_4-1645581785424.png

Result:

vyangliumsft_5-1645581785426.png

4. Result.

put into the matrix

vyangliumsft_6-1645581785429.png

 

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors