Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
nevilledhamsiri
Specialist
Specialist

Highlighting first highest 3 under each Branch

Dear Friends!

If I'am to show first highest three MEs under each depts, how the equation be revised to accommodate said changes.Appreciate if I am provided with a solution!

 

Regards

 

Neville

 

5 Replies
sunny_talwar

May be this

Sum(Aggr(
  IF(Sum(REFUND%) >= Max(TOTAL<BRANCH> Aggr(Sum(REFUND%), ME, BRANCH, REGION), 3), Sum(REFUND%))
, ME, BRANCH, REGION))
nevilledhamsiri
Specialist
Specialist
Author

Hi Sunny,

Once your formula applied three employees are chosen but not in a descending order such as 1st one being the highest refund ratio holder & second being the 2nd highest  etc. Please refer the green coloured column where expected order is not maintained. Should the expression to be amended ?

Thanks

 

 

 

 

 

sunny_talwar

I am not sure I follow your question. Can you explain what is the issue?

nevilledhamsiri
Specialist
Specialist
Author

I need to arrange the highest three people under each Branch such as below. The formula doesn't fix this order, isn't it?

BRANCHMEREGIONSUM(REFUND%)
EHELIYAGODADAYANSABA75%
EHELIYAGODANIMESHSABA45%
EHELIYAGODADILIPSABA40%
    
EHELIYAGODATotal 165%
EMBILIPITIYAKUMARSOU60%
EMBILIPITIYADINESHSOU50%
EMBILIPITIYASILVASOU15%
    
    
EMBILIPITIYATotal 145%
RATNAPURANIMALSABA29%
RATNAPURAHIMANSABA25%
RATNAPURAPIYALSABA15%

 

Brett_Bleess
Former Employee
Former Employee

@sunny_talwar any chance you can circle back and have a last look at the latest post?  Sorry for the bother, but I am not as good as you are at these types of questions.  If anyone else that is a better developer than me has a minute and can check, appreciate it.  Given it is groupings is the part that is throwing me.  Am assuming may need to use AGGR in things, but not sure, so I guess I can toss out the following Design Blog post, as that might help:

https://community.qlik.com/t5/Qlik-Design-Blog/Set-Analysis-in-the-Aggr-function/ba-p/1463822

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.