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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
netanel
Post Prodigy
Post Prodigy

Please help whit measure

Hello everyone,
I try to calculate a daily average, a daily average last month, the percentage change from month to month, and the change in money from month to month. (Also for budget table)

One of the problems I have noticed is that if we choose the month of February then the formula that will display the previous month (January) will display the January calculation only until the 28th day and not until the 31st of January.

I would love any help!

Attached is PBIX file and DATA

 

https://1drv.ms/f/s!AonyYI-TdspHgUgReR5uqvnKLTCF








Did I answer your question?
Mark my post as a solution!
Appreciate your Kudos!

Connect on Linkedin
linkedin.com/in/netanel-shriki
1 ACCEPTED SOLUTION

I found the right formulas Thanks!
these are: 

Diff$ Budget V =
Var _MTDA = CALCULATE([MTD Sales],Sheet1[Data Surce]="A")
return
_MTDA-[MTD Sales for Budget 2021 V]
 
Net USD % difference Budget V =
Var _MTDA = CALCULATE([MTD Sales],Sheet1[Data Surce]="A")
return
(_MTDA-[MTD Sales for Budget 2021 V])/_MTDA
 
 
 







Did I answer your question?
Mark my post as a solution!
Appreciate your Kudos!

Connect on Linkedin
linkedin.com/in/netanel-shriki

View solution in original post

6 REPLIES 6
v-yalanwu-msft
Community Support
Community Support

Hi, @netanel ;

I haved open your pbix but I'm not sure what you want the output to be and the logic, maybe change the DATESMTD.Hope to share more details.

vyalanwumsft_0-1633937136640.png

Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@netanel , With help from till intelligence

 

Measure till date  - this month , Last month

MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD('Date'[Date]))
last MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-1,MONTH)))

 

full data

this month = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(ENDOFMONTH('Date'[Date])))

 

last MTD (complete) Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(ENDOFMONTH(dateadd('Date'[Date],-1,MONTH))))

 

previous month value = CALCULATE(sum('Table'[total hours value]),previousmonth('Date'[Date]))

 

Power BI — Month on Month with or Without Time Intelligence
https://medium.com/@amitchandak.1978/power-bi-mtd-questions-time-intelligence-3-5-64b0b4a4090e
https://www.youtube.com/watch?v=6LUBbvcxtKA

 

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

Thanks, @amitchandak 
But I'm guessing you did not enter my files and database.

I am looking for AVG DAILY and Last Month AVG average
2. I know how to do all the formulas great, the problem is that the numbers do not come out correctly, probably because of my database or another problem

Anyway thanks for the experience








Did I answer your question?
Mark my post as a solution!
Appreciate your Kudos!

Connect on Linkedin
linkedin.com/in/netanel-shriki

@netanel , Assume you have measure sales and you want Daily Avg for month and prior month

 

MTD Sales = CALCULATE(averagex(Values('Date'[Date]), [Sales]) ,DATESMTD('Date'[Date]) )

 

same way

last MTD Sales = CALCULATE(averagex(Values('Date'[Date]), [Sales]),DATESMTD(dateadd('Date'[Date],-1,MONTH)))

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

@amitchandak 

 

Please see in the attached picture,
I changed to your formulas and still the budget table is wrong (marked in yellow) by the way my formulas was also good before just did not work in the budget table
Can you also look at the PBIX file I shared and my database Please

 

Capture12.JPG








Did I answer your question?
Mark my post as a solution!
Appreciate your Kudos!

Connect on Linkedin
linkedin.com/in/netanel-shriki

I found the right formulas Thanks!
these are: 

Diff$ Budget V =
Var _MTDA = CALCULATE([MTD Sales],Sheet1[Data Surce]="A")
return
_MTDA-[MTD Sales for Budget 2021 V]
 
Net USD % difference Budget V =
Var _MTDA = CALCULATE([MTD Sales],Sheet1[Data Surce]="A")
return
(_MTDA-[MTD Sales for Budget 2021 V])/_MTDA
 
 
 







Did I answer your question?
Mark my post as a solution!
Appreciate your Kudos!

Connect on Linkedin
linkedin.com/in/netanel-shriki

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.