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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Tob_P
Helper V
Helper V

Calculating & forecasting length of Service

Hi,

 

I have the following measure to calculate various length of service milestones in the next month...

 

LOS Flag (31 Days) =
IF
('*Employee'[Time With Company (Days)] >= 334 && '*Employee'[Time With Company (Days)] <365, "One Year Flag",
IF
('*Employee'[Time With Company (Days)] >= 1794 && '*Employee'[Time With Company (Days)] <1825, "Five Year Flag",
IF
('*Employee'[Time With Company (Days)] >= 3619 && '*Employee'[Time With Company (Days)] <3650, "Ten Year Flag",
IF
('*Employee'[Time With Company (Days)] >= 5444 && '*Employee'[Time With Company (Days)] <5475, "Fifteen Year Flag",
IF
('*Employee'[Time With Company (Days)] >= 7269 && '*Employee'[Time With Company (Days)] <7300, "Twenty Year Flag",
IF
('*Employee'[Time With Company (Days)] >= 9094 && '*Employee'[Time With Company (Days)] <9125, "Twenty Five Year Flag"))))))
 
What I'd like to do is be able to look ahead and calculate who will hit those length of service milestones in the next calendar year. Tried that measure with a relative date slicer for in the next calendar year but no luck. Haven't a clue where to start with this one! Any guidance appreciated. Yes, I have a date table, Time With Company [Days] is a calculated column based off contract start date.
2 REPLIES 2
tamerj1
Super User
Super User

Hi @Tob_P 

what results are you getting with this "measure"?

does the the relative date slicer table have a relationship with the main table? 

Tob_P
Helper V
Helper V

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.