3 Replies Latest reply: May 15, 2014 9:54 AM by Kevin Whipp RSS

    Creating line numbers or Record numbers with a sub-grouping of data?

    Lee Muschler

      I need to be able create a counter (caculated or summary field) within a grouping or category.  For example, if I was read in employees from different departments as follows:

      Dept        Employee

      ====        ========

      East        John

      East        Jack

      East        Sue

      West        Ann

      West        Dan

       

      I want to add a counter within the group as follows:

       

      Dept        Employee      Counter

      ====        ========      =======

      East        John               01

      East        Jack               02

      East        Sue                03

      West        Ann                01

      West        Dan                02

       

      Get the picture here?  Seems simple enough, but I cannot find any syntax that lets me refer to a previous row's value so I know when to reset the counter back to 1.  Also did not see any aggregation functions that would do this either.  I am new to Monarch, so please bear with me if this is to simple.

       

      Lee...