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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Pmorg73
Post Patron
Post Patron

Cumulative Summ issue

Hi everyone

 

I have a cumulative sum issue that I can not fathom.

 

See the image of my page, I have pasted the equations in to a text box so that they can be seen. I created a cumulative sum for my 2019 invoice values and on the right you can see the table and it works sweet as a nut.

 

I then copied that and created a 2018 version so I can do a line chart comparision by month for invoicing. And it does not work. The two sets of equations used look exactly the same to me.

Just a note the year filter eqtn was my way of forcing a financial year April to March. Works for 2019 so seems legit.

 

I added a base Invoice total sum in tot h 2018 table and that is working correctly. Any suggestions?

 

(I have seen the "sameperiodlastyear" command, but have not tried it here yet, but will do next time)

 

cumulative issue.JPG

3 REPLIES 3
amitchandak
Super User
Super User

try

 

Cummalative ytd = TOTALYTD(sum(Sales[Sales Amount]),filter(all(Sales[Sales Date]),Sales[Sales Date]<=maxx('Date',('Date'[Date Filer]))),"3/31")
	Cummalative lytd = TOTALYTD(sum(Sales[Sales Amount]),filter(all(Sales[Sales Date]),Sales[Sales Date]<=maxx('Date',DATEADD('Date'[Date Filer],-1,YEAR))),"3/31")
	

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks.

My Recent Blog - https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601

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

This does not work......

 

Does it need a slicer to select the year?

cumulative issue 2.JPG

The measure you have suggested are with the titles as you wrote them. They do not accumulate the totals?

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

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.