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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
llyons
Frequent Visitor

headcount FT and PT employees

Hello, 

I am trying to do a headcount when some employees count as 1 headcount and other count as .5

 

I tried distinctcount but received a headcount of 3 but what I need is 2.5 for below example date 1/2/2021 and for 1/3/2021 headcount is 1.5. I have more columns then the below . My table is based on insurance claims processed but I am trying to get a headcount for each day when some people are counted as 1 and others only work half time or .5 in the department.

sample column are

date            Id            headcount        

1/2/2021    LLRS         1.0                       

1/2/2021     EEL            1.0                       

1/2/2021    TMT            .5           

1/3/2021     LLRS        1

1/3/2021     TMT          .5               

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@llyons , Try a measure like

 

Measure =
VAR __id = MAX ('Table'[ID] )
VAR __date = CALCULATE ( MAX('Table'[Date] ), ALLSELECTED ('Table' ), 'Table'[ID] = __id )
CALCULATE ( Sum ('Table'[headcount] ), VALUES ('Table'[ID ),'Table'[ID] = __id,'Table'[Date] = __date )

 

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@llyons , Try a measure like

 

Measure =
VAR __id = MAX ('Table'[ID] )
VAR __date = CALCULATE ( MAX('Table'[Date] ), ALLSELECTED ('Table' ), 'Table'[ID] = __id )
CALCULATE ( Sum ('Table'[headcount] ), VALUES ('Table'[ID ),'Table'[ID] = __id,'Table'[Date] = __date )

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors