Forum Discussion

grousie26's avatar
grousie26
New Member
8 years ago

Cumulative count by event

Hi there, I have gone through several articles to work out my issue but nothing has worked for me so far.

 

Basically we are selling tickets to productions, and I am looking to have a cumulative sales total by production.

 

The table contains columns 'Index', 'Event Name', 'Purchase Date' and I would like an additial column for the cumulative total per event.

 

e.g.

If anyone is able to help here it will be hugely appreciated, thanks!

7 Replies

  • Hi grousie26,

     

    Please try this: 

     

    CUMULATIVE COUNT COLUMN =
    CALCULATE (
        COUNTROWS ( 'Table' ),
        'Table'[Purchase Date] <= EARLIER ( 'Table'[Purchase Date] ),
        'Table'[Event Name] = EARLIER ( 'Table'[Event Name] ),
        'Table'[Index] <= EARLIER ( 'Table'[Index] )
    )

     

     

    • grousie26's avatar
      grousie26
      New Member

      No it's just one ticket per line.  I can add a column if needed though, it will just be 1 in every row if that helps.

      • Hardik's avatar
        Hardik
        Continued Contributor

        okay great ! so you want a sum of tickets  for same events .e.g. event 1 has 5 tickets