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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount 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
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.