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
F75
Advocate I
Advocate I

html pages - Invoked function error

Hi,

 

I am trying to download olympic events details from html pages. I am trying invoke a function, which extracts a table from html pages. I want pass page number as variable. All the html pages has this table 'Competiors' . This table has 11 columns, for some events some columns are not relevant- so the additional columns are named as column10 and column11. 

 

The below are some urls

https://data.fis-ski.com/dynamic/results.html?sector=AL&raceid=91463
https://data.fis-ski.com/dynamic/results.html?sector=AL&raceid=91464
https://data.fis-ski.com/dynamic/results.html?sector=AL&raceid=91465

 

After creating a function when i pass a page number i get an error, What is this error? and How can i resolve it?

 

(Page as number) as table =>
let
    Source = Web.Page(Web.Contents("https://data.fis-ski.com/dynamic/results.html?sector=AL&raceid=" & Number.ToText(Page))),
    Data4 = Source{4}[Data],
    #"Changed Type" = Table.TransformColumnTypes(Data4,{{"Rank", type text}, {"Bib", type text}, {"FIS Code", type text}, {"Name", type text}, {"Year", type text}, {"Nation", type text}, {"Run 1", type text}, {"Run 2", type text}, {"Total Time", type text}, {"Diff.", type text}, {"FIS Points", type text}})
in
    #"Changed Type"

 

invoke function.JPG

 

1 ACCEPTED SOLUTION
v-chuncz-msft
Community Support
Community Support

@F75,

 

You may change it as follows.

    #"Filtered Rows" = Table.SelectRows(Source, each ([Caption] = "Competitors")),
    Data = #"Filtered Rows"{0}[Data]
in
    Data
Community Support Team _ Sam Zha
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

2 REPLIES 2
v-chuncz-msft
Community Support
Community Support

@F75,

 

You may change it as follows.

    #"Filtered Rows" = Table.SelectRows(Source, each ([Caption] = "Competitors")),
    Data = #"Filtered Rows"{0}[Data]
in
    Data
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks @v-chuncz-msft

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