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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Pricey79
Helper V
Helper V

Calendar table showing incorrect start of week

Hello you lovely people, I was hoping someone could help me please

I have a calendar table that shows week number (WeekNum) and start of week (SoWDate) , which I use in a visual. The issue I have is that for the 26 September its showing as week 39, where it should be week 38.

So its showing the visual like this, with week 39 as the 20 Sep, not the 27th as it should be:

 

Pricey79_1-1632901180933.png

 

Could anyone help please?

I hope I have given enough information. Thank you

Pricey79_0-1632900966841.png

 

1 ACCEPTED SOLUTION
v-angzheng-msft
Community Support
Community Support

Hi, @Pricey79 


Do you mean you want to count the week every seven days instead of the calendar week starting from January 1st of each year?

Try to create a column with this:

week = 
var _r=RANKX(FILTER('Table','Table'[Year]=EARLIER('Table'[Year])),[Date],,ASC,Dense)
var _w=CEILING(_r,7)
return DIVIDE(_w,7)

result:

vangzhengmsft_0-1633077782275.png

Please refer to the attachment below for details. Hope this helps.

 

 

Best Regards,
Community Support Team _ Zeon Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
v-angzheng-msft
Community Support
Community Support

Hi, @Pricey79 


Do you mean you want to count the week every seven days instead of the calendar week starting from January 1st of each year?

Try to create a column with this:

week = 
var _r=RANKX(FILTER('Table','Table'[Year]=EARLIER('Table'[Year])),[Date],,ASC,Dense)
var _w=CEILING(_r,7)
return DIVIDE(_w,7)

result:

vangzhengmsft_0-1633077782275.png

Please refer to the attachment below for details. Hope this helps.

 

 

Best Regards,
Community Support Team _ Zeon Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-angzheng-msft 

Thank you very much

amitchandak
Super User
Super User

@Pricey79 ,

Try to create week number like

 

Week = weeknum([Date],2)

 

and check if that works fine

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

@amitchandak 

Thank you so much sir. That fixed the issue, although it states this week ( Week commencing 27 Sep 21) is week 40, whereas I beleve its week 39 of the calander? Is there a way to fix that please? 

Thank you for your time

@amitchandak 

I think its because its counting a few days as the end of december as week 1? Would you happen to know how I could fix that please?

Pricey79_0-1632908808637.png

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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