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.
FreemanZ
3 years agoSuper User
If there is no misunderstanding, you measure shall be like this:
COUNTING =
VAR CurrentDate = MAX('Table'[Date])
RETURN
CALCULATE(
COUNTROWS('Table'),
FILTER(
ALL('Table'),
'Table'[Date] <= CurrrentDate
)
)
The [Category] field shall be put in the Legend of the linechart visual, or?
- francomaestri3 years agoFrequent Visitor
I'm having the same problem. When a new event appears it does not start from zero.