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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Anonymous
Not applicable

Cumulative Distinct Employee Count with Multiple Filters

Hi,

I have an employee snapshot taken monthly and I need to do get a distninct active employee count every month.

I have seen several examples and still cannot get it to work correctly. 

 

My problem is that the employees hired before my graph range (based upon a rolling 13 months) are not included

 

My last example measure is 

 

Test Employee Count = 
VAR MaxDate= MAX('Filter Dates'[Date])
VAR MinDate=min('Filter Dates'[Date])
RETURN
Calculate(DISTINCTCOUNT(vwMSRHireAttrition_UATT[UniqueId]),
OR(vwMSRHireAttrition_UATT[Adjusted Hire Date]<=MinDate, ISBLANK(vwMSRHireAttrition_UATT[Adjusted Hire Date])),
vwMSRHireAttrition_UAT[Termination Date]>=MaxDate)
 
 
I need the user to be able to reconcile the rolling count vs the monthly hiring and termination data.   
 
Any help would be greatly appreciated and I am happy to use something else. 
Thanks
1 ACCEPTED SOLUTION

Here is one possible implementation.  It uses a disconnected calendar table.

View solution in original post

3 REPLIES 3
lbendlin
Super User
Super User

What does "active" mean in your context?  Termination date is null or in the future?

 

Please provide sanitized sample data that fully covers your issue. https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
Please show the expected outcome based on the sample data you provided.

https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

Anonymous
Not applicable

Active would employees that are not terminated and hired before a month.  The key issue is that the graph is supposed to be rolling twelve months but I have many employees hired years ago.    Thanks

EmployeeContractHire DateTermination DateCost CenterUnique ID
BobA4/1/2020 TestBob-A
TomB7/1/20216/1/2022OneTom-B
JohnC12/1/2021 JWJohn-C
Mary A5/1/2016 HPMary -A
SteveC1/1/20224/1/2022SDSSteve-C

Here is one possible implementation.  It uses a disconnected calendar table.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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