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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Super User
Super User

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.