cancel
Showing results for 
Search instead for 
Did you mean: 
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
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Top Solution Authors
Top Kudoed Authors