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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
e17aguilar
Frequent Visitor

Dax - Week number - first full week rather than 1st January

Hello!

I've used CALENDARAUTO() in a new table and I've obtained a date column. Now, I'd like to calculate a new column with DAX to obtain the week number ( 1 - 54 ), but with the following conditions:
1) The first day of each week should be Saturday.
2) The first week of the year should be the first full week rather than the week which contains 1st January.

I've read similar posts and tried to apply and modify the DAX code to acheive that, but I haven't succeed.

Thanks in advance for your help. I really appreciate it.

Ernesto

1 ACCEPTED SOLUTION
e17aguilar
Frequent Visitor

 

I used the formulas exposed in these two posts:

 

Week number - first full week rather than 1st January?

Week commencing in DAX


The formula for this new column is:


Week_number = 1 + INT(DIVIDE((Calendar[Date].[Date] - WEEKDAY(Calendar[Date].[Date],16)+1) - (DATE(year(Calendar[Date].[Date]),1,1)),7))

View solution in original post

1 REPLY 1
e17aguilar
Frequent Visitor

 

I used the formulas exposed in these two posts:

 

Week number - first full week rather than 1st January?

Week commencing in DAX


The formula for this new column is:


Week_number = 1 + INT(DIVIDE((Calendar[Date].[Date] - WEEKDAY(Calendar[Date].[Date],16)+1) - (DATE(year(Calendar[Date].[Date]),1,1)),7))

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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