Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Missing months/days/week/etc. in group sorts/crosstabs

Status
Not open for further replies.

Cyked

MIS
Jan 15, 2010
29
0
0
US
I want a report to show number of Priority 1 and Priority 2 tickets by month and total each P1 and P2 separately based on date opened.

I want to create a report that will show number of tickets OPENED in each month, but have the report show ALL months regardless. The issue is if there is not data for a particular month nothing is displayed. I want to show those months anyway and have P1 tickets and P2 tickets total to zero.

Is there a way to do this?

Thanks!

 
Didn't finish my thought....

The ultimate goal is to have charts and/or crosstabs created on this basis so every month in the specified range and has totals for each priority of ticket whether the count is zero or not.
 
I think I figured it out...

What I needed was to show the count of Priority 1 and Priority 2 tickets over a 12 month span for a specific application. So for my parameter fields for begin and end I used 1/1/2010 to 12/1/2010 like I had been before. But, before I was saying show me only P1/2 tickets and ONLY those for the specific application the report is for. So my select statement now looks for any ticket within my 12 month date range. Example, my previous select statement only grabbed a few tickets (which meant I had blank months), and the new one grabs pretty much everything, which is a few hundred tickets). Now since it grabs everything I won't have blank months because there are tickets opened every single month.

I created some formulas for P1 tickets, P2 tickets, and P1/2 tickets.

{@P1} = if {PRIORITY_CODE} = "1" and {APP_NAME} = {?Application} then 1
else 0

P2 is similar

{@P1-2} = if {PRIORITY_CODE} = "1" and {APP_NAME} = {?Application} then {@P1}
else if {PRIORITY_CODE} = "2" and {APP_NAME} = {?Application} then {@P2}

So in the crosstab my COLUMNS is {OPEN_TIME} (remember my select statement is getting pretty much anything in my date parameter ranges), grouped monthly. The ROWS is {PRIORITY_CODE} and then the SUM fields I used sum of {@P1-2}.

This ensures I never have blank months because there will always be tickets logged each month.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top