Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
vipin_mishra479
Creator II
Creator II

find order of Max Amount

hi all ,

I have using this expression  to find the max amount

max(aggr(sum({<model = {'SB42'},country = {'India'}>}Amount),Product_Desc,Product_Order)

how i find the max amount Product_Order

9 Replies
kumarnatarajan
Partner - Specialist
Partner - Specialist

Hi,

Try this one

=SUM({$<Product_Order={"=Rank(aggr(sum({$<model = {'SB42'},country = {'India'}>}Amount),Product_Desc,Product_Order))=1"}>}Amount)

Not applicable

try this

max(aggr(sum({<Product_Order=p({1<model = {'SB42'},country = {'India'}>}Product_Order)>}Amount),Product_Desc,Product_Order)

vipin_mishra479
Creator II
Creator II
Author

hi Natrajan,

SB47 BLADE639500378923.32
SB47 BLADE439508917723.28
SB47 BLADE639500378823.15
SB47 BLADE439508917623.10
SB47 BLADE639500379023.07
SB47 BLADE439508926323.03
SB47 BLADE639500379122.91
SB47 BLADE439508901922.87
SB47 BLADE639500379222.78
SB47 BLADE639500379322.74
SB47 BLADE439508905022.73
SB47 BLADE439508905122.70
SB47 BLADE639500379422.49
SB47 BLADE439508930122.45
SB47 BLADE639500379622.42
SB47 BLADE639500379522.40
SB47 BLADE439508934722.37
SB47 BLADE439508930222.36
SB47 BLADE SERVICE KIT43950934120.11
SB47 BLADE SERVICE KIT43950934160.11
SB47 BLADE SERVICE KIT43950934180.11
SB47 BLADE SERVICE KIT43950934140.11
SB47 BLADE SERVICE KIT43950934110.11
SB47 BLADE SERVICE KIT43950934170.11
SB47 BLADE SERVICE KIT43950934190.11
SB47 BLADE SERVICE KIT43950934150.11
SB47 BLADE SERVICE KIT43950934130.11

this is my data formate

i want to bold data on my chart

kumarnatarajan
Partner - Specialist
Partner - Specialist

Hi,

You already post this Discussions. See the below link

http://community.qlik.com/message/344489#344489

vipin_mishra479
Creator II
Creator II
Author

but when i try the given expression in my orignal application is not work thats why i asked aggain what i do in my original exp.

vipin_mishra479
Creator II
Creator II
Author

hi viswaranjan,

actually your expression show me a max amount but i want max amount order

er_mohit
Master II
Master II

TRY

First sorted value in expression

Firstsortedvalue(AmountOrder,-Amount)

or try this concept in script

hope it helps

vipin_mishra479
Creator II
Creator II
Author

thanks for reply mohit

but when i try first shorted value in my script then it show some value is blank

because 2 different order value are same so system is confused that which one is max

er_mohit
Master II
Master II

sum({$<Product_Order=p({$<model = {'SB42'},country = {'India'}>}Product_Order),Amount={">=$(=max(Amount))"}>}Product_Order)