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

How make cumul sum multiannual_With the dax formul "DATESYTD", the result return to zero every year

Sorry for my english, i'm french..

So I will know How can i make a cumulative sum multiannual.

With the dax formul "DATESYTD", the result return to zero every year, but i will have a cumulative result multiannual..

 

Thanks for Help.

 

1 ACCEPTED SOLUTION
technolog
Super User
Super User

Hi

You mustn't use DATESYTD
 
Sales Full =
VAR MaxDate = MAX ( 'Date'[Date] ) 
RETURN
    CALCULATE (
        [Sales Amount],           -- Computes sales amount
        'Date'[Date] <= MaxDate,  -- Where date is before the last visible date
        ALL ( Date )              -- Removes any other filters from Date
    )

View solution in original post

4 REPLIES 4
technolog
Super User
Super User

Hi

You mustn't use DATESYTD
 
Sales Full =
VAR MaxDate = MAX ( 'Date'[Date] ) 
RETURN
    CALCULATE (
        [Sales Amount],           -- Computes sales amount
        'Date'[Date] <= MaxDate,  -- Where date is before the last visible date
        ALL ( Date )              -- Removes any other filters from Date
    )

Thanks for your solution and helping. 😉

I think the only thing missing from your solution is the reset to zero every year

As I understand he don't want it

technolog_0-1660637405809.png

 

Because in this case it will be very simple

Sales YTD :=
CALCULATE (
    [Sales Amount],
    DATESYTD( 'Date'[Date] )
)

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!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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.