Forum Discussion
Buckswriter
4 years agoFrequent Visitor
Rolling Counts
Hi. I am struggling to know which is the best way to add a column to my data which will produce a count of how many times a value appears; I don't want a simple count - what I am after is a formu...
- 4 years ago
Count of Name CC : =
VAR currentname = Data[Name]
VAR currentdate = Data[Date]
RETURN
COUNTROWS (
FILTER ( Data, Data[Name] = currentname && Data[Date] <= currentdate )
)
Fowmy
Super User
4 years agoBuckswriter
Add this new column to your table:
Count =
COUNTROWS(
SELECTCOLUMNS( FILTER( Table1 , Table1[Date] <= EARLIER(Table1[Date]) && Table1[Name] = EARLIER(Table1[Name])) , "Name" , Table1[Name] )
)