Friday, October 12, 2007

Pivot tableness is next to godliness

Today was a metrics day. A couple of years ago I did a bunch of work pulling data from our OpenView service desk application at the request of my hiring manager. (the schema - or lack thereof - would have been enough to scare me off otherwise)

Anyway. I managed to puzzle out a rough idea of what I was after using a data dictionary and after much weeping, wailing, and gnashing of teeth pulled some very unique data. (unique as in "they couldn't get it anywhere else", not as in "hmm..that's a...unique...data set. No relation to reality but definately unique.")

I've done a few small commando jobs for my current manager. So back into the fray I go. Fortunately, past experience and a hefty library of already-configured DTS jobs (to pull from the oracle back end) made it the work of only one day.

Pop the saved data out to a .csv. Load up excel. Create the pivot table.

Curse at the few odd lines that don't have valid dates and therefore muck with the grouping functionality.

Fix the description fields that have embedded carriage returns and therefore totally muck up the text export.

**the following perlscript snippit from the DTS transform does a marvelous job fixing the above issue, by the way:

Original line (referencing the field in question with the embedded returns)
$DTSDestination->Item("SER_DESCRIPTION")->{Value} = $DTSSource->Item("SER_DESCRIPTION")->Value;

Modified perl transformation script line:
$temp = $DTSSource->Item("SER_DESCRIPTION")->Value;
$temp =~ s/\n//g;
$temp =~ s/\r//g;
$DTSDestination->Item("SER_DESCRIPTION")->{Value} = $temp;

Simple. Nifty. Works.

Where was I? Oh yeah. Finally get the raw data into a pivot table and within 5 minutes the data is singing. (what, I don't know) Want to know how many raw tickets we processed, broken down by month, with a 12 month moving average?

BOOM! POOF! ALAKAZAAAAAMMMM!! (well, about six clicks, actually)
Average time to resolve tickets over the same period, broken out by Tier 1, 2, and 3 groups?

FHAWOOMPUS! (three clicks)

No, I'm not showing my work. You'll just have to trust me on this one.

Come to think of it, I actually happen to have a pivot table tutorial (disguised as instructions on how to pull VSS metrics) that might be helpful. I'll have to get on that...

0 comments: