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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
Anonymous
Not applicable

How to increase data selection from website by date

Does anyone know how to increase the date selection when pulling data from a website? I am trying to pull bond yield data from the following link to power query. But the default is set to a 1 month time range. Is there a way to change this? How do I adjust this selection to 1 year, 3 years, or 10 years? 

 

The M code below is where I believe the answer to my question is. I just don't know how to edit it so that it changes the date selection.

 

let
Source = Web.Page(Web.Contents("https://www.investing.com/rates-bonds/chile-10-year-bond-yield-historical-data")),
Data0 = Source{0}[Data],
#"Changed Type" = Table.TransformColumnTypes(Data0,{{"Date", type date}, {"Price", type number}, {"Open", type number}, {"High", type number}, {"Low", type number}, {"Change %", Percentage.Type}})
in
#"Changed Type"

 

Thank you for any help on this!

2 REPLIES 2
v-danhe-msft
Microsoft Employee
Microsoft Employee

Hi @Anonymous,

Based on my test, you could refer to below code in advanced editor:

(para as text) as table =>
let
Source = Web.Page(Web.Contents("https://www.investing.com/rates-bonds/chile-"&para&"-year-bond-yield-historical-data")),
Data0 = Source{0}[Data],
#"Changed Type" = Table.TransformColumnTypes(Data0,{{"Date", type date}, {"Price", type number}, {"Open", type number}, {"High", type number}, {"Low", type number}, {"Change %", Percentage.Type}})
in
#"Changed Type"

And click the “Done”, you are able to enter the parameter to change different source:

1.PNG

After enter the “10” number:

2.PNG

You could also download the pbix file to have a view.

 

Regards,

Daniel He

 

 

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

It's very interesting and it works but I think that the original author refers to change the values of the date box inside because the number "10" is part of the name and doesn't change. This is the place I'm talking about:

vicentetic_0-1699545466414.png

In this box you can change the date and extend the period. For example, can you do it for a period from 1/1/2020 - today ?

 

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.