First, calculate the number of tickets by category for the week:
yoursearchhere
| stats count by category
To get the average number of tickets across all categories
yoursearchhere
| stats count as Tickets by category
| appendpipe [ stats count as numCategories sum(Tickets) as TotalTickets
| eval Tickets = round(TotalTicket/numCategories,2)
| fields Tickets | eval category="* Average number of tickets" ]
There are several ways to do this, but I think that this looks best. If you want to do this week-by-week:
yoursearchhere
| timechart span=1w count as Tickets by category
| addtotals
| appendpipe [ stats sum(*) as * count as TotalWeeks
| foreach * [eval '<<FIELD>>'=if(isnum('<<FIELD>>'),round('<<FIELD>>'/TotalWeeks,2),"") ]
| fields - TotalWeeks | eval category="* Average number of tickets" ]
HTH!
... View more