Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

ashishbp
New Contributor

New field creation using existing field

Hello Friends,

Can any one tell me how to show in front end filter Status= Active , Inactive , All.

There is field in database as Status = Y, N .  I want to show third field also 'All'

Thanks

AP

6 Replies
ChennaiahNallani
Contributor III

Re: New field creation using existing field

Try this

if(Status = 'Y','Active',if( Status = 'N','Inactive','All'))  as Field Name

ashishbp
New Contributor

Re: New field creation using existing field

thanx for your response,

but if i am doing like that, I'm not able to see third field in filter it show only two fields

ChennaiahNallani
Contributor III

Re: New field creation using existing field

can you share sample data

ashishbp
New Contributor

Re: New field creation using existing field

LOAD * INLINE [

    FIELD, STATUS

    ABC, A

    EFG, A

    HIJ, I

    KLM, A

    NOP, I

];

//STATUS A=ACTIVE, STATUS I= INACTIVE , STATUS A & I= ALL

ChennaiahNallani
Contributor III

Re: New field creation using existing field

if status contains both A& I you want show 'All' right

MVP
MVP

Re: New field creation using existing field

The best QV practice is to train your users that no selections = All, but failing that, you will have to load some additional data. Something like

StatusDim:

LOAD * Inline

[

    Status, StatusDim

    Active, Active

    Inactive, Inactive

    Active, All

    Inactive, All

];

and use StatusDim in your listbox/filter