Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

Using MIN Function in Qlik Sense

I have 3 field columns that I want to use in a Qlik Script.


I tried to type the function as:

MIN(Field 1, Field 2, Field 3)

However, when I begin to type Field 3 - Qlik Sense tells me that my function setup is incorrect.

Do you know how I can setup a MIN function so that I can find the MIN value between 3 field columns?

4 Replies
Highlighted
rsvebeck
Valued Contributor

Re: Using MIN Function in Qlik Sense

Hi


try rangemin() instead.


Robert

Not applicable

Re: Using MIN Function in Qlik Sense

Thank you for providing this answer.

Do you know why MIN() is restricted and RANGEMIN() appears to have more flexibility?

Warm regards,
Vaughn Parker

rsvebeck
Valued Contributor

Re: Using MIN Function in Qlik Sense

They have different purposes. 


min() is in script used when you have a group by clause, and it can take a second parameter if you want second smallest of several values of the same field.


rangemin() will not work on a group by clause and you can not get the second

rsvebeck
Valued Contributor

Re: Using MIN Function in Qlik Sense

[acidentally posted before finishing]


well, their purposes are different and in your scenario rangemin() made more sense.


Robert