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
Gdibbs
Helper I
Helper I

How to cummulate a data column month by month, but starting with a specifc month,

Dear Community.  

 

I am trying to cumulate a quantity column based on months.  I am able to get the qty's to cumulate from 1 to 12 (Jan-to-Dec).

 

What I want to do is have the cumulation start with month 10 (Oct) and run to 9 (Sep).  I have another column I created that ties the month to order.  I set the order but it still is not working.  

 

Here is how I calculated the total:  

Total Quantity = CALCULATE(sum('Innoculants Transactions'[Correct Quantity]))
 
Here is how I calculated the cumulative values:
Cumulative Quantity = CALCULATE([Total Quantity],
           FILTER(ALLSELECTED('Innoculants Transactions'[Month]),
                'Innoculants Transactions'[Month] <= max('Innoculants Transactions'[Month])))
 
Can provide more details if needed, but really stuck on how to start the cumulation beginning on a specific month.
 
2 REPLIES 2
gmsamborn
Super User
Super User

Hi @Gdibbs 

 

DATESYTD has a second argument for year-end.  (This is making the assumption that you are using a date table.)

 

Cumulative Quantity =
CALCULATE(
    [Total Quantity],
    DATESYTD( 'Date'[Date], "09/30" )
)

 

 



Proud to be a Super User!

daxformatter.com makes life EASIER!

Thank you very much.  I will be trying this over the weekend with a dates table.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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