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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.