Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi everyone,
I'm quite new to Power Bi and i'm hoping that you'll be able to help me with DAX Measures. I'm working on a HR Project and i need to calculate two KPIs'.
- New hires still in the business after 6 months of their start date
- New hires left the business before 6 months of their start date
I have Status of Employment Column, if someone left the company status is 'DEACTIVE', if it's still in the business it's 'ACTIVE'.
Your help will be appreciated!
Best,
E
Solved! Go to Solution.
Hi @Egemeny ,
You can create measures using DAX below.
Active after 6 months = CALCULATE(COUNT('Master Data'[Employee Code]),FILTER('Master Data','Master Data'[Status of Employment]="Active"&&DATEDIFF('Master Data'[Date Engaged],TODAY(),MONTH)>=6))
Deactive within 6 months = CALCULATE(COUNT('Master Data'[Employee Code]),FILTER('Master Data','Master Data'[Status of Employment]="Deactive"&&DATEDIFF('Master Data'[Date Engaged],'Master Data'[Date of Resignation],MONTH)<6))
Best Regards,
Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi All,
How to get count of employees hired or resigned/ terminated in the current year ?
Hi @v-xicai ,
Thank you for your response. As you mentioned, i'm attaching link of pbix. file.
My desire outcome is calculating,
I hope this time i'm more clear.
Best,
E
Hi @Egemeny ,
You can create measures using DAX below.
Active after 6 months = CALCULATE(COUNT('Master Data'[Employee Code]),FILTER('Master Data','Master Data'[Status of Employment]="Active"&&DATEDIFF('Master Data'[Date Engaged],TODAY(),MONTH)>=6))
Deactive within 6 months = CALCULATE(COUNT('Master Data'[Employee Code]),FILTER('Master Data','Master Data'[Status of Employment]="Deactive"&&DATEDIFF('Master Data'[Date Engaged],'Master Data'[Date of Resignation],MONTH)<6))
Best Regards,
Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
It worked!
thank you so much.
Hi @Egemeny ,
I am not sure what desired result would you want, could you please share your sample data or desired output screenshots for further analysis? You can also upload sample pbix to OneDrive and post the link here. Do mask sensitive data before uploading.
Please read this post to get your answer quickly.
https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
Best Regards,
Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
140 | |
113 | |
104 | |
77 | |
65 |
User | Count |
---|---|
136 | |
118 | |
101 | |
71 | |
61 |