Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Using Nested IF's in a chart

How I can nest these two If's


=if('Definition' & chr(10) & 'ABT-KEY' =above('Definition' & chr(10) & 'ABT-KEY'),'','Bezeichnung' & chr(10) & 'ADT-Schlüssel')



= if(len(O_POSITION.TEXTLANG)<30
,
capitalize(O_POSITION.TEXTLANG) & chr(10) & chr(10)& ABT_KEY
,
capitalize(O_POSITION.TEXTLANG) & chr(10) & ABT_KEY
)


1 Solution

Accepted Solutions
stevedark
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi there,

I'm not sure which way around you want to nest the if statements, but it should be something like this:

=if(Field = 'A', 'Field is A', if(Field = 'B', 'Field is B', 'Field is not A or B'))

Suggest using line breaks, and putting chunks of code into variables, to make things more readable.

Cheers,
Steve

View solution in original post

2 Replies
Not applicable
Author

I will make it a little simple

if there are two if statements in an expression of a chart like this


if(x= above(X),'',X
and if(y>50,'+','-')


How can u combine and write so that both if's will work and the syntax is correct

Thanks

sravan

stevedark
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi there,

I'm not sure which way around you want to nest the if statements, but it should be something like this:

=if(Field = 'A', 'Field is A', if(Field = 'B', 'Field is B', 'Field is not A or B'))

Suggest using line breaks, and putting chunks of code into variables, to make things more readable.

Cheers,
Steve