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
rcardozo
Regular Visitor

Calculating Net hires and leavers

Hi BI Gurus,

 

Could you please help me? I am trying to present the net hires and leaves per month in a combined graph.

The data is sourced from two different sources/tables. Right now it looks like the leavers are totalling all together for 17 each month.

 

Could someone please recommendf do I fix this?

CombinedCombinedHiresHiresLeaversLeavers

1 ACCEPTED SOLUTION
v-sihou-msft
Employee
Employee

@rcardozo

 

In your scenario, since your "number of leavers" starts from June and "number of new hires" starts from Feburary, it's better to built the relationship to a date table first. And it looks like you are using measures to calculate the count of "new hires" and "leavers". You should use ALLEXCEPT() to have your calculation group on Month level. The formula can be like:

 

Count of Hired Date= CALCULATE(COUNTA(Table1[HiredDate]),ALLEXCEPT(Table1,Table1[Month]))
Count of Leavers= CALCULATE(COUNTA(Table2[End Date]),ALLEXCEPT(Table2,Table2[Month]))

 

 

If you still can't fix your issue, please share your .pbix with sample data.

 

Regards,

View solution in original post

1 REPLY 1
v-sihou-msft
Employee
Employee

@rcardozo

 

In your scenario, since your "number of leavers" starts from June and "number of new hires" starts from Feburary, it's better to built the relationship to a date table first. And it looks like you are using measures to calculate the count of "new hires" and "leavers". You should use ALLEXCEPT() to have your calculation group on Month level. The formula can be like:

 

Count of Hired Date= CALCULATE(COUNTA(Table1[HiredDate]),ALLEXCEPT(Table1,Table1[Month]))
Count of Leavers= CALCULATE(COUNTA(Table2[End Date]),ALLEXCEPT(Table2,Table2[Month]))

 

 

If you still can't fix your issue, please share your .pbix with sample data.

 

Regards,

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.