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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
UncleLewis
Responsive Resident
Responsive Resident

Web Scrape The Column of the Table Wasn't Found

Hi all,

Using Power Query in Power BI.
I scraped a table of Federal Holidays for 2021.
I converted it into a function, created a list of years, and tried to invoke the function.
2022 came down without issue.
However, in 2023 I received the error: "The column 'Federal holiday' of the table wasn't found"

I tried again using 2023 as the base year and converted to a function.
This time I added Text.Trim around the headers but I get the same error.

Here is the url for 2021:
https://www.calendarpedia.com/holidays/federal-holidays-2021.html

Thanks,

-w

1 REPLY 1
ThxAlot
Super User
Super User

Nothing special

let
    fx = (yr as number) =>
        let
            Page = Web.Page(Web.Contents("https://www.calendarpedia.com/holidays/federal-holidays-" & Text.From(yr) & ".html")),
            Navi = Page{0}[Data],
            Tb = Table.RemoveLastN(Table.Skip(Navi)),
            #"Promoted Headers" = Table.PromoteHeaders(Tb)
        in
            #"Promoted Headers",
    
    Invocation = List.Transform({2020..2030}, fx),
    #"Combined Tables" = Table.Combine(Invocation)
in
    #"Combined Tables"

ThxAlot_0-1688946499235.png



Expertise = List.Accumulate(


        {Days as from Today},


        {Skills and Knowledge},


        (Current, Everyday) => Current & Day.LearnAndPractise(Everyday)


)



Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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
Top Kudoed Authors