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
Anonymous
Not applicable

CUMULATIVE SUM

Hi everyone !

 

I already made some research but what I found did not help me.

luciebaize_0-1719220028776.png

 

I want to have the cumulative sum for each month in a third column for actual year and in 4th column for last year.

The two first columns are built like this :

VolLastYear = CALCULATE(
Sum('COMPANY$Commision Entries'[Volume]),
FILTER('COMPANY$Commision Entries','COMPANY$Commision Entries'[Année]=[YearActual]-1)
)
 
VolActualYear = CALCULATE(
Sum('COMPANY$Commision Entries'[Volume]),
FILTER('COMPANY$Commision Entries','COMPANY$Commision Entries'[Année]=[YearActual])
)
My posting date is in the table COMPANY$Commision Entries in a date format.
 
I tried to use a quick measure proposed by Power BI, it works well for actual year  :
Cumul AY =
IF(
    ISFILTERED('CINOCO$Commision Entries'[Posting Date]),
    ERROR("Les mesures rapides de Time Intelligence peuvent être regroupées ou filtrées seulement par la hiérarchie de dates ou les colonnes de dates principales fournies par Power BI."),
    TOTALYTD([VolActualYear], 'CINOCO$Commision Entries'[Posting Date].[Date])
)
 
but does not for last year (it stays blank), so I'm looking for something new.
I tried the multiple solutions proposed online but it seems that it is not for me.
 
 
Thank you for your help luciebaize_1-1719220028281.png

 

 
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

 

To calculate the cumulative total for the year try MEASURE.

Cumul AY = 
CALCULATE(
    Sum('COMPANY$Commision Entries'[Volume]),
    FILTER(
        ALL('COMPANY$Commision Entries'),
        'COMPANY$Commision Entries'[Posting Date].[Date] <= MAX('COMPANY$Commision Entries'[Posting Date].[Date])
        && YEAR('COMPANY$Commision Entries'[Posting Date].[Date]) = YEAR(MAX('COMPANY$Commision Entries'[Posting Date].[Date]))
    )
)


To calculate last year's cumulative total try MEASURE.

Cumul LY = 
CALCULATE(
    Sum('COMPANY$Commision Entries'[Volume]),
    FILTER(
        ALL('COMPANY$Commision Entries'),
        'COMPANY$Commision Entries'[Posting Date].[Date] <= MAX('COMPANY$Commision Entries'[Posting Date].[Date])
        && YEAR('COMPANY$Commision Entries'[Posting Date].[Date]) = YEAR(MAX('COMPANY$Commision Entries'[Posting Date].[Date])) - 1
    )
)

 

If these expressions do not give you the results you expect. Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data. We can better understand the problem and help you.

 

Best Regards,

Clara Gong

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @Anonymous ,

 

To calculate the cumulative total for the year try MEASURE.

Cumul AY = 
CALCULATE(
    Sum('COMPANY$Commision Entries'[Volume]),
    FILTER(
        ALL('COMPANY$Commision Entries'),
        'COMPANY$Commision Entries'[Posting Date].[Date] <= MAX('COMPANY$Commision Entries'[Posting Date].[Date])
        && YEAR('COMPANY$Commision Entries'[Posting Date].[Date]) = YEAR(MAX('COMPANY$Commision Entries'[Posting Date].[Date]))
    )
)


To calculate last year's cumulative total try MEASURE.

Cumul LY = 
CALCULATE(
    Sum('COMPANY$Commision Entries'[Volume]),
    FILTER(
        ALL('COMPANY$Commision Entries'),
        'COMPANY$Commision Entries'[Posting Date].[Date] <= MAX('COMPANY$Commision Entries'[Posting Date].[Date])
        && YEAR('COMPANY$Commision Entries'[Posting Date].[Date]) = YEAR(MAX('COMPANY$Commision Entries'[Posting Date].[Date])) - 1
    )
)

 

If these expressions do not give you the results you expect. Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data. We can better understand the problem and help you.

 

Best Regards,

Clara Gong

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.