Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Last Date Refresh Card

I have created a last date fresh table using this formula = Table.RenameColumns(#"Converted to Table",{{"Column1", "Last Refresh Time"}}). I've put this time into a card visual which displays the loc...
  • edhans's avatar
    3 years ago

    You have to make sure the timezone of the date itself is set to EST. Once it runs in the service everything is based on UTC. I have a blog here that will walk you through the entire logic of it, but the bottom line is you ned to use the DateTimeZone* functions. The formula below will capture the current time no matter where you are, and switch it to eastern.

     

     

    DateTimeZone.SwitchZone(DateTimeZone.LocalNow(),-5,0)

     

     If you already have timestamp, you should probably convert it to a timezone with the DateTimeZone.From - PowerQuery M | Microsoft Learn function. then ensure it is set to Eastern.

    Keep the field as a DateTimeZone field and it will come into the DAX Datamodel correctly.

    Note the article I linked to will also help you adjust for DST as ET is -5 or -6 depending on the time of the year.