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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote 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] )
    )
)

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

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

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

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 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.