Discussion board where members can get started with QlikView.
I have product name and sales, I want to show highest sale and product name in text box . how can i achieve please help me.
Go to Solution.
Use the aggr() function. For example, if you do not want to make any further distinction (between years, or just for last or current year etc.), you can use this one to get the maximum sales:
If you want to know the name of the product that did best, use this expression:
=FirstSortedValue(Product, -Aggr(Sum(Sales), Product))
If you want to find out why and how this works, you can read this highly instructive treatment: QlikView Technical Brief - AGGR.docx
You may use the following expression:
if ([highest sale]= max ([highest sale]), [product name] & ':' & [highest sale])
For Product -
= firstsortedvalue(Product, Sales)
= firstsortedvalue(Product, -Sales)
i have top 2 product which has highest amount i use your query but this shows nothing
Hi need help
FirstSortedValue(Product,aggr(sum(Sales),Product)) is not returning any name though FirstSortedValue(Product,-aggr(sum(Sales),Product)) is giving me the minimum sales product
PFA of the finance file used