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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors