Qlik Community

Ask a Question

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Join us March 10th, 7 Ways Modern Analytics Can Help You Take Smarter Action. REGISTER NOW
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
Creator III
Creator III

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 II
Specialist II

Try

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