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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. 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] )
    )
)

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
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.