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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
databot_kd
Helper II
Helper II

Rolling Total Over Months in a Matrix table

Hi Community, 

I am trying to create a DAX measure to calculate the rolling/running total over  month in a matrix table. 

See screenshot below

databot_kd_0-1696410900043.png


@Ahmedx 
@ced_f 


Thanks in advance.

1 ACCEPTED SOLUTION
sergej_og
Super User
Super User

Hey @databot_kd ,
if you want to calculate running total within a year you can use TOTALYTD formula.
Like:

Total YTD = TOTALYTD([your Amount Measure],'Calendar'[Date])

 
Regards

View solution in original post

4 REPLIES 4
sergej_og
Super User
Super User

Hey @databot_kd ,
if you want to calculate running total within a year you can use TOTALYTD formula.
Like:

Total YTD = TOTALYTD([your Amount Measure],'Calendar'[Date])

 
Regards

mh2587
Super User
Super User

Running Total by Month = 
VAR CurrentMonth = MAX('YourTable'[Date])
RETURN
    CALCULATE(
        SUM('YourTable'[Value]),
        FILTER(
            ALL('YourTable'),
            'YourTable'[Date] <= CurrentMonth
        )
    )
//Try this one might help you

Did I answer your question? If so, please mark my post as a solution!


Proud to be a Super User!




LinkedIn Icon
Muhammad Hasnain



Hi @mh2587 ,

Unfortunately, i seem to still have some issues. 

this is dax i used:

Running Total =
VAR CurrentMonth = MAX('Transactions'[trans_date])
RETURN
    CALCULATE(
        SUM('Transactions'[amount]),
        FILTER(
            ALL('Transactions'),
            'Transactions'[trans_date] <= CurrentMonth
        )
    )

Please note i have a slicer for the FY from the calendar table and also my months in the matrix are coming from the calendar table 

The two tables are linked by the date 1 - *

databot_kd_0-1696420551277.png

 

Hi @databot_kd ,

If you already have a calendar table in your model, what you are trying to achieve is a common year to date except if your running total is over all years.

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.