Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

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

1 Solution

Accepted Solutions
yasus
Contributor III
Contributor III

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

s1.JPG

View solution in original post

4 Replies
yasus
Contributor III
Contributor III

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

s1.JPG

Not applicable
Author

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

Not applicable
Author

Hi Byron,

Aggregation function helps to sum the data based on Dimensions.

In a setanalysis expression, two sums cannot be used

Ex: sum(sum(...)

so in your example

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

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

Hope that helps

Sravan

Not applicable
Author

That expains it very nicely. Thank you Sravan