3 Replies Latest reply on Jul 12, 2018 10:21 AM by Zohar Gilboa

    Running count of instances

    Zohar Gilboa

      I have a data set of purchases (let's say) done by customers. Each row has a customer ID, a purchase ID, and a purchase date. IDs are distinctive and in ascending order by date (earlier purchases have lower IDs).

      I need to create a table that shows one customer ID per row and counts up their purchases in separate columns, and shows the date in each intersection. I've mocked up an example of how this looks like. It's possible to have a customer ID with no purchase ID attached.

      Obviously I need some sort of LOD calculation, but I'm not sure how essentially do a running count here. Advice?


      Here's a mockup of what I want:

      Data image.png