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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Anonymous
Not applicable

A sum of adjacent and previous value

A task very simple to do in Excel, but in Power BI I am strauggling. 
I have a table, which looks like this:
actual budgeted.jpg

The green are columns within the table: [Date] and [Budget].
Blue are measures: [Won] is a sum of values from a different table, [Difference] substracts [Budget] from [Won]
I need help with writing a measure [YTD], which will achieve what you can see in the picture: A cumulative sum of prevoius month's [YTD] and this moth's [Difference]. How can this be achieved?
EDIT:
Thanks to @Greg_Deckler help, I have almost got what I am after. Next step is, I don't want this measure to "reset" every year. I want it to continue and carry the december value over to next year.
powerbi.jpg


6 REPLIES 6
Greg_Deckler
Community Champion
Community Champion

@Anonymous - Try right clicking your Budget column in report view and then choose "New quick measure". Choose the "Year to date Total" under Time Intelligence.

 

You may find this helpful - https://community.powerbi.com/t5/Community-Blog/To-bleep-With-Time-Intelligence/ba-p/1260000

Also, see if my Time Intelligence the Hard Way provides a different way of accomplishing what you are going for.

https://community.powerbi.com/t5/Quick-Measures-Gallery/Time-Intelligence-quot-The-Hard-Way-quot-TITHW/m-p/434008



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Thanks @Greg_Deckler , but that's a cumulative sum of the budget. If I'm looking for a cumulative sum of [Difference], then I should just do the same with the [Difference] measure?
EDIT:
I did this and it kind of worked. Until This year January:

actual budgeted.jpg

amitchandak
Super User
Super User

@Anonymous , You have take MOM diff YTD till previous month diff

 

example

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

diff = [MTD Sales]-[last MTD Sales]
diff % = divide([MTD Sales]-[last MTD Sales],[last MTD Sales])

 

YTD this month vs last month diff should be same as MTD and last MTD 

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 your reply. Can you please explain what "MOM" means?

Month on 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
Anonymous
Not applicable

I've done what you sai, and this is what I get:

MTD diff = CALCULATE([Difference],DATESMTD('Sales Budget'[Date]))
Last MTD diff = CALCULATE([Difference],DATESMTD(dateadd('Sales Budget'[Date],-1,MONTH)))
diff = [MTD diff] - [Last MTD diff]
powerbi.jpg




Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.