WEEKDAY Function (DAX)

How does the WEEKDAY function (DAX) work?

The WEEKDAY function (DAX) returns a number from 1 to 7 identifying the day of the week of a date. By default the day ranges from 1 (Sunday) to 7 (Saturday).

WEEKDAY Formula Syntax

     <date>, <return_type>

How do you use the WEEKDAY function?

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

Related Support Forum Posts

Compare Weekday and Weekend Results versus previous years – Actual and YTD numbers – Power BI
Handling Weekday vs Weekend Dates in Power BI using DAX
Find Weekday & Weekend Day Numbers Within Months – Advanced DAX

Considerations when using the WEEKDAY function

  1. If we omit the return_type argument, it will take the default value of 1.
  2. 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:
    1. A reference to a cell containing a date
    2. A date returned from another function or formula.
  3. 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

Formula examples using the WEEKDAY function



=WEEKDAY(Date, [Numbers 1 (Sunday) through 7 (Saturday)])

Related DAX Functions


Related Course Modules




Download our comprehensive DAX Formula Reference Guide as perfect companion as you learn how to use DAX formulas within Power BI.

Download DAX Formulas Reference Guide
Download DAX Formula Reference Guide