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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
DSArkphire
Frequent Visitor

Dynamic Web.Contents Power BI Refresh Error

I’ve run into a problem with my report, I can’t refresh my report on the power bi web service and it labels web.contents as an unsupported function.

pbi1.png

 

I’m calling my data through an API loop and from what I’ve read the problem seems to be an issue with my dynamic data source. I’ve tried to construct a partially static api but I’m not terribly sure how to proceed.

pbi2.png

 

Edit: The is using anonymous authorization. 

 

1 ACCEPTED SOLUTION
DSArkphire
Frequent Visitor

I managed to resolve the issue with the following (note this may not be the same api url but the structure which corrected both remains the same.) 

 

pbi resolved.png

 

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

I have set a Parameter that provides the ability to make a Dynamic URL with the Following Code which would later be merged with a list-to-table Query:

let
Document=(Numero as number)as table =>
let
Source = Web.Contents(“http://www.sanaa.hn/colonias/dbo_fechas_agua_list.php?masterkey1=”&Number.ToText(Numero)&”&mastertab...]),

#”Extracted Table From Html” = Html.Table(Source, {{“Column1”, “TABLE[id=’form_grid_8′] > TR > :nth-child(1), TABLE[id=’form_grid_8′] > * > TR > :nth-child(1)”}, {“Column2”, “TABLE[id=’form_grid_8′] > TR > :nth-child(2), TABLE[id=’form_grid_8′] > * > TR > :nth-child(2)”}, {“Column3”, “TABLE[id=’form_grid_8′] > TR > :nth-child(3), TABLE[id=’form_grid_8′] > * > TR > :nth-child(3)”}, {“Column4”, “TABLE[id=’form_grid_8′] > TR > :nth-child(4), TABLE[id=’form_grid_8′] > * > TR > :nth-child(4)”}}, [RowSelector=”TABLE[id=’form_grid_8′] > TR, TABLE[id=’form_grid_8′] > * > TR”]),
#”Promoted Headers” = Table.PromoteHeaders(#”Extracted Table From Html”, [PromoteAllScalars=true]),
#”Changed Type” = Table.TransformColumnTypes(#”Promoted Headers”,{{“Id Colonia”, Int64.Type}, {“Barrio o Colonia”, type text}, {“Salida de Tanque”, type text}, {“Horario”, type text}})
in

#”Changed Type”
in Document

Static example of one of the URLS would be :”http://www.sanaa.hn/colonias/dbo_fechas_agua_list.php?masterkey1=1&mastertable=dbo.barriocolonia”

How would the Relative Path and Query solution be applied in this context to solve the Refresh Solution in the PBI Service?

DSArkphire
Frequent Visitor

I managed to resolve the issue with the following (note this may not be the same api url but the structure which corrected both remains the same.) 

 

pbi resolved.png

 

v-juanli-msft
Community Support
Community Support

Hi @DSArkphire 

Please check the following blog

Dynamic Web.Contents() and Power BI Refresh Errors

Hope it will work for you!

 

Best Regards
Maggie

 

Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

blopez11
Resident Rockstar
Resident Rockstar

Yes, the first parameter to web contents should be static.  You can use Web.Contents options relative path and query options.  Use query for passing parameters and relative path for extending the url passed as the first parameter.  I don't know the autentication method you are using, but if it is anonymous, your web service or service you are calling must support this for root level of the url

 

Good luck

Helpful resources

Announcements
Fabcon_Europe_Social_Bogo

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

Top Solution Authors
Top Kudoed Authors