2 Replies Latest reply on Mar 17, 2010 1:16 AM by aparker

    Multiple criteria in 1 query and picking up count?


      The boss has asked me to write a query that provides him 3 different sets of criteria and he wants the Incident count for his Metrics spreadsheet;


      1. He wants to know how many tickets were Open at the beginning of the month (count)

      2. How many tickets were Opened throughout the month (count)

      3. How many tickets closed within the month (count)


      Is it possible to include all 3 criteria in the same query? If so how might I go about defining the criteria?


      Any help would be greatly appreciated.



        • 1. Re: Multiple criteria in 1 query and picking up count?

          It's hard to combine all this in one query, but you could write 3 and put them all onto one welcome page/dashboard.  That way your boss can see the stats on one page which is probably what they are after.

          • 2. Re: Multiple criteria in 1 query and picking up count?
            aparker Employee



            I agree with Dave about not being able to do all of this in one query. What we have normally seen is a crystal report that is used to combine the various sets of data together. The ideal scenario is that the report replaces the spreadsheet completely, but not knowing the extent of the spreadsheet content, I can't say how much work that would be.


            There is one potential snag here with the values you're looking to capture and that is the first value. It is not always very easy to identify a quanitity like Open at a point in time, because there is often no specific attribute that can be tied to that date/time value. The system does not, by default, hold values about the status of the process on a date basis.


            There may well be ways around this problem and I hope that anyone who has tried to deal with will add come info on how they have done it, but it's not something that the query tool will give you.