Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

If statements with multiple conditions

I put this expression into a Text Object text expression box and says the Expression is Ok, but the correct image does not display based upon the Column2 value.  I have the Image selected from the Representation drop down in the General tab.

Column1 has 8 different variables (A, B, C, D, etc) and Column2 has 1, 2, 3 which corresponds with the direction of the arrow.

=if(Column1='A' and Column2=1,'qmem://<bundled>/BuiltIn/arrow_n.png',

  if(Column1='A' and Column2=2,'qmem://<bundled>/BuiltIn/arrow_e.png',

  if(Column1='A' and Column2=3,'qmem://<bundled>/BuiltIn/arrow_s.png')))

1 Solution

Accepted Solutions
Not applicable
Author

I put the expression in the Load statement then named it as Trend1 and made the expression to =Trend1.  I did this for multiple trends with different numbers (directions) and it worked great!

View solution in original post

3 Replies
Clever_Anjos
Employee
Employee

If you´re using a Text Object maybe you should use some sort of aggregation.

A text object does not provide a dimension so all values of Column1 and Column2 are evaluated so your expression will always return null

Not applicable
Author

I put the expression in the Load statement then named it as Trend1 and made the expression to =Trend1.  I did this for multiple trends with different numbers (directions) and it worked great!

Clever_Anjos
Employee
Employee

Could you post a qvw?