Power BI and DAX

css navigation by Css3Menu.com

Make a Week Number column

The first thing I need to do after importing data from our repository is to build WEEKNUM for each kind of date. Our business thrives on comparing one week to another and month-to-date numbers.
ClockWK =
qryWorkedHours[ClockDate].[Year] & "-W"
    & FORMAT ( WEEKNUM ( qryWorkedHours[ClockDate].[Date] ), "00" )

As we come to the end of the year, it was confusing with orders written last year, this year, and shipments into the new year to keep them separate without displaying the year. These show as: 2018-W43. The 00 formatting pads the number.

© 2018-2024

Updated:  04/17/2024 12:26
This page added:  20 November 2018