Forum Discussion

Maha1's avatar
Maha1
Helper II
3 years ago
Solved

Running count in Dax sort by date

Greetings,    How can I create a colmn in DAX for running count of IDs, sorted descending by the date. For example:   ID   date     RUNNING COUNT 111   1/1/2023     1 222   1...
  • Ashish_Mathur's avatar
    3 years ago

    Hi,

    Write this calculated column formula

    Running count = CALCULATE(COUNTROWS(Data),FILTER(Data,Data[ID]=EARLIER(Data[ID])&&Data[date]>=EARLIER(Data[date])))

    Hope this helps.