Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
manojkulkarni
Partner - Specialist II
Partner - Specialist II

Rank Function

Hi Friends,

I need to display top 3 text with there number of occurrences along with sorted by alphabets. Below is the input table with serial no & text description. In the expected result Resolved & Reviewed appear 3 times,so it has to be sorted on alphabets to meet the requirement.

what would be the Rank() function or any other way to achieve ?

1Queried
2Reviewed
3Closed
4Resolved
5Completed
6Queried
7Reviewed
8Closed
9Resolved
10Completed
11Closed
12Resolved
13Closed
14Queried
15Reviewed
16

Queried

Expected Out put : Resolved & Reviewed appear 3 times, but it has to be sorted on basis of alphabets.

Queried4
Resolved3
Reviewed3
8 Replies
Not applicable

Try this

load

secondcolumn as second,

count9secondcoloumn) as count

resident  tablename

group by secondcolumn;

if I am wrong pls hsare us ur application

vinieme12
Champion III
Champion III

Try

if(rank(count(Type),1,3)<=3,rank(count(Type),1,3))

or

count({<Type = {"=rank(count(Type),1,1)<=3"}>}Type)

or

Dual( Count(Type) &' | '& rank(count(Type),1,1)

,count({<Type = {"=rank(count(Type),1,1)<=3"}>}Type)

)

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
manojkulkarni
Partner - Specialist II
Partner - Specialist II
Author

Out put is dynamic & needs to be displayed in Text Object. Others field selections attached to the out put result.

vinieme12
Champion III
Champion III

Try below

=Concat(Distinct  AGGR(if(rank(count(Type),1,3)<=3,Type & ' = ' & rank(count(Type),1,3)) ,Type) ,'' & chr(10))

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
manojkulkarni
Partner - Specialist II
Partner - Specialist II
Author

Vineeth, Not working.

vinieme12
Champion III
Champion III

what exactly does not working mean? an error ? not the expected output??

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
manojkulkarni
Partner - Specialist II
Partner - Specialist II
Author

Not expected Out. We need to show below results in 3 text objects

Expected out put is

Queried4
Resolved3
Reviewed3
vinieme12
Champion III
Champion III

what is it showing now?

try below

=Concat(Distinct  AGGR(if(rank(count(Type),1,3)<=3,Type & ' = ' & count(Type) ,Type) ,'' & chr(10))

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.