cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements
Walkthrough Wednesdays
282
Views
0
Helpful
2
Replies
sarbarnes
Enthusiast

WrapupData Report

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

                             Repeat Caller

                             Repear Caller

                             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.

Thanks Sarah

1 ACCEPTED SOLUTION

Accepted Solutions
Jameson Gagnepain
Rising star

Sarah,

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.

FROM Termination_Call_Detail

GROUP BY

-- 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.

-Jameson

-Jameson

View solution in original post

2 REPLIES 2
Jameson Gagnepain
Rising star

Sarah,

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.

FROM Termination_Call_Detail

GROUP BY

-- 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.

-Jameson

-Jameson

View solution in original post

Thanks Jameson, Finally managed to create my report and it works.

Much appreciate your replies to all my questions, they have been very useful.

Thanks Sarah

Content for Community-Ad

This widget could not be displayed.