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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
rkee10
Frequent Visitor

Help in Putting Count in Each Month based on effective end date and effective start date of an EMP

I would like to ask your help on ho to reflect this challenge in DAX.

 

I would like to count employees who are active each month and would like to count the divisions they belong to.  The tricky part on the division count would be if Employee A is on DIV#1 last Sept then transferred to Div#2, then the count for Sept is 1 for Div#1 and Div#2 is zero but come Octboer, the count would be Div#1=0 and Div#2=1.

 

Below is a sample dataset and succeeding tables would be the desired results.

 

EmployeeDivisionEffective Start DateEffective End DateDirector
John DoeCustomer Support01/04/20229/24/20231
Billy SheehanCustomer Support06/04/201912/31/99991
Paul GilbertFinance06/06/200612/31/99992
Jane DoeFinance3/20/20152/27/20192
Pat TorpeyLogistics1/20/202403/02/20243
Jane DoeLogistics06/05/20083/19/20153
Jane DoeMarketing2/28/201904/04/20244
John DoeOperations9/25/202312/31/99995
Eric MartinSupply Chain03/02/202412/31/99996

 

 

Result A:            
Employee202401202402202403202404202405202406202407202408202409202410202411202412
John Doe111111111111
Jane Doe1111        
Paul Gilbert111111111111
Eric Martin111111111111
Billy Sheehan111111111111
Pat Torpey111         

 

 

Result B:            
             
Division202401202402202403202404202405202406202407202408202409202410202411202412
Customer Support111111111111
Marketing1111        
Finance111111111111
Suppy Chain  1111111111
Logistics111         
Operations111111111111

 

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

12/31/9999

Please, for the love of $deity - don't do that.  Leave it blank.

 

Read about INTERSECT

 

lbendlin_0-1731710580263.png

 

View solution in original post

2 REPLIES 2
Ashish_Mathur
Super User
Super User

Hi,

PBI file attached.

Hope this helps.

Ashish_Mathur_0-1731733510830.png

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
lbendlin
Super User
Super User

12/31/9999

Please, for the love of $deity - don't do that.  Leave it blank.

 

Read about INTERSECT

 

lbendlin_0-1731710580263.png

 

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.

Top Solution Authors