Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am trying to get the top 10 customers based on their sales and i have this function :
sum({$<DataType=("ACTUAL"), [Customer] = {"=Rank(sum([Weight (Tn)])<=10"}>} [Weight (Tn)])
that gives me as a result zero (0).
What i do wrong?
May be like this
sum({$<DataType=("ACTUAL"), [Customer] = {"=aggr(Rank(sum([Weight (Tn)])<=10,Customer)"}>} [Weight (Tn)])
unfortunately it gives the same result
where are you using that expression?
Can you share the sample app
As a value in a selection button
Hi,
Try this:
sum({$< DataType = ('ACTUAL'), [Customer] = {'=Rank(Sum([Weight (Tn)]),4) <=10'}>} [Weight (Tn)])
The second argument (where I used 4) is assigning it incremental value as oppose to same rank for the same value.... check out the arguments for Rank here. Explanation is by @sunny_talwar .
Jordy
Climber
Now it works if i put it as a measure in a table:
=(sum({$<[Customer] = {'=Rank(Sum([Weight (Tn)])) <=10'}>} [Customer]))
thank you all
Correction
=(sum({$<[Customer] = {'=Rank(Sum([Weight (Tn)])) <=10'}>} [Weight (Tn)]))