3

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

2
  • I have up voted urs hope to get it back in my answer too an u can accept it too Commented Jun 20, 2015 at 14:18
  • Why is Rank? Is it a table calc? Commented Aug 25 at 3:58

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.