Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how to get second top value in column

I want to get the value which is in second top most values like

Date Column

12/02/2011 10:25

20/02/2011 2:55

25/02/2011 3:12

28/02/2011 12:45

and also i want to get difference in min of them like

A) Second value is 20/02/2011

B) Difference of them is like (20/02/2011-12/02/2011)

Please tell me how can i get it.

5 Replies
Not applicable
Author

Hi,

you could try interrecord functions like before and after.

How do you prepare your data? How do you want to visualize it?

If you could upload an application, it would be helpfull.

HTH

SunilChauhan
Champion
Champion

hello sir,

clear requirement is like this

i have a table as

cust id time

101 10:24

101 10;25 -------------------> this one would be desired result

101 10;26

102 10:24

102 10;25 -------------------> this one would be desired result

102 10;26

i mean i want to to second item from table

thanks

Sunil Chauhan
Not applicable
Author

Hi,

I transformed your values in an Excel file.

Then used the loadscript:



SCNDVALUE:

LOAD

custid,

runtime

,

if

(previous(custid)<>custid,1,peek(myline)+1) as myline

FROM

..\second_value.xlsx

(

ooxml, embedded labels, table is

Table1);

then i used a chart - table and build an expression:



sum

({$<zeile={2}>}laufzeit)-sum({$<zeile={1}>}laufzeit)

So you get the Delta-information from the Second minus the first value...

It can be extended as you want 🙂

HTH



christian77
Partner - Specialist
Partner - Specialist

Hi:

Check the new share qv post, Any Value from Any Column and you will find some answers. I hope this solve your problem.

christian77
Partner - Specialist
Partner - Specialist

Even more. Check for Any Value, from Any Column Anywhere.