Forum Discussion
Cumulative count by categories
- 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.
Hi francomaestri ,
if it were a table is this your expected result? If not, please show what is your expected result.
Hi!
I think that the result in a table would be:
| Date | Category | Count |
| 08-07-2022 | A | 1 |
| 08-07-2022 | B | 1 |
| 08-07-2022 | A | 2 |
| 14-08-2022 | A | 3 |
| 14-08-2022 | C | 1 |
| 09-09-2022 | C | 2 |
| 09-09-2022 | A | 4 |
| 09-09-2022 | B | 2 |
| 09-09-2022 | B | 3 |
If I'm not mistaken, in this way in the graph, for example, the line of category C will start at 1 on 08-14-2022. I could just split each event type (category) into a different column, but the category of events may change in the future, so I wanted to keep the table as it is (also because there are many more columns than shown here).