Forum Discussion
Date Filter Not Working When Using Gateway Refresh
- Anonymous6 years ago
HI JoCurry_Aus ,
Today function will get different results when you use on the local and power bi server-side. AFAIK, current power bi service side only supports UTC format DateTime, it does not do any date timezone conversions.
In my opinion, I'd like to suggest you to use UTCNOW function and local timezone offset to instead today function.
Formula = VAR offset = 8 RETURN UTCNOW + TIME ( offset, 0, 0 ) - 1Regards,
Xiaoxin Sheng
HI JoCurry_Aus ,
Today function will get different results when you use on the local and power bi server-side. AFAIK, current power bi service side only supports UTC format DateTime, it does not do any date timezone conversions.
In my opinion, I'd like to suggest you to use UTCNOW function and local timezone offset to instead today function.
Formula =
VAR offset = 8
RETURN
UTCNOW + TIME ( offset, 0, 0 ) - 1
Regards,
Xiaoxin Sheng
- JoCurry_Aus6 years agoFrequent Visitor
Thanks for the feedback Anonymous - I will try this and mark as resolved if this works.
- JoCurry_Aus6 years agoFrequent Visitor
Can confirm that the change to the formula has solved my issue - I am very appreciative Anonymous ! I am now using scheduled refreshes for the first time! Very important for everyone who need to reference 'TODAY' in a formula to understand how many hours the offset is to their time zone if they are using the gateway to refresh their datasets.
My new formula looks like:
DayCompleted = if(Dates[Date]<(VAR offset = 11RETURNUTCNOW() + TIME ( offset, 0, 0 ) - 1),"Completed","Future")