Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

find overlapping Extended event from date time

Hi all,   I am trying to find a overlapping extenteded event from below table.   Index Start Date TimeDiff in Sec DatewithaddedSeconds 1098 3/28/2020 2:04:00 AM 1952108 4/19/2020 4:19...
  • v-eachen-msft's avatar
    6 years ago

    Hi Anonymous ,

     

    Try the following DAX:

    Last overlapping Date =
    VAR start_date = ErrorLogs[Start Date]
    VAR end_date = ErrorLogs[DatewithaddedSeconds]
    VAR _index = ErrorLogs[Index]
    VAR a =
        MAXX (
            FILTER (
                ErrorLogs,
                ( ErrorLogs[DatewithaddedSeconds] >= start_date
                    && ErrorLogs[DatewithaddedSeconds] <= end_date )
                    && [Index] <> _index
            ),
            [DatewithaddedSeconds]
        )
    VAR b =
        LOOKUPVALUE ( ErrorLogs[Index], ErrorLogs[DatewithaddedSeconds], a )
    RETURN
        IF ( b > ErrorLogs[Index], a )
    

    Here is the result.