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

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

Reply
prakash11440278
Post Prodigy
Post Prodigy

Week number reset for every month not working

Hi PBI Experts,

I am not able to get the week number reset for every month. My week will start on monday for every week. I tried the below dax expression it is giving fine for those months having 4 weeks in it, but if we have 5 weeks the first week number is showing as "W0". Please help.

Dax Expression:

Week of Month =
var currentweek=WEEKNUM([Date],2)
var startWeek=WEEKNUM(DATE([Year],[Month],1),2)
return
"W" & Currentweek-startWeek
 
prakash11440278_0-1687484121615.png

 

 

6 REPLIES 6
Ahmedx
Super User
Super User

pls try this

Screen Capture #1309.png

Hi @Ahmedx , Thanks for your reply.

My week always start on monday and end on sunday that week we can call as "W1". If apart from monday any dates will be consider for the previous month weeks. Below is the screen shot for your reference.

 

prakash11440278_0-1687756025574.png

 

 

Ritaf1983
Super User
Super User

Hi @prakash11440278 

Try to use :

WeekNum = ROUNDUP(DIVIDE(DAY('Calendar'[Date])-1, 7), 0)+1
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Hi @Ritaf1983 , Thanks for your reply.

I tried the expression. It is not giving the requred result. March month is starting with week number 2 & May month starting first day as 1 remaining 2 is coming. PFB screen shots. 

 

prakash11440278_0-1687486377966.png

prakash11440278_1-1687486438005.png

 

This is because first monday in march is 06/03.

Try to modify it for :

Week = WEEKNUM('Calendar'[Date],2)-WEEKNUM(EOMONTH('Calendar'[Date],-1)+1,2)+1
Seems it works:
Ritaf1983_0-1687487333546.png

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Hi @Ritaf1983 , Thanks a lot for your quick reply.

I tried the expression below are the results. Seems i am not getting correct data.

 

Considering the April 23 month. Week start on monday and end on sunday.

April 3rd to 9, should display as week 1

prakash11440278_1-1687488256038.png

 

 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.