Forum Discussion
Ronning
4 years agoFrequent Visitor
Subtracting two date columns in two different tables
Hi, I have a problem with subtracting two date columns from different tables. I have tried this. DATEDIFF( SUM( 'Table' [Column] ) , SUM( 'Table' [Column]) , DAY ). But when i drag this mea...
- 4 years ago
I found out the problem... It was just to change SUM to MAX.
tamerj1
Community Champion
4 years agoHi Ronning
If there is a relationship between th etwo tables then if table1 is at the many side and table2 is at the one side and assuming that 'Table1'[Column] is the earlier date and 'Table2'[Column] is the later date then you can use
# Days =
SUMX (
'Table1',
DATEDIFF ( 'Table1'[Column], RELATED ( 'Table2'[Column] ), DAY )
)
Ronning
4 years agoFrequent Visitor
I found out the problem... It was just to change SUM to MAX.