Skip to main content
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.

Frequent Visitor

How to do scrapping with 2 functions that determine the interval period and the different quotes?



I have a Power BI Desktop with url data source from yahoo finance and one excel file for using a funciton. I am following a tuto how to do scrapping with data from Yahoo finance and I managed to create a table, but now I would like to add a function that let me to choose and change the interval period ("d", "wk","mo") of my data source from the yahoo fiannce url. The letter in Red and bold is the letter I need to change in the Url. I tried to creat another fuinction or create a double function but nothing worked...At the end I want to have a slicer that let me chosse the period (daily, weekly, monthly).

File (Soft Commodity Tab)

Power Bi File 

(SoftQuote as text) as table=>

Source = Csv.Document(Web.Contents(""&SoftQuote&"?period1=1658534400&period2=1690070400&interval=1d&events=history&includeAdjustedClose=true"),[Delimiter=",", Columns=7, Encoding=65001, QuoteStyle=QuoteStyle.None]),
#"En-têtes promus" = Table.PromoteHeaders(Source, [PromoteAllScalars=true]),
#"Valeur remplacée" = Table.ReplaceValue(#"En-têtes promus",".",",",Replacer.ReplaceText,{"Open", "High", "Low", "Close", "Adj Close", "Volume"}),
#"Type modifié" = Table.TransformColumnTypes(#"Valeur remplacée",{{"Open", type text}, {"High", type text}, {"Low", type text}, {"Close", type text}, {"Adj Close", type text}, {"Volume", Int64.Type}})
#"Type modifié"

 Many thanks ,



Super User
Super User

Please provide your work-in-progress Power BI Desktop file (with sensitive information removed) that covers your issue or question completely in a usable format (not as a screenshot).

Please show the expected outcome based on the sample data you provided.

This allows members of the Forum to assess the state of the model, report layer, relationships, and any DAX applied.

Frequent Visitor

Thank you food,


The thing is like I don't know how top share my work as I can't publish my work and your first link doesn't work. I put a one drive link instead.





Helpful resources

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


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
Top Kudoed Authors