Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Keith3618
Frequent Visitor

Add First Day of Week to Date Table

Hello all!

For months, I have been using this awesome DAX generated date table created by Macro Russo [ @marcorusso ] and the team over at SQL BI. The only thing I think it lacks is a [Calendar StartOfWeek] column. Can anyone advise me how I would add a [Calendar StartOfWeek] column to this date table?

For example, the date 10/30/2019 needs to have a [Calendar StartOfWeek] value of 10/27/2019.

You can find the Date Table template here: https://www.sqlbi.com/tools/dax-date-template/

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@Keith3618 
Please try creating calculated column as per below code

Column = CALCULATE(MIN('Date'[Date]),ALLEXCEPT('Date','Date'[Calendar Week Year]))

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

@Keith3618 
Please try creating calculated column as per below code

Column = CALCULATE(MIN('Date'[Date]),ALLEXCEPT('Date','Date'[Calendar Week Year]))

Awesome! This works great. I appreciate your help!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors