Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi,
How can I get last Friday date and every hour in a Custom Column of Power Query please?
Today is 01/05/2024 so last Friday date was 26/04/2024.
I have a column with date and time with every hour where i much look at.
I now use Date.AddDays(DateTime.From(DateTime.LocalNow()),-Date.DayOfWeek(DateTime.From(DateTime.LocalNow()),5)))
But then it looks at last friday with actual time stamp.
Thanks
Solved! Go to Solution.
Not sure exactly what you want since you don't show an example of your desired results, and your explanation is not clear to me, but for last friday as a DateTime:
lastFriday = Date.StartOfWeek(DateTime.FixedLocalNow(),Day.Friday)
=> 4/26/2024 12:00:00 AM
And for all the hours of last friday:
lastFriday = Date.StartOfWeek(DateTime.FixedLocalNow(),Day.Friday),
AllHours = List.DateTimes(lastFriday,24,#duration(0,1,0,0))
...
Hi,
That is exactly what i need thank you 😊
Not sure exactly what you want since you don't show an example of your desired results, and your explanation is not clear to me, but for last friday as a DateTime:
lastFriday = Date.StartOfWeek(DateTime.FixedLocalNow(),Day.Friday)
=> 4/26/2024 12:00:00 AM
And for all the hours of last friday:
lastFriday = Date.StartOfWeek(DateTime.FixedLocalNow(),Day.Friday),
AllHours = List.DateTimes(lastFriday,24,#duration(0,1,0,0))
...
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 10 | |
| 9 | |
| 6 | |
| 5 | |
| 3 |