Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
brunolelli87
Creator II
Creator II

Average of a count expression

Hello guys,

The following chart shows me the number of aircraft flying per time, with the following expression and dimension:

//Expression
count({<NCIA={'$(vAirComp1)'}>} DISTINCT KEYI)
//Dimension
HHSI

brunolelli87_1-1618503489106.png

But I have more than 1 day and more than 1 airline (NCIA), and if I don't select one specific date and/or airline (NCIA) the system will calculate all counts for that time, as you can see below:

brunolelli87_0-1618503421414.png

My question is:
How can I show the average of counts? I mean, the average of aircraft flying at that itme.

 

Thank you guys!

1 Solution

Accepted Solutions
GaryGiles
Specialist
Specialist

I believe that you need to use the aggr() function, like this:

Avg(aggr(count(DISTINCT KEYI), HHSI))

View solution in original post

2 Replies
GaryGiles
Specialist
Specialist

I believe that you need to use the aggr() function, like this:

Avg(aggr(count(DISTINCT KEYI), HHSI))

brunolelli87
Creator II
Creator II
Author

Thanks Gary!