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
Anonymous
Not applicable

Week Numbers In Month

Hello,

 

How do I get 4x weeks numbered 1-4 for each month.

 

I currently have the measure below, but this is giving me 0-3 instead of 1-4 and some months even 0-5.

 

 

Week Number In Month = WEEKNUM ( data[Task Due By Date].[Date], 1 ) - WEEKNUM ( EOMONTH (data[Task Due By Date].[Date], -1 ) + 1 )

 

Bidds10_0-1700833671722.png

 

TIA.

3 REPLIES 3
Ahmedx
Super User
Super User

pls try this

Week of month = ROUNDUP( ( 'Calendar'[Date] - EOMONTH( 'Calendar'[Date], -1 ) ) / 7, 0 )
amitchandak
Super User
Super User

@Anonymous , Try like

 

Month Week =
var _monthweek = (eomonth([Date],-1)+1) -WEEKDAY((eomonth([Date],-1)+1),2)+1 //monday
var _week = [Date] -WEEKDAY([Date],2)+1 //monday
return
QUOTIENT(DATEDIFF(_monthweek,_week,DAY),7)+1

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
Anonymous
Not applicable

Thanks for the fast reply @amitchandak This is giving me 5 weeks now. I only want a maximum of 4 weeks per month. 

 

TIA

 

Bidds10_0-1700834372121.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.

Top Solution Authors