Downloads
DAXDate and timeIntermediate

WEEKNUM

Returns the week number of the year for a date.

Syntax
WEEKNUM(<date>, <return_type>). Return type 1 (the default) starts weeks on Sunday and makes the week that contains January 1 week 1. Return type 2 starts weeks on Monday.

Returns: A whole number, usually from 1 to 53.

What it does

WEEKNUM returns the number of the week in the year. Finance teams use it for weekly cash reports, weekly sales flashes and any process that runs on a weekly cycle. The result depends on the return type, which sets the first day of the week and which week counts as week 1. Type 2, with weeks starting on Monday, is the usual choice for a weekly report that runs Monday to Sunday.

Syntax and arguments

Example

A weekly cash report groups receipts and payments by week. Each Calendar row gets a week label such as 2026-W44, which sorts in time order.

Week Label =
YEAR('Calendar'[Date]) & "-W" & FORMAT(WEEKNUM('Calendar'[Date], 2), "00")

A date of October 29, 2026 falls in the week that starts on Monday, October 26. The label reads 2026-W44 when the week number is 44. FORMAT pads the number to two digits so the labels sort correctly.

Example: a second, different use

A weekly count of invoices, with the week number shown beside each row of a matrix, for a trend chart.

Invoices This Week =
CALCULATE(
    COUNTROWS('Invoices'),
    WEEKNUM('Calendar'[Date], 2) = WEEKNUM(MAX('Calendar'[Date]), 2)
)

Things to watch

In business terms

WEEKNUM supports weekly cash forecasting, weekly collections reviews, weekly sales flashes and weekly payroll or time reports. Teams that run a weekly close need the week labels to match their own calendar, or totals will not agree with the source system.

Related functions

All DAX functions · View as Markdown · DAX fundamentals