WEEKDAY DAX Function (Date and Time)

Returns a number identifying the day of the week of a date. The number is in a range 1-7 or 0-6 according to the choice of the ReturnType parameter.

Syntax

WEEKDAY ( <Date> [, <ReturnType>] )
Parameter Attributes Description
Date

A date in datetime format.

ReturnType Optional

A number that determines the return value:

ReturnType Return value
1 or omitted Numbers 1 (Sunday) through 7 (Saturday).
2 Numbers 1 (Monday) through 7 (Sunday).
3 Numbers 0 (Monday) through 6 (Sunday).
11 Numbers 1 (Monday) through 7 (Sunday).
12 Numbers 1 (Tuesday) through 7 (Monday).
13 Numbers 1 (Wednesday) through 7 (Tuesday).
14 Numbers 1 (Thursday) through 7 (Wednesday).
15 Numbers 1 (Friday) through 7 (Thursday).
16 Numbers 1 (Saturday) through 7 (Friday).
17

Numbers 1 (Sunday) through 7 (Saturday).

Return values

Scalar A single integer value.

An integer number in a range 1-7 or 0-6 according to the choice of the ReturnType parameter.

Remarks

If the argument is a string, it is translated into a datetime value using the same rules applied by the DATEVALUE function.

Related articles

Learn more about WEEKDAY in the following articles:

Related functions

Other related functions are:

Last update: Nov 20, 2020   » Contribute   » Show contributors

Contributors: Alberto Ferrari, Marco Russo

MSDN documentation: https://docs.microsoft.com/en-us/dax/weekday-function-dax

Cyber Monday
2018-2020 © SQLBI. All rights are reserved. Information coming from MSDN is property of Microsoft Corp. » Contact us   » Privacy Policy & Cookies

Context Transition

This function performs a Context Transition if called in a Row Context. Click to read more.

Row Context

This expression is executed in a Row Context. Click to read more.

Iterator

Not recommended

The use of this function is not recommended. See Remarks and Related functions for alternatives.

Not recommended

The use of this parameter is not recommended.

Deprecated

This function is deprecated. Jump to the Alternatives section to see the function to use.

Deprecated

This parameter is deprecated and its use is not recommended.

DirectQuery compatibility

Limitations are placed on DAX expressions allowed in measures and calculated columns.
The state below shows the DirectQuery compatibility of the DAX function.

Contribute

Want to improve the content of WEEKDAY? Did you find any issue?
Please, report it us! All submissions will be evaluated for possible updates of the content.


This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.