Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

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
Valued Contributor

Re: getting top Traderid by orders

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

8 Replies
Sokkorn
Honored Contributor

Re: getting top Traderid by orders

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

Not applicable

Re: getting top Traderid by orders

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

sushil353
Honored Contributor II

Re: getting top Traderid by orders

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

Re: getting top Traderid by orders

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

sushil353
Honored Contributor II

Re: getting top Traderid by orders

Please share the sample app

Not applicable

Re: getting top Traderid by orders

Please find attached file

kumarnatarajan
Valued Contributor

Re: getting top Traderid by orders

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

Re: getting top Traderid by orders

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

Community Browser