Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Add a sequence number by ID and date/time

I have a table with an alphanumeric ID field and a modified date & time field. I need another column that assigns a sequence numer by ID and date/time.    So this: ID Modified Date INC00000...
  • Anonymous's avatar
    Anonymous
    7 years ago

    Can add this as a calculated column:

    Sequence = 
    VAR CurrentID= Table1[ID]
    VAR CurrentDate = Table1[Modified Date]
    RETURN
    
    CALCULATE(
        COUNTROWS( Table1 ),
        FILTER ( 
            ALL( Table1 ),
            CurrentID = Table1[ID]
            && CurrentDate >= Table1[Modified Date]
        )
    )