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

execution of two conditions simultaneously in if

hi

is it possible to execute two conditions simultaneously in if ??

for example

i have a dimension name and measure salary in my chart....

i want to execute a expression

if(name='ram',sum(salary)and concat(name,'Y'))

This is just an example,i just want to know is it possoble????

5 Replies
Miguel_Angel_Baeyens

Hi,

What you can do is create two expressions, that have in the true part the expression:

If(name='ram', sum(salary))

and

If(name='ram', concat(name,'Y'))

Even better using set analysis:

Sum({< name = {'ram'} >} salary)

But please elaborate on yoru actual needs. Note that in QlikView both field names and values are case sensitive, so "ram" is not the same as "RAM".

Hope that helps.

Miguel

Not applicable
Author

hi

Miguel,

its not working when i am using and conditions between teo if conditions.

if(rowno()>11,rangesum(above(sum(total salary),0,rowno(total)))))

and

if(rowno()>11,rgb(247,0,0))

its not wrking and its displaying -1 for every row.

Miguel_Angel_Baeyens

Hi,

Are those different expressions in different columns?

Miguel

Not applicable
Author

no its a single expression used in a single column.

swuehl
MVP
MVP

Use the first if() statement only in a chart expression.

Your second if() statement is returning a color value, so you probably want to use it in a text or backgrounf color attribute expression (open the attributes by clicking on the plus sign next to the expression name in expression tab).