Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
QlikWorld, June 24-25, 2020. Free virtual event for DI and DA gurus. Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Contributor
Contributor

Error: Nested Aggregation is now Allowed.

Expectation: Find the average of “Total Sales” and then find how many salespeople have an average order value of less than the overall average sales in each country. Use Dimensions as Country. Use Straight Table

 

The formula being used: 

Sum(
if(
aggr(avg(LineSalesAmount), [Customer Country], [Sales Person])
<
avg(LineSalesAmount)
,1,0))

 

However, I am getting this error "Error: Nested Aggregation is now Allowed." Please guide me to the solution.

1 Reply
Highlighted
Master II
Master II

Re: Error: Nested Aggregation is now Allowed.

Can you give a try on the below expression and see if it works:

Sum(
if(
avg(aggr(LineSalesAmount, [Customer Country], [Sales Person]))
<
avg(LineSalesAmount)
,1,0))