Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
bignadad
Contributor
Contributor

Need the Max of the Average Aggr results

I have the expressions below and they work fine. They get me the Avg and Max values by day for each agent.

My question is how can I get the Max of the Average? which in this case would be 13.0

Avg(
Aggr(
Count(A_Call_Start)/ (Time(Sum(AD_Staffed), 'hh:mm:ss') * 24),
Agent_Date,Agent)) 

Max(
Aggr(
Count(A_Call_Start)/ (Time(Sum(AD_Staffed), 'hh:mm:ss') * 24),
Agent_Date,Agent))
Annotation 2020-05-15 083543.jpg

Labels (2)
11 Replies
sunny_talwar

May be this

Max(Aggr(
  Avg(Aggr(
    Count(A_Call_Start)/ (Sum(AD_Staffed) * 24),
  Agent_Date, Agent)),
, Agent))

or this if you want to use this in the chart and show 13 for all rows

Max(TOTAL Aggr(
  Avg(Aggr(
    Count(A_Call_Start)/ (Sum(AD_Staffed) * 24),
  Agent_Date, Agent)),
, Agent))

 

bignadad
Contributor
Contributor
Author

That actually looked like what I was trying to accomplish but it does not return a result. 

I am using it in a KPI, not the table, just fyi.

sunny_talwar

Does it return any result or does it error out?

bignadad
Contributor
Contributor
Author

It returns no result.

sunny_talwar

What is the dimension from the chart image you shared above? Did you use Agent as dimension or Agent_Date?

bignadad
Contributor
Contributor
Author

Agent

sunny_talwar

That is very strange, would you be able to share a sample where we can see the issue? It is difficult to know what might be going on here without seeing.

bignadad
Contributor
Contributor
Author

Is this good enough for a sample?

I know you were prob expecting a sample qlik sense file but i would have to figure out how to easily do that. I know i could duplicate it and strip out all the sheets but would you need the files that its linking to as well?

sunny_talwar

Yes a qvf file would make it easier to see the issue and try out few things. I don't need files that are loaded in as long as the data is already loaded into the app.