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: 
d_koti24
Creator II
Creator II

Regardsing min(exp) issue

Hi all,

i Have a field netvalue, that filed contains the values like this :netvalue

                                                                                             0

                                                                                             15

                                                                                              52

                                                                                              90

my requirement is if i use min(netvalue) ,i am getting 0,but i dont want 0,instead of i want second min value i.e 15.i am writeing this exp in text obj,

please help me on this.

regards,

KD

1 Solution

Accepted Solutions
swuehl
MVP
MVP

=if(isnull(GetCurrentSelections()), min(netvalue,2), min(netvalue) )

View solution in original post

6 Replies
swuehl
MVP
MVP

Try

=min(netvalue, 2)

edit: or if you want the second smallest value only when smallest is zero:

min({<netvalue = {">0"}>} netvalue)

alexandros17
Partner - Champion III
Partner - Champion III

Min(netvalue,2) gives you what you need

rajeshvaswani77
Specialist III
Specialist III

Hi,

You can try the firstsortedvalue function as well.

thanks,

Rajesh Vaswani

d_koti24
Creator II
Creator II
Author

Hi,

Thanks for your reply,

But I have a one problem here,i am using this is in text object.i am not selecting any thing it's working perfectly,

if i select any thing it shows second min value.

my req is default i want to display second min value  in text objcet instead of showing 0,

if select anything i want to show that min value.if i select 0 i want display 0 in that text box.how to achive this.?

regards,

kd

swuehl
MVP
MVP

=if(isnull(GetCurrentSelections()), min(netvalue,2), min(netvalue) )

d_koti24
Creator II
Creator II
Author

Hi,

It's working fine,Thanks for your reply.

regards,

kd