Forum Discussion
faustusxanthis
1 year agoFrequent Visitor
Need help summarizing row count
Hello! It seems I'm out of options and I can't seem to find the right solution. My data is like this: Date Person Count Instance 1/1/2024 Person 1 2 1/1/2024 Person 1 2 1/1/2...
- 1 year ago
Hi,
This calculated column formula works
Column = CALCULATE(COUNTROWS(Data),FILTER(Data,Data[Date]=EARLIER(Data[Date])&&Data[Person]=EARLIER(Data[Person])))Hope this helps.
- 1 year ago
Here is a better version
Count Instance =
CALCULATE (
COUNTROWS ( Data ),
TREATAS ( { ( [Date], [Person] ) }, Data[Date], Data[Person] )
)Not using EARLIER (which is discouraged anyway) or variables.
lbendlin
1 year agoSuper User
No need to use DAX. The implicit measures can do that for you. Power BI automatically aggregates.
faustusxanthis
1 year agoFrequent Visitor
Hi lbendlin,
Yeah I know I can do that but I need it to show as another column in Data view.
- lbendlin1 year agoSuper User