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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

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 )

 

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

@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 )

 

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

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.