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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It 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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors