cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
m_hollingsworth Occasional Visitor
Occasional Visitor

Date Difference First Date Column A & Last Date Column B

How do you calculate the date difference between the first date in one column and the last date in another column for unique values ?

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support Team
Community Support Team

Re: Date Difference First Date Column A & Last Date Column B

Hi @m_hollingsworth,

 

For a calculated column, please refer to:

diff = DATEDIFF(MIN(table2[ColumnA]),MAX(table2[ColumnB]),DAY)

1.PNG

 

For a calculated measure, please refer to:

diff measure = DATEDIFF(CALCULATE(MIN(table2[ColumnA]),ALL(table2)),CALCULATE(MAX(table2[ColumnB]),ALL(table2)),DAY)

2.PNG

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
1 REPLY 1
Highlighted
Community Support Team
Community Support Team

Re: Date Difference First Date Column A & Last Date Column B

Hi @m_hollingsworth,

 

For a calculated column, please refer to:

diff = DATEDIFF(MIN(table2[ColumnA]),MAX(table2[ColumnB]),DAY)

1.PNG

 

For a calculated measure, please refer to:

diff measure = DATEDIFF(CALCULATE(MIN(table2[ColumnA]),ALL(table2)),CALCULATE(MAX(table2[ColumnB]),ALL(table2)),DAY)

2.PNG

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.