Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
Can anyone tell me what the error is I made in this calculated dimension:
Thanks for your help
=if(aggr(rank(Sum( {$<[COPA.Fiscal Year]= {$(=max([Calendar.Year])-1)},COPA.Period= {'*'} >} [COPA.Niko Act Gross Sales incl Projects Rebates NL/FR] )), GeneralCustomerMasterData.Customer Name&Code,NikoProductlineGroups.ProductlineDescription2) <=15, GeneralCustomerMasterData.Customer Name&Code,Null())
Kind regards,
Guy
You are trying to compare the result of function AGGR() with 15... AGGR() returns an array of values, not a single value, and that's most likely the cause of the problem.
Also, if thie is a field name: GeneralCustomerMasterData.Customer Name&Code , then I suspect it needs to be enclosed in square brackets, because of spaces and special characters.
If you are trying to create a "Top 15" chart, there are many easier ways of doing it:
1. If you sort your chart by Sales, you can then limit the Chart to 15 values.
2. As an alternative, you can use Customer as your dimension, and then in your expression you can define a Set Analysis condition that would search for Customers that have a rank <=15 - then you won't need to use AGGR()
cheers,
The aggr() function must be "outside". And, you didn't specify by what to aggr. Here I assume by Customer Name and Code:
aggr( if(<your condition which I don't have time to verify>, "GeneralCustomerMasterData.Customer Name"&Code), "GeneralCustomerMasterData.Customer Name",Code)