Forum Discussion
KG1
Resolver I
6 years agoCard to show Refresh Time when data is updated via Flow
Hi My data source is connected to excel files stored in a sharepoint folder. The reports are set up to refresh everytime the excel files are updated using Microsoft Flow (Power automate) ...
- 6 years ago
Hrm... oops. This is a culture issue.
Use this code:
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("VZDLCQAhDAV78Sxonv9axP7bWLNPMN4mDMYhc7oUBAFRmvNOJBTy8r8RnTpNJh8TdRo0iUzT94BIIeTzRBdAaBr5GF0A0FTyMZqGdNM2mwDkG7CZZuhQKEA2ZdWI+pQ1U9ae/7v5v9vTYNzTYNiyFG/Z5rU+", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [dtDSTStart = _t, dtDSTEnd = _t]), #"Changed Type" = Table.TransformColumnTypes(Source, {{"dtDSTStart", type date}, {"dtDSTEnd", type date}}, "en-US"), varCurrentDate = DateTime.Date(DateTimeZone.SwitchZone(DateTimeZone.LocalNow(),-8)), #"Filtered Rows" = Table.SelectRows(#"Changed Type", each [dtDSTStart] < varCurrentDate and [dtDSTEnd] > varCurrentDate), varDSTOffset = Table.RowCount(#"Filtered Rows"), #"Last Refresh Date" = #table( type table [ #"RefreshDate"=datetimezone ], { {DateTimeZone.SwitchZone(DateTimeZone.LocalNow(),-8 + varDSTOffset,0)} } ) in #"Last Refresh Date"Those are in the US Date format. Glad you caught that error for me.
Anonymous
6 years agoNot applicable
Hi KG1 ,
See if these help.
https://www.youtube.com/watch?v=oN6mOmEruOQ
https://docs.microsoft.com/en-us/azure/devops/report/powerbi/add-last-refresh-time?view=azure-devops
https://www.kasperonbi.com/show-the-refresh-datetime-in-a-power-bi-report-and-dashboard/
https://www.enhansoft.com/how-to-add-the-last-refreshed-date-and-time-to-a-power-bi-report/
Regards,
HN