Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
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

Re: If statements with multiple conditions

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!

3 Replies
Employee
Employee

Re: If statements with multiple conditions

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

Re: If statements with multiple conditions

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!

Employee
Employee

Re: If statements with multiple conditions

Could you post a qvw?

Community Browser