sorry for the delay, I had a lot of work to do at my regular job
Step 1 - I was having problems with your table having random calculated columns, so I recreated a portion of it. (see Sales2 table attached)
Step 2 - I added an index to the Sales2 table, as Iām assuming your real data has some type of product or invoice index information
Step 3 - I used TREATAS instead of USERELATIONSHIP to build the formulas:
Sale vs Completion Date variance =
VAR CompletionDate =
CALCULATE( FIRSTDATE( Dates[Date] ),
TREATAS( VALUES( Sales2[CompletionDateID] ), Dates[DateID] ))
VAR SalesDate =
CALCULATE( FIRSTDATE( Dates[Date] ),
TREATAS( VALUES( Sales2[DateID] ), Dates[DateID] ))
RETURN
DATEDIFF( SalesDate, CompletionDate, DAY )
NOTE: TREATAS does not require a connection to your date table for any of the relationships, but I did include an inactive relationship to CompletionDateID, and an active relationship to DateID
The reason I did this was to demonstrate how TREATAS works the same with all three measures, even though there is no relationship for the ReviewDateID, and the two relationships described above for the other two ID fields.
See attached for solution
eDNA solution - comparing two dates.pbix (2.2 MB)