DAX Function Guide
WEEKDAY
Sam McKay
CEO & Founder
How does the WEEKDAY work?
WEEKDAY Formula Syntax
WEEKDAY (
<date>, <return_type>
)
How do you use the WEEKDAY?
You can use the WEEKDAY function inside other formulas to check the day of week and react as needed. The WEEKDAY function supports several numbering schemes. The return type argument determines which scheme used to map each day of week to a number. The return type is optional and defaults to 1.
Related Blog Posts
Loading
Considerations when using the WEEKDAY?
- If we omit the return_type argument, it will take the default value of 1.
- Microsoft Excel stores dates as sequential serial numbers so they can be used in calculations. By default, January 1, 1900 is serial number 1, and January 1, 2009 is serial number 39448 because it is 39,813 days after January 1, 1900. Excel interprets text representations of dates differently, depending on the date settings on your computer. Therefore, the serial_number argument for the WEEKDAY function should be entered as either:
- A reference to a cell containing a date
- A date returned from another function or formula.
- The WEEKDAY function will return a value even when the date is empty. Take care to trap this result if blank dates are possible.
Related Video Tutorials
Loading
Formula examples using the WEEKDAY
=WEEKDAY([HireDate]+1)
=WEEKDAY(A2, 2)
=WEEKDAY(Date, [Numbers 1 (Sunday) through 7 (Saturday)])
Related Courses
Loading