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

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

Reply
Anonymous
Not applicable

Failure with R script data access in power BI

Create the following script that is below in R, where I can visualize the data of the table without problems, when trying to execute the same script in Power BI it does not show me data:

 

#Script in R

library (httr)

library (rvest)

 

url_params <- parse_url ("https://colombiacompra.gov.co/tienda-virtual-del-estado-colombiano/ordenes-compra?

page = 1 & number_order = & state = & entity = & tool = IAD% 20Software% 20I% 20-% 20Microsoft & date_to _ =% 20 & date_from_ = ")

 

pages <-
lapply (0:11, function (x) {
data frame (
html_table (
read_html (x = paste0 ("https://colombiacompra.gov.co/tienda-virtual-del-estado-colombiano/ordenes-compra? page =",
X,
"& number_order = & state = & entity = & tool = IAD% 20Software% 20I% 20-% 20Microsoft & date_to _ =% 20 & date_from_ ="))
)
)

})

do.call (rbind, pages)

 

the results of the R script are as follows:

 

Alejanchav93_0-1626846131430.png

 

 

When running it in Power BI through the R connector the result is the following:

 

Alejanchav93_1-1626846160414.png

 

 

Does anybody know how I can fix it?

1 REPLY 1
Anonymous
Not applicable

Hi @Anonymous 

I found some blogs about R script as data source in Power BI Desktop.

For reference:

R script as data source in Power BI Desktop

Run R scripts in Power BI Desktop

This may be the same issue like yours, I hope it can help you.

R Script returning empty table

 

Best Regards,

Rico Zhou

 

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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.