cancel
Showing results for
Did you mean:
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

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

For a calculated column, please refer to:

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

For a calculated measure, please refer to:

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

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.
Highlighted
Community Support Team

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

For a calculated column, please refer to:

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

For a calculated measure, please refer to:

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

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.