Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
POSPOS
Post Partisan
Post Partisan

Calculated 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:

POSPOS_0-1709584194327.png


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.

1 ACCEPTED SOLUTION
ryan_mayu
Super User
Super User

@POSPOS 

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")
11.PNG




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

1 REPLY 1
ryan_mayu
Super User
Super User

@POSPOS 

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")
11.PNG




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.