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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Find the difference between two dates from two different tables

I am looking to find the difference between two dates from two different tables. The tables being used are Assignments and AssigmentBaselines. The columns used are 'Assignments[AssignmentActualFinishDate] and 'AssignmentBaselines'[AssignmentBAselineFinishDate]. The tables have a relationship many to one (*:1) and has a both cross filter direction. 

 

Screenshot 2023-06-07 110718.pngScreenshot 2023-06-07 110736.png

 

Screenshot 2023-06-07 111257.pngScreenshot 2023-06-07 111301.png

The formula I have been using is: 

Baseline Days +/- = DATEDIFF(AssignmentBaselines[AssignmentBaselineFinishDate], RELATED(Assignments[AssignmentActualFinishDate].[Day]))
 
The error I keep getting is "Too few arguments were passed to the DATEDIFF function. The minimum argument count for the function is 3."
 
I have looked through many different forum post and I have tried many different ways to solve this issue but I keep coming up short. Any help would be appreciated. 
1 ACCEPTED SOLUTION
tamerj1
Super User
Super User

Hi @Anonymous 

please try

Baseline Days +/- =
DATEDIFF (
AssignmentBaselines[AssignmentBaselineFinishDate],
RELATED ( Assignments[AssignmentActualFinishDate] ),
DAY
)

View solution in original post

4 REPLIES 4
tamerj1
Super User
Super User

Hi @Anonymous 

please try

Baseline Days +/- =
DATEDIFF (
AssignmentBaselines[AssignmentBaselineFinishDate],
RELATED ( Assignments[AssignmentActualFinishDate] ),
DAY
)

Anonymous
Not applicable

I am no longer getting any errors, but the data is not auto filling into the columns. Screenshot 2023-06-07 121726.pngScreenshot 2023-06-07 121722.png

Anonymous
Not applicable

I guess it just took some time. As of right now, it seems like that fixed the issue. Thank you for the help. I was banging my head against the wall for too long. 

@Anonymous 

This is a bug in the latest update. Just manually resize the column and the values should appear. 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors