Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

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. 

 

 

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. 
  • Hi Anonymous 

    please try

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

4 Replies

  • tamerj1's avatar
    tamerj1
    Community Champion

    Hi Anonymous 

    please try

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

    • Anonymous's avatar
      Anonymous
      Not applicable

      I am no longer getting any errors, but the data is not auto filling into the columns. 

      • Anonymous's avatar
        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.