Forum Discussion
francomaestri
3 years agoFrequent Visitor
Cumulative count by categories
Greetings, I'm trying to count the occurrence of certain events on some dates, but I can't calculate it correctly, so when I create a chart, the occurrence of a new event (new category) starts fr...
- 3 years ago
Ok, I solved it.
I just created an index in power query, then I created a new column with rankx:
Count with rankx= RANKX(FILTER ( 'Table', 'Table'[Category] = EARLIER ( 'Table'[Category] ) ),'Table'[Index], ,ASC )Then I just put Date in X-axis, the new column in Y-axis and Category in legend.
This way I can see when a new event occurs and how many times is repeated over time an when.
Jayee
3 years agoResponsive Resident
Counting =
VAR MaxDate = MAX ( 'Table'[Date] )
RETURN
CALCULATE (
COUNTROWS('Table'),
'Table'[Date] <= MaxDate,
ALL ( Table )
)
Use this measure in chart and add Category as legend.
If this post helps, then please consider Accept it as the solution, Appreciate your Kudos!!
francomaestri
3 years agoFrequent Visitor
Sadly I'm having the same problem. Each new event starts from a higher value, not from zero.