4 Replies Latest reply on Sep 15, 2014 1:20 PM by jeffschamberger

    Query by general date range?

    Rookie

      I need to write a few queries to see open incidents by date range (nonspecific).  I'm looking to do the following:

       

      Open Incidents 4 days or less

      Open Incidents 5-9 days

      Open Incidents 10-14 days

      Open Incidents 15-19 days

      Open Incidents 20-29 days

      Open Incidents 30+ days

       

      I was able to write the first one using the following criteria:

      Lifecycle equal to (Process)

      Status.Is End is Equal to (False)

      Creation Date Is Within the Next (4 days)

       

      And the last one using:

      Lifecycle equal to (Process)

      Status.Is End is Equal to (False)

      Creation Date is Older than (30 days)

       

      I was hoping I could write the others by also using Creation Date is Less than (XX Days) and just adjust the numbers from there but Less Than pulls up a specific date when I pull up the criteria and does not let me select a general number like the Older than criteria does.

       

      Does anyone know of a way or other criteria that can be used to accomplish the other queries?  Thank you in advance for your help!

        • 1. Re: Query by general date range?
          Expert

          Sounds like you want a busy dashboard.  This should help if i am understanding you correctly.

           

          Incidents opened within the past 4 days:

           

          Incidents which have a creation date that is 5 - 9 days old:

           

          Incidents which have a creation date that is 10 - 14 days old:

           

          Etc...  Play with the numbers to make sure you get exactly the days you want.  I think what i have down might have overlap or might miss a day, so check, check, and triple check the results.

          1 of 1 people found this helpful
          • 2. Re: Query by general date range?
            Expert

            forgot to mention your first query has a strange criteria if you are trying to find a ticket which was created in the past:

             

            I was able to write the first one using the following criteria:

            Lifecycle equal to (Process)

            Status.Is End is Equal to (False)

            Creation Date Is Within the Next (4 days)

             

            Within the Next (4 days) would indicate you are pulling data from whatever the current date is.

             

            Just a thought.

             

            Thanks,

            Mike

            • 3. Re: Query by general date range?
              ITSMMVPGroup

              or... he's looking for future tickets.

               

              Now THAT's proactive service. 

               

               

               

              -B

              • 4. Re: Query by general date range?
                Rookie

                Oops - typo on the post... meant I used Creation Date is Within the Previous (4 Days)...

                 

                Thanks so much for the help on the other reply -- worked like a charm!!  And yes... a very busy dashboard, but for my boss...