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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

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
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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