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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
JJL_Ptbo
Frequent Visitor

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 local time (EST) on the desktop version. But the card visual on the service platform returns a time 5 hours ahead. It wasn't doing this before, but it's doing it now. 

 

Help on how to get the card to display with EST on Power BI service. 

 

Thank you. 

 

 

JJL_Ptbo_2-1670981424498.pngJJL_Ptbo_3-1670981447434.pngJJL_Ptbo_4-1670981480761.png

 

 

1 ACCEPTED SOLUTION
edhans
Super User
Super User

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.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

View solution in original post

3 REPLIES 3
JJL_Ptbo
Frequent Visitor

This worked great! I adjusted for EST. If I have data from SQL server and the data refreshes automatically will this visual also refresh? If the SQL server refresh fails the visual will still update which means the visual and data refresh may differ correct?

No, when a dataset refresh fails, the entire refresh is reverted back to previous, so you won't have tables in different states.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting
edhans
Super User
Super User

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.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

Check out the February 2024 Power BI update to learn about new features.

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors
Top Kudoed Authors