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
user83
Helper II
Helper II

cumulative total

hello, 

 

I have to compare the total cumulative measures of two years; normal year starting  January and a year of work that starts in May, how to calculate them in this case

 

thank you for your answers and your help

 

Cheers 

1 ACCEPTED SOLUTION
v-yingjl
Community Support
Community Support

Hi @user83 ,

I have create a samle table like this to try to meet your requirement if I got it correctly:

date table.png

1. Create a calculate column to extract the year of date:

Year = YEAR('Table'[Date])

2. Create the following measures to calculate each year total which are divided into normal month and work month(>=5):

Normal Total of 2019 =
CALCULATE ( SUM ( 'Table'[total] ), FORMAT ( 'Table'[Year], "" ) = "2019" )
Normal Total of 2020 =
CALCULATE ( SUM ( 'Table'[total] ), FORMAT ( 'Table'[Year], "" ) = "2020" )
Work Total of 2019 =
CALCULATE (
    SUMX ( FILTER ( 'Table', 'Table'[Date].[MonthNo] >= 5 ), [total] ),
    FORMAT ( 'Table'[Year], "" ) = "2019"
)
Work Total of 2020 =
CALCULATE (
    SUMX ( FILTER ( 'Table', 'Table'[Date].[MonthNo] >= 5 ), [total] ),
    FORMAT ( 'Table'[Year], "" ) = "2020"
)

The final result is like this:

final result.png

Here is my samle file that hopes to help you, please try it: cumulative total.pbix 

 

Best Regards,
Yingjie Li

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

2 REPLIES 2
v-yingjl
Community Support
Community Support

Hi @user83 ,

I have create a samle table like this to try to meet your requirement if I got it correctly:

date table.png

1. Create a calculate column to extract the year of date:

Year = YEAR('Table'[Date])

2. Create the following measures to calculate each year total which are divided into normal month and work month(>=5):

Normal Total of 2019 =
CALCULATE ( SUM ( 'Table'[total] ), FORMAT ( 'Table'[Year], "" ) = "2019" )
Normal Total of 2020 =
CALCULATE ( SUM ( 'Table'[total] ), FORMAT ( 'Table'[Year], "" ) = "2020" )
Work Total of 2019 =
CALCULATE (
    SUMX ( FILTER ( 'Table', 'Table'[Date].[MonthNo] >= 5 ), [total] ),
    FORMAT ( 'Table'[Year], "" ) = "2019"
)
Work Total of 2020 =
CALCULATE (
    SUMX ( FILTER ( 'Table', 'Table'[Date].[MonthNo] >= 5 ), [total] ),
    FORMAT ( 'Table'[Year], "" ) = "2020"
)

The final result is like this:

final result.png

Here is my samle file that hopes to help you, please try it: cumulative total.pbix 

 

Best Regards,
Yingjie Li

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

amitchandak
Super User
Super User

The information you have provided is not making the problem clear to me. Can you please explain with an example.

Appreciate your Kudos.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.