Forum Discussion
AVERAGE TENURE using CALCULATE FUNCTION
- 6 years ago
AnonymousMany Thanks. I adjusted the formula as mentioned below and it worked
CALCULATE(AVERAGEX(Emp),
ROUNDDOWN(DATEDIFF(Table1[Group Entry Date],Table1[Reporting Date],MONTH)/12,0)))
Here is the screenshot of the sample data
1. The final calculation should calculate
- Average tenure for employees with status 'Active' ,'Paid Leave' , 'Unpaid Leave'
- While doing above calculation , it should exclude employees with type "Blue Collar" with above status
- While doing above calculation , it should exclude employees with Headcount =0
Here is the input
Here is the table for which i need to calculate the average tenure
adhumal2 we are trying to help. Please don't provide screenshots of data we have to key in. I provided a link to an excellent post on how to share data so we can copy|paste, or better yet just open an Excel or PBIX file. It is also very helpful to have a screenshot or table of the expected output so when we are testing measures, it delivers the expected output.
- Greg_Deckler6 years agoCommunity Champion
edhans - That is a fantastic post by ImkeF , I just added that post as a link in my blog article where I talk about posting data.
- edhans6 years agoCommunity Champion
Yup Greg_Deckler - she just put that together over the last few days and mentined it in the Teams channel. I wish your post and her post could be made Stickies in the forums. They would get end users answers so much faster.