Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Time difference between rows

Hi   I've been trying to solve my problem for a few days, but even with research on the forum, I can't seem to make it work.    Concept : I get pings from 7 machines at varying delays. These loo...
  • tackytechtom's avatar
    3 years ago

    Hi Anonymous ,

     

    Does this one here help you?

     

    Ranking Column in your case should be the [Created On] column, where as the Grouping Column is [id]

    DateDiffColumnWithoutIndex = 
    DATEDIFF (
       'TableName'[RankingColumn],
        CALCULATE (
            MIN ( 'TableName'[RankingColumn] ),
            FILTER ( 'TableName', 'TableName'[RankingColumn]  > EARLIER ( 'TableName'[RankingColumn]  ) ),
            FILTER ( 'TableName', 'TableName'[GroupingColumn] = EARLIER ( 'TableName'[GroupingColumn] ) )
        ),
        SECOND
    )

     

    Doing this in a calculated column might take quite some resources and time. Maybe consider adding this column in Power Query instead. This one here, might help you in that case.

     

    Let me know if this helps!

     

    /Tom
    https://www.tackytech.blog/
    https://www.instagram.com/tackytechtom/