The calculated column I am trying to create is the far right column in the below table:
In words: If a B event occurs in the specified City, does a C event occur within one hour of the B event, true or false.
I've tried a few different approaches with Over functions but just not having luck. I am struggling on how to reference a different event in the same column and then calculate a datetime difference between them..
Thanks!
You may try to take it in stages and define intermediate columns. Try this, assuming C is the max label for the events.
You did not post data so I generated something that seemed similar.
([event]="B") and (Max([event]) OVER (Intersect([city],AllNext([date])))="C") and ( DateDiff("hh",[date],ValueforMax([event],[date]) OVER (Intersect([city],AllNext([date]))))<=1)