Forum Discussion
Automatic refresh not appearing on Last refresh card
- 1 year ago
Hi 4jhill ,
Thank you for your question, and great points raised by Tutu_in_YYC and tharunkumarRTK .
It's true that ensuring the query is included in the dataset refresh and refreshing the browser after a scheduled refresh are important steps to check.
In addition to that, I’d like to share a solution that ensures the 'Last Refresh' card reflects the automatic refresh.
>Modify the query as below
let
CurrentUTCDateTime = DateTimeZone.UtcNow(),
CurrentLocalDateTime = DateTimeZone.SwitchZone(CurrentUTCDateTime, 2),
LocalDateTime = DateTimeZone.RemoveZone(CurrentLocalDateTime) // Remove the time zone metadata for consistency
in
LocalDateTime
Now again publish the report to the service and configure the schedule refresh.
This time it should work and display the correct date/time in the card.
Hope this helps. Please accept as solution so that other users can benefit from it. Kudos would be appreciated.
Best Regards.
How did you create the last refresh card? DAX? or Power Query? what is the code?
Try this query and use this for last refresh:
let
Source = DateTime.FixedLocalNow(),
#"Converted to Table" = #table(1, {{Source}})
in
#"Converted to Table"
You may have to adjust timezone
The last refresh query is definetly included in the refresh, I tried refreshing the browser and the code you supplied above but didn't work. Thanks for your answer - much appreciated