Forum Discussion

AU555's avatar
AU555
Icon for Helper I rankHelper I
6 years ago
Solved

calculation within the same column

Hello everybody, hope i can get help here with the formula for this i suppose easy calculation, but i just dont know how to solve this issue.  I have this sample table and what I need to do is to c...
  • v-yuta-msft's avatar
    6 years ago

    AU555 ,

     

    You can create a calculate column using dax below:

    Diff = 
    VAR Earliest_Date = CALCULATE(MIN('Table'[Actual_Finish]), ALLEXCEPT('Table', 'Table'[amount installed]))
    VAR Latest_Date = CALCULATE(MAX('Table'[Actual_Finish]), ALLEXCEPT('Table', 'Table'[amount installed]))
    RETURN
    DATEDIFF(Earliest_Date, Latest_Date, DAY)

     

     

    Community Support Team _ Jimmy Tao

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.