Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Case statement

Hello.

Does anyone know if there is a 'CASE' function in QlikView which evaluates a list of conditions and returns one of multiple possible result expressions ?

I need to do several 'IF()' within the same expression and I'm looking for an easy way to do it.

Thank you very much.

3 Replies
perumal_41
Partner - Specialist II
Partner - Specialist II

Hi,

Please post ur Expression.

Not applicable
Author

Hi ,

if you are working at the script level then check for

Switch Functionality in Qlikview Help..

Switch..case..default..end switch

else if you are working to write in expression then check check for

ALT  function

Not applicable
Author

In fact, I try to put 6 IF() functions in one expression which will be used in a dimension :

if(GetSelectedCount(Field1) > 0, Field1)

if(GetSelectedCount(Field2) > 0, Field2)

if(GetSelectedCount(Field3) > 0, Field3)

if(GetSelectedCount(Field4) > 0, Field4)

if(GetSelectedCount(Field5) > 0, Field5)

if(GetSelectedCount(Field6) > 0, Field6)