Salim on 09 Jun 2017 13:11:24
It seems neither DAX nor Power Query don't have a function to obtain the time zone for the current user who is using the Power BI Service. The scenario is I make dashboards that are used in different time zones. I am using functions like TODAY and NOW to obtain current time/date but they are useless in different time zones because Microsoft support told me Power BI service only uses its own time zone i.e. UTC. One could say a solution could be I use two different dashboards for different time zones but we have managers who travel between these time zones and their dashboard becomes wrong then. I think it is necessary that either DAX or Power Query have a function to obtain user’s time zone.
- Comments (4)
RE: Obtaining time zone for Power BI service's user
USERCULTURE() returns almost what Power Bi report developers need here. Except this does not have the info of timezone or the user timezone offset from UTC.To get the current time zone offset in JavaScript, you can use the getTimezoneOffset() method of the Date object. This method returns the time zone offset in minutes from UTC for the current locale. But as Power Bi can not access resources on the local computer, I would suggest Microsoft to implement something like a USERUTCTIMEOFFSET()function in the same way it can show the USERCULTURE that then can be used in DAX to determine time difference.This can be very useful when reports are used around the world - that works interactive with live data - and displayed to user according to local time. (Otherwise any time stamps in data is useless to include.)
RE: Obtaining time zone for Power BI service's user
I think this would be a great addition. At least start by having the timezone selected in the PowerQuery/Table View, etc., correctly represented when Published in the Workspace.
RE: Obtaining time zone for Power BI service's user
I have the same problema:
I need to show in a Powe BI report the last refresh date/time of the data.
I keep the date of recharged in a table with a single row and a single column.
But this is the UTC time.
Now I return the one from Spain, but I would like to be able to return the local time of every user.
I think that Power BI should have a function to get the time zone of the current user who is using the Power BI service.
RE: Obtaining time zone for Power BI service's user
I think it has to be with DAX, in order for one report/dashboard to show dates/times to many users, in their respective local time zones. Which would be great!