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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
ENGFAKAYODE
Helper I
Helper I

Calculate Running Total by Profit of each month restarting every year

Hello Everyone,
I've this table I want to create a running total, In the sample data the months are repeating but I want just the 12 months in a year,I tried using some dax calculations 

but it didnt work,I also want to calculate the running total by profit restarting every year.
Sample data:https://drive.google.com/file/d/1vRL7p4xT3PAmWhZRhVKdsaZjvaluYzDF/view?usp=sharing
1st f.jpg
Outcome wished
2nd f.jpg
Thanks in Advance.

2 ACCEPTED SOLUTIONS
Anonymous
Not applicable

Hi @ENGFAKAYODE ,

You can create a measure as below if there is one date field or month number filed in your table.

Running Total =
VAR _selyear =
    SELECTEDVALUE ( 'Table'[Year] )
VAR _selmnum =
    SELECTEDVALUE ( 'Table'[Month Number] )
RETURN
    CALCULATE (
        SUM ( 'Table'[Profit] ),
        FILTER (
            'Table',
            'Table'[Year] = _selyear
                && 'Table'[Month Number] <= _selmnum
        )
    )

In addition, you can refer the following links to get the running total....

Running Total in Power BI

yingyinr_0-1661247187610.png

Running Total in Power BI

yingyinr_1-1661247254470.png

If the above ones can't help you, could you please grant us the proper access to your shared file? Thank you.

Best Regards

View solution in original post

Hi,

Thank you for your message, and please check the below measure and the attached pbix file whether  it suits your requirement.

 

Yearly running total measure: = 
CALCULATE (
    SUM ( Orders[Profit] ),
    FILTER (
        ALL ( Orders ),
        Orders[Order Date] <= MAX ( Orders[Order Date] )
            && Orders[Year] = MAX ( Orders[Year] )
    )
)

 

    Microsoft MVP
 

 

   


      If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


   


     
        LinkedInVisit my LinkedIn page
     

   


   


     
        Outlook BookingSchedule a short Teams meeting to discuss your question

     

   


 


View solution in original post

7 REPLIES 7
Anonymous
Not applicable

Hi @ENGFAKAYODE ,

You can create a measure as below if there is one date field or month number filed in your table.

Running Total =
VAR _selyear =
    SELECTEDVALUE ( 'Table'[Year] )
VAR _selmnum =
    SELECTEDVALUE ( 'Table'[Month Number] )
RETURN
    CALCULATE (
        SUM ( 'Table'[Profit] ),
        FILTER (
            'Table',
            'Table'[Year] = _selyear
                && 'Table'[Month Number] <= _selmnum
        )
    )

In addition, you can refer the following links to get the running total....

Running Total in Power BI

yingyinr_0-1661247187610.png

Running Total in Power BI

yingyinr_1-1661247254470.png

If the above ones can't help you, could you please grant us the proper access to your shared file? Thank you.

Best Regards

Hi,

Thank you for your message, and please check the below measure and the attached pbix file whether  it suits your requirement.

 

Yearly running total measure: = 
CALCULATE (
    SUM ( Orders[Profit] ),
    FILTER (
        ALL ( Orders ),
        Orders[Order Date] <= MAX ( Orders[Order Date] )
            && Orders[Year] = MAX ( Orders[Year] )
    )
)

 

    Microsoft MVP
 

 

   


      If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


   


     
        LinkedInVisit my LinkedIn page
     

   


   


     
        Outlook BookingSchedule a short Teams meeting to discuss your question

     

   


 


Jihwan_Kim
Super User
Super User

Hi,

The link is not accessible.

Please check.

Thanks.


 

    Microsoft MVP
 

 

   


      If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


   


     
        LinkedInVisit my LinkedIn page
     

   


   


     
        Outlook BookingSchedule a short Teams meeting to discuss your question

     

   


 


Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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