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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.