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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Kim_NC
New Member

Running Total - Stop at a specific date

Hello. New to Power BI.  I did a quick measure to create the running total for the "actual" data and it's show all months.  How do I update the DAX below to stop at September but then update it to October and continue as real data is added?  Thank you!

 

Screenshot 2025-11-03_Running Total.jpg

Sum of Sub System Amount running total in Fiscal Month =
CALCULATE(
    SUM('Combined'[Sub System Amount]),
    FILTER(
        CALCULATETABLE(
            SUMMARIZE(
                'Fiscal Period Description',
                'Fiscal Period Description'[Period],
                'Fiscal Period Description'[Fiscal Month]
            ),
            ALLSELECTED('Fiscal Period Description')
        ),
        ISONORAFTER(
            'Fiscal Period Description'[Period], MAX('Fiscal Period Description'[Period]), DESC,
            'Fiscal Period Description'[Fiscal Month], MAX('Fiscal Period Description'[Fiscal Month]), DESC
        )
    )
)
1 REPLY 1
vivien57
Impactful Individual
Impactful Individual

Hello @Kim_NC ,

Please note that your months are not sorted, so I'm not sure that the totals you want will be calculated correctly.

But otherwise, you can try this. It assumes that you have a column that indicates whether the data is real or not ('Combined'[IsActual] = TRUE())

Sum of Sub System Amount running total in Fiscal Month =
VAR MaxActualMonth =
    CALCULATE(
        MAX('Fiscal Period Description'[Fiscal Month]),
        FILTER('Combined', 'Combined'[IsActual] = TRUE())
    )
RETURN
CALCULATE(
    SUM('Combined'[Sub System Amount]),
    FILTER(
        CALCULATETABLE(
            SUMMARIZE(
                'Fiscal Period Description',
                'Fiscal Period Description'[Period],
                'Fiscal Period Description'[Fiscal Month]
            ),
            ALLSELECTED('Fiscal Period Description')
        ),
        'Fiscal Period Description'[Fiscal Month] <= MaxActualMonth &&
        ISONORAFTER(
            'Fiscal Period Description'[Period], MAX('Fiscal Period Description'[Period]), DESC,
            'Fiscal Period Description'[Fiscal Month], MAX('Fiscal Period Description'[Fiscal Month]), DESC
        )
    )
)
  • MaxActualMonth retrieves the last month for which actual data exists.
  • The Fiscal Month <= MaxActualMonth filter prevents the cumulative total from exceeding this month.
  • The rest of the code retains your cumulative total logic.

Please feel free to give a kudo and mark this as the answer if it helped you.

have a nice day,

Vivien

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 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.

Top Solution Authors