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

RunningSum per month in dax

Hi All,

 

again I need your help. I have a visual (line- & barchart) with numbers per week, and a budget per month. The only problem is that I also need a runningsum per month and I don't seem to get it working.

Sander1401_0-1640965065457.png

 

Does anyone have an idea?

Thanks you!

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Sander1401 ,

 

Try this

RunningSum Sales per month =
CALCULATE (
    SUM ( 'Table'[Weekly sales] ),
    FILTER (
        ALLSELECTED ( 'Table' ),
        [Monthly budget] = MAX ( 'Table'[Monthly budget] )
            && [week] <= MAX ( 'Table'[week] )
    )
)

vstephenmsft_0-1641280075117.png

 

Best Regards,

Stephen Tao

 

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

3 REPLIES 3
Anonymous
Not applicable

Hi @Sander1401 ,

 

Try this

RunningSum Sales per month =
CALCULATE (
    SUM ( 'Table'[Weekly sales] ),
    FILTER (
        ALLSELECTED ( 'Table' ),
        [Monthly budget] = MAX ( 'Table'[Monthly budget] )
            && [week] <= MAX ( 'Table'[week] )
    )
)

vstephenmsft_0-1641280075117.png

 

Best Regards,

Stephen Tao

 

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

Ashish_Mathur
Super User
Super User

Hi,

In your Data, do you have a Date column or do you have a Month and Year column from where a Date can be generated?  If yes, then in the Calendar table, also have a Week number column. 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
speedramps
Community Champion
Community Champion

How do you want to handle months which end mid week?

For example 1 Sep 2021 fell on a Wednesday.

If you organisation has specific rules then you need to create calendar with the month and week for each date, the use that to calculate your totals.

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.