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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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] )
    )
)

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.


Click here to visit my LinkedIn page

Click here to schedule 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] )
    )
)

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.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.
Jihwan_Kim
Super User
Super User

Hi,

The link is not accessible.

Please check.

Thanks.


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.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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