5 Replies Latest reply: May 29, 2015 3:55 AM by Marianna Romero RSS

    Can I number rows sequentially and start over when a value changes?

    Carol R

      I have the following input file:

       

      number1reason2priority3
      123abc2
      123yuj3
      123ope4
      987qwe3
      456nmb2
      456xdr3

       

      I need to 'group' the reasons by number in order by the priority across the page.  I thought this may be able to be done in Monarch if I could assign a fourth column that would number 1 to ?? then start over at 1 when the 'number' column changed values:

       

      In the example above the fourth column down the page would be 1 2 3 1 1 2

       

      Is that even possible in Monarch?

        • Re: Can I number rows sequentially and start over when a value changes?
          Marianna Romero

          Hi Carol,

          To clarify --

          Is the fourth column you described something you need to actually have in the report?

          Or did you describe it as a means to "...'group' the reasons by number in order by the priority across the page"?

           

          If it's the latter, you might not need the fourth column and may just follow the Priority values - the current Priority values seem to have the same "weight" as the fourth column you described.

           

          If this is the case, you could do either of the following:

          - in Table view, create a Sort using the Number and Priority fields with the Order set to Ascending

          - or you could create a Summary with the Number and Priority columns as Key fields, then put in the Reason as the Item field. You might want to set the Key Values to Suppress duplicates for the Number field, so that the Number value doesn't keep repeating in the display.

           

          However, if you need to actually produce/generate the fourth column you described, you'd need scripting and/or Automator.

           

          Hope this helps.

           

          Marianna