Reputation: 21
I am trying to concatenate country with its rank based on sales in if condition like
IF [TOP 20 COUNTRIES] THEN [COUNTRY]+[RANK] ELSE "OTHERS"
here I am getting error saying can not mix aggregate and non aggregate fields in if condition. then I tried like
IF ATTR( [TOP 20 COUNTRIES] ) THEN ATTR([COUNTRY])+[RANK] ELSE "OTHERS"
then also I am getting error saying Boolean can not aggregate.
Here [TOP 20 COUNTRIES]
is SET of Top 20 countries based on SALES
please help me in this
Upvotes: 2
Views: 8821
Reputation: 3288
The problem is to mix aggregated arguments (e.g., sum, count) with non aggregate ones (e.g., any field directly). And that's what you're doing mixing aggregated arguments non aggregate ones.When creating a calculated field, you may see a “Cannot mix aggregate and non-aggregate arguments to function” error message. This message displays when a calculation contains a mix of disaggregated values and aggregated values. Aggregations allow you to look at numerical data in some sort of summary form, such as sum and average.
Upvotes: 0