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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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