Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
MassicotPSCU
Contributor III
Contributor III

Nested Aggregation for Averages

Is there any way to just take this number in the totals row and put it in a KPI card?  The "Sales and Sales per hour" field is being derived from the following expression. 

=if(IsNull(avg([Sales / Hour])),(count([Sale ID])/sum([Hours])),avg([Sales / Hour]))

Once I have the values, I use the total row to get the average of all the numbers for the given months. When I try to just copy paste this expression into a KPI card, I get a different result. Is there any way to include the average of all months in my expression?

MassicotPSCU_0-1682693240634.png

 

Labels (3)
1 Reply
Chanty4u
MVP
MVP

May b try this 

=avg({<Month= >}[Sales /hour])