Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a bar chart with count(ID) as expression and yearMonth as dimension. I would like to get the sum of top n (for example top 10) numbers (by yearmonth) in that expression. Is this possible? Thanks
HI
Please see the attached file. Hope you can see the difference
HI
Use rank function in expression or dimension limit in dimension tab..
Hope that helps
Thank you for your helps. I have no idea of how to use Rank function to get sum of top n values of expression! Could you give me some detailed instruction?
Hi
Try like this
=if(aggr(rank(MonthName)<=10,MonthName), MonthName) in dimension
or
MonthName as dimension
Use if(rank(Count(ID)) <= 10, count(ID))
Edit:
For more information about rank function, please refer the manual or help..
Hope that helps
Still cannot get it to work. I get sum of all the count values by using if(rank(Count(ID)) <= 10, count(ID)). Although we have a condition of rank(Count(ID)) <= 10, but I think Count(ID) still return sum of all the count value. What I need is the sum of top n-1 values. Please refer to my sample file. Thanks
HI
Please see the attached file. Hope you can see the difference
Big thanks. It works fine. Is there any way I can get the sum of FIRST (not TOP) n-1 count values? I realized that I had not asked correct question when I saw your solution. I do apologized for this.
HI
By using dimension limit option, you can set first n values.
I can show the first n counted values. What I really need is to know is how to get SUM of the first n and last n counted values. If I can store this two sums in two different variables, that will be ideal. Still need your advice. I tried FIRST function, no success so far. Thanks.
HI
Try like this
= Count(YearMonth={"=Rank(Count(ID))<=10)"}>}ID)
Hope that helps