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 measures count

Hi,

 

I'm trying to get my "cumulative Leavers" column working but to no avail. "Cumulative Leavers" simply calculate a running total of the "Leavers" column. Please help!

 

VinLee1314_0-1663383835112.png

My measures are as follows:

New Hire =
    CALCULATE(
        [Count of Employees],
        USERELATIONSHIP('Calendar'[Date], 'HR Dataset'[Hire date])
    )
 
Cumulative New Hire =
CALCULATE(
    [New Hire],
    FILTER(
        ALL('HR Dataset'),
        'HR Dataset'[Hire date] <= MAX('Calendar'[Date])
    )
)
 
Leavers =
CALCULATE(
    [Count of Employees],
    USERELATIONSHIP('Calendar'[Date], 'HR Dataset'[Term date])
    ) + 0
 
Cumulative Leavers =
CALCULATE(
    [Leavers],
    USERELATIONSHIP('Calendar'[Date], 'HR Dataset'[Term date]),
    FILTER(
        ALL('HR Dataset'),
        'HR Dataset'[Term date] <=  MAX('Calendar'[Date])        
        )
)
 
My model is as follows:
VinLee1314_1-1663384031255.png

 

I suspect it's relationship-related but counldn't pin point where the issue is. Your help will be much appreciated!

 

Vin

 

 

 

1 ACCEPTED SOLUTION
tamerj1
Super User
Super User

Hi @VinLee1314 

Please try 

Cumulative Leavers =
SUMX (
FILTER (
ALLSELECTED ( 'Calendar'[Year] ),
'Calendar'[Year] <= MAX ( 'Calendar'[Year] )
),
[Leavers]
)

View solution in original post

2 REPLIES 2
tamerj1
Super User
Super User

Hi @VinLee1314 

Please try 

Cumulative Leavers =
SUMX (
FILTER (
ALLSELECTED ( 'Calendar'[Year] ),
'Calendar'[Year] <= MAX ( 'Calendar'[Year] )
),
[Leavers]
)

Hi @tamerj1,

 

Excellent! Thanks for your help!

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.