DAY DAX Function (Date and Time)
Returns a number from 1 to 31 representing the day of the month.
Syntax
Parameter | Attributes | Description |
---|---|---|
Date |
A date in datetime format. |
Return values
An integer number indicating the day of the month.
Remarks
If the argument is a string, it is translated into a datetime value using the same rules applied by the DATEVALUE function.
» 3 related functions
Examples
-- Extract date parts from a date EVALUATE ADDCOLUMNS ( TOPN ( 10, VALUES ( 'Date'[Date] ), 'Date'[Date], ASC ), "Year", YEAR ( 'Date'[Date] ), "Quarter", QUARTER ( 'Date'[Date] ), "Month", MONTH ( 'Date'[Date] ), "Day", DAY ( 'Date'[Date] ) ) ORDER BY 'Date'[Date]
Date | Year | Quarter | Month | Day |
---|---|---|---|---|
2005-01-01 | 2,005 | 1 | 1 | 1 |
2005-01-02 | 2,005 | 1 | 1 | 2 |
2005-01-03 | 2,005 | 1 | 1 | 3 |
2005-01-04 | 2,005 | 1 | 1 | 4 |
2005-01-05 | 2,005 | 1 | 1 | 5 |
2005-01-06 | 2,005 | 1 | 1 | 6 |
2005-01-07 | 2,005 | 1 | 1 | 7 |
2005-01-08 | 2,005 | 1 | 1 | 8 |
2005-01-09 | 2,005 | 1 | 1 | 9 |
2005-01-10 | 2,005 | 1 | 1 | 10 |
Related articles
Learn more about DAY in the following articles:
-
Using weekly calendars in Power BI
This article describes why week-based calendars (like 4-4-5) are important for specific industries and how to use them effectively in Power BI. » Read more
Related functions
Other related functions are:
Last update: Nov 14, 2024 » Contribute » Show contributors
Contributors: Alberto Ferrari, Marco Russo
Microsoft documentation: https://docs.microsoft.com/en-us/dax/day-function-dax