Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Pick the greater of two values (Max Function)

I'm writing an expression where I want to use the greater of two values. I don't think the Max() expression works like I'm used to. Is there a different function to use?

An if statement like this would work, but the problem is that "value" is 6 lines of code that I'd end up having to repeat two times.

If( value > 0, value, 0)

I'd much rather have a function like this

max(value, 0)  so that I only write "value" once.

Any ideas? Thanks!

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Use RangeMax() function. Like:

RangeMax(Value,0)

View solution in original post

2 Replies
tresesco
MVP
MVP

Use RangeMax() function. Like:

RangeMax(Value,0)

Clever_Anjos
Employee
Employee

RANGEMAX(value1,value2)