Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

getting top Traderid by orders

Hi have Created a table report show Trader wise no of Orders as given below:

traderid.png

i want to get the top traderid who have maximum number of Orders and display that Traderid into Lable or want to use that Traderid in set Analysis.

Please Help.

Thanks in Advance

1 Solution

Accepted Solutions
kumarnatarajan
Partner - Specialist
Partner - Specialist

Hi,

try this one.

Ex: = Only({$<Traderid={"=Count(MsgKey) = vMaxcount"}>}Traderid)

set below syntex to vMaxcount variable

=max(aggr(Count(MsgKey),Traderid))

find the attached file

View solution in original post

8 Replies
Sokkorn
Master
Master

Try this =Only({$<Orders = {$(=Max(Orders))}>} TraderID)

Not applicable
Author

the Orders field is actually a expression Count(MsgKey) and the MsgKey is combination of Mumber and Character

sushil353
Master II
Master II

Hi,

Try this:

firstsortedvalue(TraderId,-Count(Msgkey))

if you are getting traderid for minimum count then remove the minus "-" sing from Count(Msgkey).

HTH

Sushil

Not applicable
Author

That is not working, in table box i am getting nothing '-'

sushil353
Master II
Master II

Please share the sample app

Not applicable
Author

Please find attached file

kumarnatarajan
Partner - Specialist
Partner - Specialist

Hi,

try this one.

Ex: = Only({$<Traderid={"=Count(MsgKey) = vMaxcount"}>}Traderid)

set below syntex to vMaxcount variable

=max(aggr(Count(MsgKey),Traderid))

find the attached file

Not applicable
Author

Thanks.. Natarajan..   Its Working Fine...