Forum Discussion
Attrition % based on Reasons
Hi Guys,
Below is a smaple data base. Based on this i tried to calculate the attriton % (Total Attrits/(sum(Latest month Headcount). The formula is working but the moment when i try to create a graph or table based on Term Reason the value is coimg as Infinity.
When i check i can see that the termination numbers are comming correct but insted of latest month HC it is coming as 0. How can i fix it.
| Month | Country | Role Category | Role Type | Grade | Reason Category | Term Reason | Total Attrits | Headcount | Type |
| October, 2020 | EY | Admin | Ops Admin | G 12 | Voluntary | Personal | 1 | 0 | Inactive |
| October, 2020 | EY | Admin | Quality | G 10 | Voluntary | Personal | 1 | 0 | Inactive |
| October, 2020 | EY | Admin | Quality | G 10 | Voluntary | Relocation | 1 | 0 | Inactive |
| October, 2020 | EY | Admin | Quality | G 9A | Voluntary | Other Job Opportunity | 1 | 0 | Inactive |
| October, 2020 | EY | Agent | Production | G 10 | Voluntary | Personal | 1 | 0 | Inactive |
| October, 2020 | EY | Agent | Production | G 11 | Voluntary | Personal | 3 | 0 | Inactive |
| October, 2020 | EY | Admin | Ops Admin | G 12 | Voluntary | Personal | 0 | 230 | Active |
| October, 2020 | EY | Admin | Quality | G 10 | Voluntary | Personal | 0 | 122 | Active |
| October, 2020 | EY | Admin | Quality | G 10 | Voluntary | Relocation | 0 | 122 | Active |
| October, 2020 | EY | Admin | Quality | G 9A | Voluntary | Other Job Opportunity | 0 | 123 | Active |
| October, 2020 | EY | Agent | Production | G 10 | Voluntary | Personal | 0 | 33 | Active |
| October, 2020 | EY | Agent | Production | G 11 | Voluntary | Personal | 0 | 21 | Active |
Hi unnijoy
Does the Latest Month HeadCount need to be based on Term Reason? If so, measures are:
HC = calculate(sum('Table'[Headcount]),filter('Table','Table'[Month]>=Max('Table'[Month])))Attriton % = SUM('Table'[Total Attrits])/[HC]If not, try measures:
Total HC = calculate(sum('Table'[Headcount]),filter(all('Table'),'Table'[Month]>=Max('Table'[Month])))Total Attriton % = SUM('Table'[Total Attrits])/[Total HC]Is this what you need? Here is the PBIX file.
Best Regards,
Community Support Team _ Jing Zhang
If this post helps, please consider Accept it as the solution to help other members find it.unnijoy You don't need to change anything but uncheck blank value for Term Reason in visual filters. Just like below.
8 Replies
- amitchandak
Super User
unnijoy , how are you calculating -latest month HC?
- unnijoy
Post Prodigy
- unnijoy
Post Prodigy
amitchandak waiting for ur help 🙂