Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Hello
I have relative date filters on some of my visuals. However, when I set it to filter for 'today' it shows yesterdays date until 11am in AEDT when the date changes in UTC timezone.
I have created a calculated column to try and fix that:
LocalDate = [Date]+#duration(0,13,00,0)
however that did not work, any ideas?
Solved! Go to Solution.
Hi @SusuYes ,
According to the official document:
Refer to:
Handling Different Time Zones in Power BI / Power Query
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
There is no way by default to change this currently, however you can work around it by creating a flag that determines wehther it is in the range or not.
In my case I needed the report to only show the past 7 days, but using a relative date time filter didnt work as the server's current date is 10 or 11 hours behind NSW AEDT time. SO rather than using the relative date filter, I created a calculated column on my table where if the date was in the range... then return a 1 otherwise return a 0.
Step 1: Create a measure for the offset from UTC in hours so we know how much to offset UTC (the time of power bi service by):
NSWDaylightSavingsOffset(UTC+) =
VAR currentYear_ =
YEAR ( TODAY())
VAR FirstSundayOct_ =
SWITCH(TRUE,
WEEKDAY(DATE(currentYear_, 10, 1), 2) = 7, DATE(currentYear_, 10, 1),
WEEKDAY(DATE(currentYear_, 10, 2), 2) = 7, DATE(currentYear_, 10, 2),
WEEKDAY(DATE(currentYear_, 10, 3), 2) = 7, DATE(currentYear_, 10, 3),
WEEKDAY(DATE(currentYear_, 10, 4), 2) = 7, DATE(currentYear_, 10, 4),
WEEKDAY(DATE(currentYear_, 10, 5), 2) = 7, DATE(currentYear_, 10, 5),
WEEKDAY(DATE(currentYear_, 10, 6), 2) = 7, DATE(currentYear_, 10, 6),
WEEKDAY(DATE(currentYear_, 10, 7), 2) = 7, DATE(currentYear_, 10, 7),
BLANK()
)
VAR FirstSundayApr_ =
SWITCH(TRUE,
WEEKDAY(DATE(currentYear_, 4, 1), 2) = 7, DATE(currentYear_, 4, 1),
WEEKDAY(DATE(currentYear_, 4, 2), 2) = 7, DATE(currentYear_, 4, 2),
WEEKDAY(DATE(currentYear_, 4, 3), 2) = 7, DATE(currentYear_, 4, 3),
WEEKDAY(DATE(currentYear_, 4, 4), 2) = 7, DATE(currentYear_, 4, 4),
WEEKDAY(DATE(currentYear_, 4, 5), 2) = 7, DATE(currentYear_, 4, 5),
WEEKDAY(DATE(currentYear_, 4, 6), 2) = 7, DATE(currentYear_, 4, 6),
WEEKDAY(DATE(currentYear_, 4, 7), 2) = 7, DATE(currentYear_, 4, 7),
BLANK()
)
RETURN
IF (
TODAY() >= FirstSundayApr_
&& TODAY() < FirstSundayOct_,
10,
11
)
Step 2: Using the offset go back 7 days from the current AEST time
FilterCutOffDateTime =
VAR SydneyTime = UTCNOW() + TIME([NSWDaylightSavingsOffset(UTC+)], 0, 0)
VAR SydneyTime7daysback = SydneyTime -7
RETURN SydneyTime7daysback
Step 3: you can then use this measure in a calculated column where your date field is being stored, and filter the report based on that:
InDateRangeFlag = IF('Your Table'[DateTime] > [FilterCutOffDateTime], 1, 0)
Hope that helps
Thanks for this..
I am also in AET timezone
Does this mean it is a rolling 7 days prior to Today's date?
Do you know a way of pulling back fixed dates for last week, i.e. if current local date is 27/06/2024...
I want to show all of last week 17/06/2024 - 23/06/2024 from 00:00 24/06/2024 to 23:59 30/06/2024 (will refresh multiple times a day every day during this period)
When the report refreshes on or after 00:00 01/07/2024 and on or before 07/07/2024 23:59, the data displayed should be for dates 24/06/2024 - 30/06/2024
This and other UTC issues take up 10% of my entire mental capacity. Infuriating.
Nothing better than having to convert everything over and it looks like in the desktop version, only for it to change once it hits the server 😄
Crazy to me that this hasn't been addressed natively in PBI
@macmy034 having the exact same issue. Trying to do a "today revenue" card visual using the relative date...but we are in US central time and at 6pm....it switches to show $0 because it thinks "my today" is actual UTC tomorrow...
So frustrating that microsoft has not come up with an easy solution for this after all of these years
Post refers to relative date slicers on the entire report. If you live in a country with a + timezone you have to wait that many hours until the relative date switches.
PowerBi reports still use utc as their reference point for relative date slicers.
2022 and this is still doing the same thing... Solution is to use a date offset within your calendar table - however this will not allow you to use "Relative date" slicing.
Hi @SusuYes ,
According to the official document:
Refer to:
Handling Different Time Zones in Power BI / Power Query
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I don't see how the solution was accepted as it does not solve the problem of the relative filter slicer not being flexible to use a specific time zone as the reference point. I want to tell the slicer to use Eastern Standard Time as the reference point, take UTC convert it to EST and then base all the relative filters on that date/time. This is a real issue as I am building a real time report and want to always show the last hour, what is happening is that no data is showing because the last hour is 4 hours in the future...
These did not work as when I do Today(), I get the correct time and date already but when I use the relative date filters, the date does not change until 11am AEDT which is 00:00 UTC.
Check this as well:
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: www.linkedin.com/in/vahid-dm/
G'day,
Please check this link:
https://radacad.com/relative-date-slicer-for-your-local-time-zone-in-power-bi
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: www.linkedin.com/in/vahid-dm/
I no longer see the Radacad relative slicer in the app source in power bi, is this not available anymore?
This is still an ongoing issue;
I am in the timezone + 10 (Brisbane, Australia) and we do not get to use "Relative date filters / slicers" until 10 Am in the morning since PowerBi uses UTC as its reference point for Date Slicers.
1 . In the example below you can see that it is the 13-10-2022, all my date and time is set correctly on my machine to Brisbane Australia and PowerBi is set to follow the local setup.
2. Today is set to be included, the 13th
3. The date ends at yesterday, because its not "Today" in UTC Dates yet.
4. When asking for a list of all available dates - PowerBi again omits the 13th.
The issue arrises when new data comes in, the reports refresh at 6:00 am, but if the report is using relative date filters - wont show up until after 10am.
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
93 | |
85 | |
84 | |
73 | |
49 |
User | Count |
---|---|
142 | |
135 | |
110 | |
68 | |
55 |