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: 
evansabres
Specialist
Specialist

If Statement

I am trying to create an IF statement as an expression. I have an expression titled 'Remaining Capacity %'

 

I want to create an IF Statement that says, IF([Remaining Capacity %]) <= 20%, $10)

I cannot seem to get the format of the expression correct.

1 Solution

Accepted Solutions
trdandamudi
Master II
Master II

Use the below expression:

if([Remaining Capacity %] <='20%',10)

And then to show the '$' before 10, go to "Number" tab and select "Money"

 

Format.PNG

View solution in original post

5 Replies
trdandamudi
Master II
Master II

How about the below expression:

IF( [Remaining Capacity %] <= 20%, $10 )

 

 

evansabres
Specialist
Specialist
Author

I tried that, as well as placing the 20% in quotes. I was attempting to pass through the name of the expression instead of using the full equation, however I can use that method for the time being. Thanks for your help.

trdandamudi
Master II
Master II

How does the value looks like in the field [Remaining Capacity %] ? Can you share few values ?

evansabres
Specialist
Specialist
Author

The output is a percentage. The expression behind Remaining Capacity % is =(([Remaining Capacity])/([plCAP]))

trdandamudi
Master II
Master II

Use the below expression:

if([Remaining Capacity %] <='20%',10)

And then to show the '$' before 10, go to "Number" tab and select "Money"

 

Format.PNG