Forum Discussion
Maha1
3 years agoHelper II
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...
- 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.
Ahmedx
2 months agoSuper User
another variant
count =
VAR _ID = 'DATA'[ID]
VAR _Date = 'DATA'[date]
RETURN
COUNTAX(
FILTER('DATA','DATA'[ID]=_ID&&[date]>=_Date),[date])