Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
crichter14
Creator
Creator

If Then Else with SimpleFieldSelect

Qlik Sense only please.

I'm using a formula in the Qlik Sense Extension Simple Field Select:

=IF (TYPE = 'A', 'TYPE A',

IF (TYPE = 'B', 'TYPE B',

IF (TYPE = 'C', 'TYPE C')))


Which is great, I get a checklist box with Type A, Type B and Type C.  Now the users would like an ALL TYPES selection that when the click on it they get TYPE A, TYPE B and TYPE C.  I know that the default when they make no selection is all types, but we're all about the customer service. 

Note there is no data in the TYPE field called "ALL TYPES". 


=IF (TYPE = 'A', 'TYPE A',

IF (TYPE = 'B', 'TYPE B',

IF (TYPE = 'C', 'TYPE C',

TYPE)))

Trying this code doesn't produce a selection for "ALL TYPES" in the extension.  Is there a way to amend this syntax to do this?

Cheryl

Thank you again so much for your help.

2 Replies
mikaelsc
Specialist
Specialist

create an extra table in your data model:

Type          TypeNew

A               A

B                B   

C                 C

A               AllTypes

B               AllTypes

C               AllTypes

and use TypeNew in your simple field select.

"just" ensure that you can only select 1 value... otherwise may confuse some of your users...

jwjackso
Specialist III
Specialist III

Try

='Type '&Concat(Type,' ,Type ')