Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi ,
Can anyone help me in finding
Max Item_Sold made by the salesman in each company?
Result is given below in the table.
Company | Sales_Man | Iteam_Sold |
Senthil SADANANDAM | CLA | 15 |
Christophe BORDAIS | GOL | 35 |
Rameela SEEWOOSUNGKUR | LOI | 1 |
Dani REUTER-GUHL | QUO | 7 |
George EYEROOR | SES | 6 |
For Input please find the attachment.
And If you want to exact outcome use this
First Expression
FirstSortedValue(Sales_Man, -Aggr(Sum(Iteam_Sold), Sales_Man))
Second expression same in above
Sorry the result I want is
Company | Sales_Man | Iteam_Sold |
CLA | Senthil SADANANDAM | 15 |
GOL | Christophe BORDAIS | 35 |
LOI | Rameela SEEWOOSUNGKUR | 1 |
QUO | Dani REUTER-GUHL | 7 |
SES | George EYEROOR | 6 |
May be this?
FirstSortedValue(Iteam_Sold, -Aggr(Sum(Iteam_Sold), Sales_Man))
And If you want to exact outcome use this
First Expression
FirstSortedValue(Sales_Man, -Aggr(Sum(Iteam_Sold), Sales_Man))
Second expression same in above
Thanks, Anil
It's working fine
Excellent, Please close this thread by flag of Correct Answer
Qlik Community Tip: Marking Replies as Correct or Helpful
Hi,
I prefer creating a flag in the script. You have more control over the output and also it is easier to debug.
Check the attach.
Regards,
David