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

Try your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now

Reply
poweruser27
Frequent Visitor

Extract Table from Webpage

Hello, I'm trying extract the table from below URL...but I only get the column names of the table without actual data

AQI Current Hour Summary (wa.gov)

 

1 REPLY 1
Ahmedx
Super User
Super User

pls try URL adress

https://enviwa.ecology.wa.gov/Report/LatestAQI
or

let
    Source = Web.BrowserContents("https://enviwa.ecology.wa.gov/Report/LatestAQI"),
    #"Extracted Table From Html" = Html.Table(Source, {{"Column1", "TABLE.k-selectable > * > TR > TH[rowspan=""1""]:not([colspan]):nth-child(1):nth-last-child(6), TABLE.k-selectable > * > TR > TD:not([colspan]):not([rowspan]):nth-child(1):nth-last-child(6)"}, {"Column2", "TABLE.k-selectable > * > TR > TH[rowspan=""1""]:not([colspan]):nth-child(1):nth-last-child(6) + TH[rowspan=""1""]:not([colspan]):nth-child(2):nth-last-child(5), TABLE.k-selectable > * > TR > TD:not([colspan]):not([rowspan]):nth-child(1):nth-last-child(6) + TD:not([colspan]):not([rowspan]):nth-child(2):nth-last-child(5)"}, {"Column3", "TABLE.k-selectable > * > TR > TH[rowspan=""1""]:not([colspan]):nth-child(1):nth-last-child(6) + TH[rowspan=""1""]:not([colspan]):nth-child(2):nth-last-child(5) + TH[rowspan=""1""]:not([colspan]):nth-child(3):nth-last-child(4), TABLE.k-selectable > * > TR > TD:not([colspan]):not([rowspan]):nth-child(1):nth-last-child(6) + TD:not([colspan]):not([rowspan]):nth-child(2):nth-last-child(5) + TD:not([colspan]):not([rowspan]):nth-child(3):nth-last-child(4)"}, {"Column4", "TABLE.k-selectable > * > TR > TH[rowspan=""1""]:not([colspan]):nth-child(1):nth-last-child(6) + TH[rowspan=""1""]:not([colspan]):nth-child(2):nth-last-child(5) + TH[rowspan=""1""]:not([colspan]):nth-child(3):nth-last-child(4) + TH[rowspan=""1""]:not([colspan]):nth-child(4):nth-last-child(3), TABLE.k-selectable > * > TR > TD:not([colspan]):not([rowspan]):nth-child(1):nth-last-child(6) + TD:not([colspan]):not([rowspan]):nth-child(2):nth-last-child(5) + TD:not([colspan]):not([rowspan]):nth-child(3):nth-last-child(4) + TD:not([colspan]):not([rowspan]):nth-child(4):nth-last-child(3)"}, {"Column5", "TABLE.k-selectable > * > TR > TH[rowspan=""1""]:not([colspan]):nth-child(1):nth-last-child(6) + TH[rowspan=""1""]:not([colspan]):nth-child(2):nth-last-child(5) + TH[rowspan=""1""]:not([colspan]):nth-child(3):nth-last-child(4) + TH[rowspan=""1""]:not([colspan]):nth-child(4):nth-last-child(3) + TH[rowspan=""1""]:not([colspan]):nth-child(5):nth-last-child(2), TABLE.k-selectable > * > TR > TD:not([colspan]):not([rowspan]):nth-child(1):nth-last-child(6) + TD:not([colspan]):not([rowspan]):nth-child(2):nth-last-child(5) + TD:not([colspan]):not([rowspan]):nth-child(3):nth-last-child(4) + TD:not([colspan]):not([rowspan]):nth-child(4):nth-last-child(3) + TD:not([colspan]):not([rowspan]):nth-child(5):nth-last-child(2)"}, {"Column6", "TABLE.k-selectable > * > TR > TH[rowspan=""1""]:not([colspan]):nth-child(1):nth-last-child(6) + TH[rowspan=""1""]:not([colspan]):nth-child(2):nth-last-child(5) + TH[rowspan=""1""]:not([colspan]):nth-child(3):nth-last-child(4) + TH[rowspan=""1""]:not([colspan]):nth-child(4):nth-last-child(3) + TH[rowspan=""1""]:not([colspan]):nth-child(5):nth-last-child(2) + TH[rowspan=""1""]:not([colspan]):nth-child(6):nth-last-child(1), TABLE.k-selectable > * > TR > TD:not([colspan]):not([rowspan]):nth-child(1):nth-last-child(6) + TD:not([colspan]):not([rowspan]):nth-child(2):nth-last-child(5) + TD:not([colspan]):not([rowspan]):nth-child(3):nth-last-child(4) + TD:not([colspan]):not([rowspan]):nth-child(4):nth-last-child(3) + TD:not([colspan]):not([rowspan]):nth-child(5):nth-last-child(2) + TD:not([colspan]):not([rowspan]):nth-child(6):nth-last-child(1)"}}, [RowSelector="TABLE.k-selectable > * > TR"]),
    #"Promoted Headers" = Table.PromoteHeaders(#"Extracted Table From Html", [PromoteAllScalars=true]),
    #"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"County", type text}, {"Site", type text}, {"AQI Level", type text}, {"Pollutant", type text}, {"Occured", type datetime}, {"AQI", Int64.Type}})
in
    #"Changed Type"

Screen Capture #1099.png

Helpful resources

Announcements
Fabric Data Days is here Carousel

Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.