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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
lawada
Helper III
Helper III

Create a measure to calculate (Period on Period) total orders

hello, 

 

im trying to create a masure that calculates for example number of orders in Week2 in this month and total orders in the same week number ( Week 2) in the previous month.

 

then i want to calculate Peiod on Period by this formula : (( Total orders in the selected week number- total orders in the same week number last month)/total orders in the same week number last month).

1 REPLY 1
amitchandak
Super User
Super User

@lawada , create a month week

Start Month = STARTOMONTH('Date'[Date])
Month Week = QUOTIENT(DATEDIFF(Minx(FILTER('Date',[Start Month]=EARLIER([Start Month])),'Date'[Start of Week]),[Date],DAY),7)+1

 

now you can measure like

 

MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD('Date'[Date]), filter(Date,date[Month Week] =2))
last MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-1,MONTH)),, filter(Date,date[Month Week] =2))

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

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.