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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
AVGUser_PBI
Helper I
Helper I

Running sum formula that does NOT reset at every year but starts with some constant amount.

I am working on to get running sum for cost that doesn't reset on year. I got one formula working but, for some reason it doesn't start with correct number as shown below:

 

AVGUser_PBI_0-1702420487570.png

there are no cost before 2017 but running sum line starts from 2014 with some constant cost. please help me figure out what I am doing wrong?

DAX:

Project_cost_cum_year = CALCULATE([project_cost_total],
                 FILTER(ALLEXCEPT(effective_date, effective_date[Date]),
                 ISONORAFTER(effective_date[Date].[Year], MAX(effective_date[Date].[Year]),DESC)
                 )
                 )
 
thanks,
 
1 ACCEPTED SOLUTION

yes, AllSELECTED formula works! Also, I made a booboo with date format. (facepalm)

 

thank you.

View solution in original post

3 REPLIES 3
AVGUser_PBI
Helper I
Helper I

on the side note:

 

If change the formula as shown below, then the chart starts with correct year and amount, however, it doesn't do the running sum.

AVGUser_PBI_0-1702421849235.png

 

Just curious, can you try and see if this works ... 

CALCULATE([project_cost_total],
     FILTER(ALLSELECTED(effective_date), 
          effective_date[Date] <= MAX(effective_date[Date])
                 )
)

 

Or

 

CALCULATE([project_cost_total],
     FILTER(ALL(effective_date), 
          effective_date[Date] <= MAX(effective_date[Date])
                 )
)

yes, AllSELECTED formula works! Also, I made a booboo with date format. (facepalm)

 

thank you.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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