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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
HALEYSTODDARD
Frequent Visitor

SOS HELP ASAP! Comparison of Week of Month (Prior Month) to Week of Month (current month)

I desperately need help with figure out this measure. 

 

I need to average my hours worked by week, and do a week to week comparison, except it needs to be the week of the prior month compared to week of current month. 

 

For example, we are currently in March week 3. I need to be able to compare to February week 3.

 

Is there any way to accomplish this?

1 REPLY 1
amitchandak
Super User
Super User

@HALEYSTODDARD , Get Month week column

Start Month = eomonth([Date],-1)+0
Start of Week = [Date] -WEEKDAY([Date],2)+1 //monday
Month Start week = [Start Month] -WEEKDAY([Start Month ],2)+1 //monday
Month Week = QUOTIENT(DATEDIFF([Month Start week],[Date],DAY),7)+1

 

Month Rank = RANKX(all('Date'),'Date'[Month],,ASC,Dense)

 

This week month week =sum('Table'[Qty] )

 

or

 

This Month Week = CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Month Rank]=max('Date'[Month Rank]) && 'Date'[Month Week]=max('Date'[Month Week]) ))
Last Month Week = CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Month Rank]=max('Date'[Month Rank])-1

 && 'Date'[Month Week]=max('Date'[Month Week]) ))

 

Time Intelligence, Part of learn Power BI https://youtu.be/cN8AO3_vmlY?t=27510
Time Intelligence, DATESMTD, DATESQTD, DATESYTD, Week On Week, Week Till Date, Custom Period on Period,
Custom Period till date: https://youtu.be/aU2aKbnHuWs&t=145s

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

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

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.