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

I need a function returns zero if the number of negative

I need a function returns zero if the number of negative.

EX: -25 = 0

       30=30

     -35=0

Thank you

5 Replies
anbu1984
Master III
Master III

=If(Field > 0,Field,0)

rogeriobarbosa
Contributor II
Contributor II
Author

Hello Thanks for the reply , but do not want to use one if I would like a function to do that

simondachstr
Luminary Alumni
Luminary Alumni

(fabs(Field)+Field)/2

rubenmarin

rangemax(0, Field)

Not applicable

Maybe you could use the fabs function:

=(fabs(X)+X)/2

This way you get 0/2 if negative and 2X/2=X if positive.