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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
gzboy008
Contributor
Contributor

How to return original value in "if" function

Hello everyone,

May I know is there any functions can instead of "if" function? What I need to do is similar to "if" function, but "if" function can't return original value.

Please have a look my example:

My formula is:

if(epx>500,500,epx)

but exp here is a complicated formula, so copy epx will cause a large amount of repeated coding.

Is there any functions can retrieve the original value and acting similar as "if" function?

Thanks~

1 Solution

Accepted Solutions
alexandros17
Partner - Champion III
Partner - Champion III

If epx is a formula computed in another column (for example Col1) you can hide Col1 and use it as an expression, in this way your if will be:

if([Col1]>500, 500, [Col1])

(Hideing a column doesn't work with pivot graph.

Only an idea but hope it helps

View solution in original post

2 Replies
alexandros17
Partner - Champion III
Partner - Champion III

If epx is a formula computed in another column (for example Col1) you can hide Col1 and use it as an expression, in this way your if will be:

if([Col1]>500, 500, [Col1])

(Hideing a column doesn't work with pivot graph.

Only an idea but hope it helps

gzboy008
Contributor
Contributor
Author

It's a great solution. Thanks so much~