Forum Discussion
jobf
11 months agoHelper II
Difference between dates in the same column
I need a measure or column that calculates the difference between the most recent date and the start date of a company's production. For example: Branch Date 4 01/01/2025 4 01/05/2025 ...
- 11 months ago
Hi jobf - You can create a below measure to find the date diff. For each branch as per given scenerio
Date Difference =
VAR MinDate = CALCULATE(MIN('Table'[Date]), ALLEXCEPT('Table', 'Table'[Branch]))
VAR MaxDate = CALCULATE(MAX('Table'[Date]), ALLEXCEPT('Table', 'Table'[Branch]))
RETURN
DATEDIFF(MinDate, MaxDate, DAY)
Hope this helps
rajendraongole1
11 months agoSuper User
Hi jobf - You can create a below measure to find the date diff. For each branch as per given scenerio
Date Difference =
VAR MinDate = CALCULATE(MIN('Table'[Date]), ALLEXCEPT('Table', 'Table'[Branch]))
VAR MaxDate = CALCULATE(MAX('Table'[Date]), ALLEXCEPT('Table', 'Table'[Branch]))
RETURN
DATEDIFF(MinDate, MaxDate, DAY)
Hope this helps