Forum Discussion

Smits474's avatar
Smits474
Frequent Visitor
9 years ago
Solved

Column with multiple checks

Hey guys,   I want to add a column with a calculation but i don't know the right formula to create it.   I want to check if the date in a cell matches the date in the next cell in the same column...
  • Anonymous's avatar
    Anonymous
    9 years ago

    I was a little too fast in my example, that will sequence all events from same person regardless of the date.

     

    To also consider sequence with each individual day you can alter the code to:

    Sequence =

    var curPerson = [Person]

    var curTime=[TimeStamp]

    var curDate = [TimeStamp].[Date]
    return FORMAT([TimeStamp],"YYYY-MM-DD") & " test-" & (COUNTROWS(FILTER(Events, [Person] = curPerson && Events[TimeStamp].[Date] = curDate && Events[TimeStamp] < curTime))+1)