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.
So I got this calculated column " Source = DateTimeZone.UtcNow()+#duration(0, 2, 0, 0)" Now if it refreshes it displays it as for example17:14:49. I set the formatting in powerbi itself. BUT I want if the time it refreshes is 17:14:49 it to only display 17:00:00. so only full hours. My refresh time is set at every hour starting at 9:00:00 so displayed should be 9:00:00 10:00:00 etc. I don't know how to add this filtering or fotmatting to my formula.
Btw the reason i add 2 hours is cause in powerbi service it uses UTC as refresh time so im cancelling timezone difference.
Thx in advance.
Solved! Go to Solution.
Hi @Anonymous
Sure try this.
let DateTimeNow = DateTimeZone.UtcNow() + #duration(0, 2, 0, 0), TimePlus2 = #time( Time.Hour( DateTimeNow ), 0, 0 ), DateTimePlus2 = DateTime.Date( DateTimeNow ) & TimePlus2 in DateTimePlus2
hi @Mariusz
This solution gives me " 31/12/1899 09:00:00" so somewhere the date doesn't get passed. To make clear i want the date AND the time in full hours not only the correct time. Sorry if this wasn't made clear before.
Hi @Anonymous
Sure try this.
let DateTimeNow = DateTimeZone.UtcNow() + #duration(0, 2, 0, 0), TimePlus2 = #time( Time.Hour( DateTimeNow ), 0, 0 ), DateTimePlus2 = DateTime.Date( DateTimeNow ) & TimePlus2 in DateTimePlus2
Hi @Mariusz
In this solution is the 2 hours still added? I don't see the duration added.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
100 | |
76 | |
74 | |
49 |
User | Count |
---|---|
146 | |
108 | |
106 | |
90 | |
62 |