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
vengadesh_p
Helper I
Helper I

How to Calculate Active Employees based on Rolling Status

Hi All,

I have data like below Table

Screenshot_13.png

 

I want to calculate no of Employee who are "in" Status

Expected OutPut 
A & B was "IN Status" from Mar/2021 and "Out Status from Jun/2021
So for Apr/2021 & May/2021 count is 2 because they already in "IN Status"

Screenshot_14.png

Data

EmployeeMonth Start DateStatus
A1-Jan-2021IN
A1-Feb-2021OUT
A1-Mar-2021IN
A1-Jun-2021OUT
A1-Aug-2021IN
B1-Mar-2021IN
B1-Jun-2021OUT
B1-Aug-2021IN
B1-Sep-2021OUT
B1-Oct-2021IN

 

Thanks,

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@vengadesh_p , Create a date table and join on date with this table. Use date from date table in this visual

 

Try measures like

 

emp = count(Table[Employee])

 

Cumm Hire = CALCULATE([emp], FILTER(ALL('Date') , 'Date'[Date] <= max('Date'[Date])), [Status] ="IN")
Cumm Termination = CALCULATE([emp], FILTER(ALL('Date'), 'Date'[Date] <= Max('Date'[Date])), [Status] = "OUT")
Current Employee = [Cumm Hire] -[Cumm Termination]

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@vengadesh_p , Create a date table and join on date with this table. Use date from date table in this visual

 

Try measures like

 

emp = count(Table[Employee])

 

Cumm Hire = CALCULATE([emp], FILTER(ALL('Date') , 'Date'[Date] <= max('Date'[Date])), [Status] ="IN")
Cumm Termination = CALCULATE([emp], FILTER(ALL('Date'), 'Date'[Date] <= Max('Date'[Date])), [Status] = "OUT")
Current Employee = [Cumm Hire] -[Cumm Termination]

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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.

Top Solution Authors