Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Min of multiple Columns

Hi everybody,

Another day, another qlikview problem....

Thanks for everybody wi'll help me.

I want to get the minimum value of 4 columns : here is the example

Scenario 1 :

in 'F' Field (fields of excel) i want the minimum value  of {Seuil 1, Seuil 2, seuil 3, Seuil 4} but in this case i dont want 0 because all

'Seuil' values are not equal to zero. to summurise i want in this scenario the minmum value not null of {Seuil 1, Seuil 2, seuil 3, Seuil 4}

qlik.PNG

Scenario 2 :

qlik2.PNG

In in this case, i want in 'F' field zero 'o' because all the Seuil 1=0, Seuil 2=0, seuil 3=0, Seuil 4=0} equal to zero

Hope that i explain my problem clearly

Thanks

1 Solution

Accepted Solutions
qlikmsg4u
Specialist
Specialist

Hi teneman,

with little tweak i'm able to do your requirement, I don't know if it is useful for you or not

noval.png

what i did was replacing 0 value with Null string and finally doing RangeMin

View solution in original post

11 Replies
Not applicable
Author

Oh i forget, i tried RangeMin like on the example but it doesnt work, thanks

sasiparupudi1
Master III
Master III

Please post your application here.

anat
Master
Master

in "Scenario 1 : " what will be the expected output ?

Not applicable
Author

0,5

sasikanth
Master
Master

HI,

Try some thing like this

if(  RangeMin(Column(1),Column(2),column(3),Column(4))<>'0',RangeMin(Column(1),Column(2),column(3),Column(4)))

or else

if( not isNull( RangeMin(Column(1),Column(2),column(3),Column(4)) ),RangeMin(Column(1),Column(2),column(3),Column(4)))

Not applicable
Author

hI

florentina_doga
Partner - Creator III
Partner - Creator III

HI,

Try some thing like this

    if(column(1)<>0,

        if(column(2)<>0,

            if(column(3)<>0,

                if(column(4)<>0,

                    rangemin(column(1),column(2),column(3),column(4))

                    ,rangemin(column(1),column(2),column(3)))

            ,if(column(4)<>0,

                rangemin(column(1),column(2),column(4))

                ,rangemin(column(1),column(2))))   

        ,if(column(3)<>0,

            if(column(4)<>0,

                rangemin(column(1),column(3),column(4))

                ,rangemin(column(1),column(3)))

        ,if(column(4)<>0,

                rangemin(column(1),column(4))

                ,rangemin(column(1),))))

    ,

    if(column(2)<>0,

            if(column(3)<>0,

                if(column(4)<>0,

                    rangemin(column(2),column(3),column(4))

                    ,rangemin(column(2),column(3)))

            ,if(column(4)<>0,

                rangemin(column(2),column(4))

                ,rangemin(column(2))))   

        ,if(column(3)<>0,

            if(column(4)<>0,

                rangemin(column(3),column(4))

                ,rangemin(column(3)))

        ,if(column(4)<>0,

                rangemin(column(4))

                ,0))))

qlikmsg4u
Specialist
Specialist

Hi teneman,

with little tweak i'm able to do your requirement, I don't know if it is useful for you or not

noval.png

what i did was replacing 0 value with Null string and finally doing RangeMin

Not applicable
Author

thanks a lot

that what i  want,, except that when all the seuil= Null i want Min= '0' and not '-'

Do you know how to get that ? thx