Forum Discussion

francomaestri's avatar
francomaestri
Frequent Visitor
3 years ago
Solved

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...
  • francomaestri's avatar
    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.