Aggr function and rank function will help in that kind in expression. or assign expression to a variable and use it with dollar expansion in expression of the particular field expression.
load data from source with restrictions using sql syntax to load top five values.
As suggested, add a field expressions using RANK and AGGR.
Just remember to add the expressions to the Field Expression box - shown in Yellow below, and not the Column Expressions shown in Red.
To open the Field Expressions, click the down arrow on the filed box and select <Expression> from the list.
Thank you every one. I was using if(AGGR(rank(sum(sales),Vendor)<=5, Vendor) & it did not worked.
Swuehl suggested =aggr( if(rank(sum(Sales))<=5,Vendor), Vendor) and it worked.
Can you pls explain why. I was following the youtube link which I find to be correct. Please comment.
If this is your complete statement then it has an error:
(Count the number of opening and closing parenthesis)
Besides what are you IF'ing here? Are you IF'ing the AGGR statement?
You should AGGR the result of the IF statement as Swuehl suggested.