Forum Discussion

jobf's avatar
jobf
Helper II
11 months ago
Solved

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 ...
  • rajendraongole1's avatar
    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