Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreThe FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now
Hi Team ,
I am using below code on exchnage rate , but some how data is not refreshed in Power Bi service on shedule refreshment. but when i do refrresh in Power bi desktop , than it's refresh in desktop.
Is their any way in power bi service patlform my can refresh on shedule refreshment ?
See below code.
Code 1 :
let
Source = (Date as text) => let
Source = Json.Document(Web.Contents("https://api.exchangeratesapi.io" ,[RelativePath = "/" & Date & "?base=GBP"])),
rates = Source[rates],
#"Converted to Table" = Record.ToTable(rates),
#"Renamed Columns" = Table.RenameColumns(#"Converted to Table",{{"Name", "Currency"}, {"Value", "Rate"}})
in
#"Renamed Columns"
in
Source
Code 2 :
let
Source = {Number.From(Date.AddDays(DateTime.Date(DateTime.LocalNow()),-Duration.Days(Date.From(DateTime.LocalNow())-#date(2015,1,1))))..Number.From(DateTime.Date(DateTime.LocalNow()))},
#"Converted to Table" = Table.FromList(Source, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
#"Changed Type2" = Table.TransformColumnTypes(#"Converted to Table",{{"Column1", type date}}),
#"Changed Type" = Table.TransformColumnTypes(#"Changed Type2",{{"Column1", type date}}),
#"Renamed Columns" = Table.RenameColumns(#"Changed Type",{{"Column1", "Date"}}),
#"Invoked Custom Function" = Table.AddColumn(#"Renamed Columns", "ExchangeRates", each Fn_GetHistoricExchangeRates (Date.ToText([Date],"yyyy-MM-dd"))),
#"Expanded ExchangeRates" = Table.ExpandTableColumn(#"Invoked Custom Function", "ExchangeRates", {"Currency", "Rate"}, {"Currency", "Rate"}),
#"Changed Type1" = Table.TransformColumnTypes(#"Expanded ExchangeRates",{{"Rate", type number}, {"Currency", type text}}),
#"Filtered Rows" = Table.SelectRows(#"Changed Type1", each ([Currency] = "EUR")),
#"Renamed Columns1" = Table.RenameColumns(#"Filtered Rows",{{"Currency", "GBP->EUR"}, {"Rate", "GBP/EUR"}})
in
#"Renamed Columns1"
Regards,
Piyush Hirpara
When a scheduled refresh fails you should see an error message in the dataset refresh history. What does it say?
Hi ,
error is not coming , just data is not coming correclty
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 3 | |
| 2 | |
| 2 |
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 6 | |
| 6 | |
| 5 |