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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Date table and table in power bi

Hello all,

 

I have a question for you about Power

 

I have a date table and a table with name and start date.   There is no unique id to link these two tables.    I would like customer to choose the dates from date table (Begin date and End date) , and calculate the service time.  (Date - start date).

 

NameDate of HireYear of Hire
Joe01/01/20002000
Mike07/01/20002000

 

DateYearBegin Date columnEnd Date column
01/01/2023202301/01/202301/02/2023
01/01/2023202301/01/202301/02/2023
..............
06/30/2023202306/30/202306/30/2023

 

If customer picks 01/01/2023 as begin date, 06/30/2023 as end date.  

Joe's date of service is 3 years, Mike's is 2 years etc.

 

How can I build the logic?

 

Thank you for your help!

 

 

3 REPLIES 3
Anonymous
Not applicable

Tables.PNG

Anonymous
Not applicable

Hi @Anonymous ,

 

According to your statement, I think Joe and Mike are both hired on 2000/1/1. 

So I am confused about how to get Joe's date of service is 3 years, Mike's is 2 years etc when you pick 01/01/2023 as begin date, 06/30/2023 as end date.   I think the service time should be 06/30/2023 - 01/01/2023.

If you want to calculate the difference between days, I suggest you to try DATEDIFF.

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Thank you @Anonymous ,

Thank you so much for your reply. My question was whether Power BI can pick any dates from date table and calculate the years of service based on Date of Hire.

 

These two tables are not connected with any unique ID.

 

Sincerely,

 

Hiroki

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

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.