Fabric DW currently supports the EOMONTH() function, which returns the last day of a given month. However, it does not provide a built-in function that can return the last day of a week, quarter, or year in addition to the month.
Calculating the last day of a week, quarter, or year requires custom expressions using combinations of DATEADD, DATEDIFF, and calendar logic. This adds complexity and reduces readability in time-based reporting and analytics.
The LAST_DAY() function is supported in several other databases Snowflake, MySQL, Oracle, and makes calculating the last dat in interval much easier:
LAST_DAY('2025-08-18', 'MONTH') -- → 2025-08-31
LAST_DAY('2025-08-18', 'QUARTER') -- → 2025-09-30
LAST_DAY('2025-08-18', 'YEAR') -- → 2025-12-31
LAST_DAY('2025-08-18', 'WEEK') -- → 2025-08-23
The equivalent expressions in Fabric DW are:
SELECT EOMONTH(DATEADD(QUARTER, DATEDIFF(QUARTER, 0, '2025-08-18'), 0)) AS LastDayOfQuarter;
SELECT EOMONTH(DATEFROMPARTS(YEAR('2025-08-18'), 12, 1)) AS LastDayOfYear;
SELECT DATEADD(DAY, 7 - DATEPART(WEEKDAY, '2025-08-18'), '2025-08-18') AS LastDayOfWeek;
3 Comments
- DrsqlNew MemberNice function idea. Do first_day as well. And it must honor a first day of the week setting as well. If you could set custom ranges it becomes worth its weight in gold, but the date table needs a job still I guess.
- Shahid12523Community ChampionIn Fabric DW, EOMONTH() works only for month-end. For other intervals, you need custom expressions: Week: DATEADD(DAY, 7 - DATEPART(WEEKDAY, date), date) Quarter: EOMONTH(DATEADD(QUARTER, DATEDIFF(QUARTER, 0, date), 0)) Year: EOMONTH(DATEFROMPARTS(YEAR(date), 12, 1))
- TwinkleCyrilMicrosoft EmployeeThanks for the feedback. We have added this feature to our backlog.
Recent ideas
Support Cross-Tenant (B2B/MTO Member) Authentication for Fabric Data Warehouse in Power BI Desktop
Microsoft Fabric Data Warehouse SQL Endpoints currently do not support cross-tenant authentication scenarios when accessed from Power BI Desktop. While B2B/Multi-Tenant Organization (MTO) member u...v-nandagm1 hour agoMicrosoft EmployeeNew3Views0likes0CommentsPower BI Report Builder - Difficult to Use and Ugly.
So I've definitely been spoiled in the modern age. So many apps that are integrated well with top-notch UI, and intuitive processes. Power BI Report Builder is surprisingly lacking in this. While I a...rs_rae10 hours agoAdvocate INew14Views0likes0CommentsIndividual L/R column borders for Matrix
Add Power BI feature for applying left and/or right borders to individual matrix columns, with customizable border thickness and color. This would let users visually group related measures, highlight...AaronReasoner14 hours agoNew MemberNew5Views0likes0CommentsSupport Git-Integrated Files in Fabric Workspaces
Overview Allow users to store and manage arbitrary files such as .md, .sql, .py, and .yml directly in a Fabric workspace, with built-in Git integration. Value This would keep documentation, SQL sc...ryomaru082518 hours agoAdvocate INew44Views4likes1Comment