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
VinLee1314
New Member

Cumulative monthly count

Hi all,

 

Couldn't get my "Cumulative Mthly Leavers" column to work. Would appreciate your guidance, please.

 

VinLee1314_0-1663485461264.png

 

Leavers =
CALCULATE(
    [Count of Employees],
    USERELATIONSHIP('Calendar'[Date], 'HR Dataset'[Term date])
    ) + 0
 
Cumulative Mthly Leavers =
CALCULATE
(
    [Leavers],
    FILTER
    (
        ALLSELECTED ( 'Calendar'[Month] ),
        'Calendar'[Month] <= MAX ( 'Calendar'[Month] )
    )
)

 

Thanks!

Vin

1 ACCEPTED SOLUTION

Hi @VinLee1314 

you have to YearMonth number column in your date table. The try the following 

Cumulative Mthly Leavers =
CALCULATE (
[Leavers],
'Calendar'[YearMonth] <= MAX ( 'Calendar'[YearMonth] ),
ALLSELECTED ( 'Calendar' )
)

View solution in original post

4 REPLIES 4
VinLee1314
New Member

VinLee1314_0-1663495764054.png

I managed to get it working on a monthly basis. I would like the running total to continue after the year ends. How do I make changes to the DAX?

 

Cumulative Leavers =
CALCULATE
(
    [Leavers],
    FILTER
    (
        CALCULATETABLE
        (
            SUMMARIZE('Calendar', 'Calendar'[Date].[MonthNo], 'Calendar'[Date].[Month]),
            ALLSELECTED('Calendar')
        ),
        ISONORAFTER
        (
            'Calendar'[Date].[MonthNo], MAX('Calendar'[Date].[MonthNo]), DESC,
            'Calendar'[Date].[Month], MAX('Calendar'[Date].[Month]), DESC
        )
    )
)
 
Thanks!

Hi @VinLee1314 

you have to YearMonth number column in your date table. The try the following 

Cumulative Mthly Leavers =
CALCULATE (
[Leavers],
'Calendar'[YearMonth] <= MAX ( 'Calendar'[YearMonth] ),
ALLSELECTED ( 'Calendar' )
)

Hi @tamerj1 ,@daXtreme ,

 

Thank you for your help!

daXtreme
Solution Sage
Solution Sage

// # Leavers TD = count of leavers to date
[# Leavers TD] = 
var LastVisibleDate = MAX( 'Calendar'[Date] )
var Output = 
    CALCULATE(
        [# Leavers],
        'Calendar'[Date] <= LastVisibleDate,
        ALLSELECTED ( 'Calendar' )
    )
return
    Output

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

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!

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.