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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Jcolvile
Frequent Visitor

Current time + current times around the world

I need to display the current time at 4 different locations as in the image below:

Capture.PNG

I can get this to work using a 'Now()' function for Brisane and then using the method of  'Now() - 1/24', however when I publish the report it changes the time. Does anyone know what time power BI works in, I thought it might be GMT but that doesnt line up.

 

Thanks in advance.

 

1 ACCEPTED SOLUTION
BhaveshPatel
Community Champion
Community Champion

Hi @Jcolvile

 

PowerBI works in local time.

 

For creating different times in your dasshboards,

 

You should create a 4 different Queries and use the below syntex to get GMT time

 

= DateTimeZone.ToLocal(DateTime.AddZone(DateTime.LocalNow(),-2))

 

Change the last part of the Query, depending upon what you want in each of these queries and you will get expected results.

 

 

 

For Chicago Time

= DateTimeZone.ToLocal(DateTime.AddZone(DateTime.LocalNow(),-8))

 

For New Zealand Time

= DateTimeZone.ToLocal(DateTime.AddZone(DateTime.LocalNow(),9))

For Brisbane Time

= DateTimeZone.ToLocal(DateTime.AddZone(DateTime.LocalNow(),11))

 

and so on...

 

Refresh the Queries to get the latest timeRefresh the Queries to get the latest time

 

Thanks & Regards,
Bhavesh

Love the Self Service BI.
Please use the 'Mark as answer' link to mark a post that answers your question. If you find a reply helpful, please remember to give Kudos.

View solution in original post

4 REPLIES 4
BhaveshPatel
Community Champion
Community Champion

Hi @Jcolvile

 

PowerBI works in local time.

 

For creating different times in your dasshboards,

 

You should create a 4 different Queries and use the below syntex to get GMT time

 

= DateTimeZone.ToLocal(DateTime.AddZone(DateTime.LocalNow(),-2))

 

Change the last part of the Query, depending upon what you want in each of these queries and you will get expected results.

 

 

 

For Chicago Time

= DateTimeZone.ToLocal(DateTime.AddZone(DateTime.LocalNow(),-8))

 

For New Zealand Time

= DateTimeZone.ToLocal(DateTime.AddZone(DateTime.LocalNow(),9))

For Brisbane Time

= DateTimeZone.ToLocal(DateTime.AddZone(DateTime.LocalNow(),11))

 

and so on...

 

Refresh the Queries to get the latest timeRefresh the Queries to get the latest time

 

Thanks & Regards,
Bhavesh

Love the Self Service BI.
Please use the 'Mark as answer' link to mark a post that answers your question. If you find a reply helpful, please remember to give Kudos.

Thanks @BhaveshPatel, however I am just trying to work out where you put these formuals. I was originally creating them in new coloumns however that syntax doesn't work there. Would I be able to trouble you to work out where you are entering these formulas in?

In the Query Editor, Blank Query

Go to the Advanced Editor, and Type in the code as shown in the screenshot ( Case Sensitive)

for each individual time, Right click the Query and create duplicate, Change the Syntex as per the time expected of other region.

See the attached Screenshot.

 

Advanced EditorAdvanced EditorNo. of Queries duplicated for each individual timeNo. of Queries duplicated for each individual time

Thanks & Regards,
Bhavesh

Love the Self Service BI.
Please use the 'Mark as answer' link to mark a post that answers your question. If you find a reply helpful, please remember to give Kudos.

@BhaveshPatel

Thank you so much for your assistance!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.