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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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