Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

saradhi_it
Contributor II

Evaluate top 1 field and value

Hi Friends,

Please help me out in getting top one sales in desired format.

Thanks,
PRS

sd.jpg

Tags (1)
2 Replies
MVP
MVP

Re: Evaluate top 1 field and value

make a chart with 3 expressions

'Product'

FirstSortedValue(Product, -Sales)

max(Sales)

1.png

maximiliano_vel
Contributor III

Re: Evaluate top 1 field and value

Products:

LOAD * INLINE [

Product, Sales

a, 10

b, 20

c, 20

d, 50

e, 20

f, 10

g, 10

h, 200

i, 300

j, 100

k, 150

];

NOCONCATENATE

Pro:

LOAD Product,

     Sales

RESIDENT Products

ORDER BY Sales DESC;

LET vMaxProduct = Peek('Product', 0, 'Pro');

LET vMaxSales = Peek('Sales', 0, 'Pro');

DROP Tables Products;