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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
Kopec
Helper I
Helper I

PowerQuery - dynamic URL link with 2 date parametrs

Hi,

I need to help with this:

I have 1 URL to exchange currency rate, with START and END parameter as date.

I can´t find out how to write it correctly. 

Kopec_0-1653635847229.png

Example do you have here. 

Thank you,

Jan

 

1 ACCEPTED SOLUTION
Vijay_A_Verma
Most Valuable Professional
Most Valuable Professional

Use this. You might get Privacy acceptance notice which you can accept if you are not sending sensitive data outside. 

let
    Zdroj = Csv.Document(Web.Contents("https://www.cnb.cz/cs/financni-trhy/devizovy-trh/kurzy-devizoveho-trhu/kurzy-devizoveho-trhu/vybrane.txt?od="&Start_Date&"&do="&End_Date&"&mena=USD&format=txt"),[Delimiter="|", Columns=2, Encoding=65001, QuoteStyle=QuoteStyle.None]),
    Start_Date=Date.ToText(Variable_Start_Date,"dd.MM.yyyy"),
    End_Date=Date.ToText(Variable_End_Date,"dd.MM.yyyy"),
    #"Změněný typ" = Table.TransformColumnTypes(Zdroj,{{"Column1", type text}, {"Column2", type text}}),
    #"Odebrané horní řádky" = Table.Skip(#"Změněný typ",1),
    #"Záhlaví se zvýšenou úrovní" = Table.PromoteHeaders(#"Odebrané horní řádky", [PromoteAllScalars=true]),
    #"Změněný typ1" = Table.TransformColumnTypes(#"Záhlaví se zvýšenou úrovní",{{"Datum", type date}, {"Kurz", type number}}),
    #"Přejmenované sloupce" = Table.RenameColumns(#"Změněný typ1",{{"Kurz", "USD"}, {"Datum", "Date"}})
in
    #"Přejmenované sloupce"

 

View solution in original post

2 REPLIES 2
Vijay_A_Verma
Most Valuable Professional
Most Valuable Professional

Use this. You might get Privacy acceptance notice which you can accept if you are not sending sensitive data outside. 

let
    Zdroj = Csv.Document(Web.Contents("https://www.cnb.cz/cs/financni-trhy/devizovy-trh/kurzy-devizoveho-trhu/kurzy-devizoveho-trhu/vybrane.txt?od="&Start_Date&"&do="&End_Date&"&mena=USD&format=txt"),[Delimiter="|", Columns=2, Encoding=65001, QuoteStyle=QuoteStyle.None]),
    Start_Date=Date.ToText(Variable_Start_Date,"dd.MM.yyyy"),
    End_Date=Date.ToText(Variable_End_Date,"dd.MM.yyyy"),
    #"Změněný typ" = Table.TransformColumnTypes(Zdroj,{{"Column1", type text}, {"Column2", type text}}),
    #"Odebrané horní řádky" = Table.Skip(#"Změněný typ",1),
    #"Záhlaví se zvýšenou úrovní" = Table.PromoteHeaders(#"Odebrané horní řádky", [PromoteAllScalars=true]),
    #"Změněný typ1" = Table.TransformColumnTypes(#"Záhlaví se zvýšenou úrovní",{{"Datum", type date}, {"Kurz", type number}}),
    #"Přejmenované sloupce" = Table.RenameColumns(#"Změněný typ1",{{"Kurz", "USD"}, {"Datum", "Date"}})
in
    #"Přejmenované sloupce"

 

Thank you, 

its work great!

Honza

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 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.