I am trying to create a Wrapup Data report from TCD, at the moment I have it just showing with all the WrapupData in the one column so it looks like this
Agent Name WrapupData
Sarah Barnes No Sale
However I want to show the following as counts, so that they can see how many times an agent has basically chosen a certain wrap code.
Agent name No Sale Pepeat Caller
Sarah Barnes 2 2
If anyone out there has created such a report then, I would be grateful for any tips.
You'll have to get a little creative with SUM and CASE statements. Here's a starting point:
SELECT TOP 8001 -- I add the "TOP 8001" to all of my custom Historical reports so none of them get too out of hand, but still give an error to the user if too much data exists
SUM(CASE WrapupData WHEN 'No Sale' THEN 1 ELSE 0 END) AS NoSale,
SUM(CASE WrapupData WHEN 'Repeat Caller' THEN 1 ELSE 0 END) AS RepeatCaller,
-- Repeat as necessary for the wrapups you would like to track.
-- All your other bits here... AgentSkillTargetID, Agent Name, etc.
-- Everything that's not one of the SUM statements
The SUM/CASE combo will count the number of times each of the chosen strings occur.
Thanks Jameson, Finally managed to create my report and it works.
Much appreciate your replies to all my questions, they have been very useful.
Please sign in to leave a comment.