Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

Time duration calculation based on rows with unique identifiers

Hi all, been searching the forums for an answer for a calculation I need and so far have come up blank...    I've looked through the following threads (as these seem to have solved a similar 'probl...
  • gooranga1's avatar
    8 years ago

    Hi Anonymous

     

    If you create 2 measures that max and min the Audit Date. then create a 3rd measure that does a datediff of these 2 measures.

     

    MinAudit = CALCULATE(min(Table10[Audit Date]))
    
    MaxAudit = CALCULATE(max(Table10[Audit Date]))
    
    Difference = DATEDIFF([MinAudit], [MAxAudit],SECOND)

    Then add them to a matrix with SessionId on Rows it should give you what you need.