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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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 )
TIA.
pls try this
Week of month = ROUNDUP( ( 'Calendar'[Date] - EOMONTH( 'Calendar'[Date], -1 ) ) / 7, 0 )
@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
Thanks for the fast reply @amitchandak This is giving me 5 weeks now. I only want a maximum of 4 weeks per month.
TIA
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 144 | |
| 123 | |
| 103 | |
| 79 | |
| 54 |