Forum Discussion
POSPOS
Post Partisan
2 years agoCalculated column to check eligibility
Hi all,
I have a requirement to check if a user is eligibile for a specfic service and the eligibility criteria is his age should be >=55 years and also have >=10 years of service.
I have to show the total users who are eligible as of today, within 3 years and within 5 years.
Sample data:
I was able to calculate the total users as of today using the below:
years of service = DATEDIFF(service date, TODAY(),YEAR)Service Check =
IF([years of service] >= 10 && [Age] >= 55,"Eligible","Not Eligible")
Can someone pls help with how we can show the get the count of users who are eligible within next 3years from today and next 5 years from today. Sample pbix file is available here.
Thank you.
you can try this
3 years = IF(DATEDIFF('Table'[service date], edate(TODAY(),36),YEAR)>= 10 && [Age]+3 >= 55,"Eligible","Not Eligible")5 years = IF(DATEDIFF('Table'[service date], edate(TODAY(),60),YEAR)>= 10 && [Age]+5>= 55,"Eligible","Not Eligible")