4 Replies Latest reply: May 26, 2011 4:49 AM by Byron Van Wyk

# Distinct Count but Sum Total

Hi All,

I was busy creating a test QV document to load as I couldnt find a way to get to the answer I was looking for. When creating the document I managed to figure a way out but it looks messy and Im wondering if there is a better way to do this.

I have attached the QVD with an inline list of what my data looks like.

The Question:

----------------------------------

Agents are logged onto multiple skillsets simulataneously, the logged on time for each skill set would be the same because of this. I want to know what the accumulated logged on time is for an interval of time for all agents logged in. Taking into account that I need the (MAX) logged on time for each agent, not the combined for each agent for each interval.

Cheers,

Byron

• ###### Distinct Count but Sum Total

I'm not sure, if I have understood you right but maybe the following formula is what you are looking for?

• ###### Distinct Count but Sum Total

Thanks, this did get me the same answer. Do you mind elaborating a bit on what the aggr function actually does. I tried to use this in my live report and it did not aggregate correctly.

Thanks for your assistance in this regard

Cheers,

Byron

• ###### Distinct Count but Sum Total

Hi Byron,

Aggregation function helps to sum the data based on Dimensions.

In a setanalysis expression, two sums cannot be used

Ex: sum(sum(...)

sum(aggr(max(LoggedOnTime),AgentName))

gives the sum of ( sum of maximum of LoggedOnTime based on dimension AgentName)

Hope that helps

Sravan

• ###### Distinct Count but Sum Total

That expains it very nicely. Thank you Sravan