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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
According to the documentation the default for the argument firstDayOfWeek should be Day.Sunday!
October 31st, 2010 was a Sunday but Date.DayOfWeek(#date(2010,10,31)) returns 6.
Has this argument somehow been localized? Here in Germany the week starts on Monday, thus 6 would correctly represent a Sunday for Day.Monday.
Date.DayOfWeek(dateTime as any, optional firstDayOfWeek as nullable number) as nullable number
dateTime: A date, datetime, or datetimezone value from which the day of the week is determined.
firstDayOfWeek: A Day type representing the first day of the week for this calculation.
Solved! Go to Solution.
The documentation is incorrect.
It is the first day of the week according to your regional settings in Windows.
You may consider always specifying the first day of the week instead of relying on the default.
= Date.DayOfWeek(#date(2018, 10, 23)) = Day.Monday
TRUE
And I thought it is tuesday already ![]()
The documentation is incorrect.
It is the first day of the week according to your regional settings in Windows.
You may consider always specifying the first day of the week instead of relying on the default.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 37 | |
| 37 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 130 | |
| 88 | |
| 82 | |
| 68 | |
| 64 |