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: 
smilingjohn
Specialist
Specialist

group

Hi ALl

Hi i have a field name called lstatus and it has many type of status in it i wanted to grupou the below mentioned status as Close and other should be as it is

if(match(Lstatus('Closed','Cannot-Re-Create','Working-As-Designed','Training','Duplicate','Obsolete','Further-Discussion-Required'),'Close',LStatus

Can someone please suggest me on this ?

1 Solution

Accepted Solutions
sunny_talwar

May be this

if(WildMatch(Status,'New'), 'New',

        if(WildMatch(Status,'In Progress'), 'In Progress',

        if(WildMatch(Status,'Resolved'), 'Resolved',

        if(WildMatch(Status,'Test'), 'Test',

      if(WildMatch(Status,'*Blocked-*'), 'Blocked',

     if(WildMatch(Status,'Failed'), 'Failed',

     if(WildMatch(Status,'Code Review'),'Code Review',

     if(WildMatch(Status,'SCCB'),'SCCB',

     if(WildMatch(Status,'Closed','Cannot-Re-Create','Working-As-Designed','Training','Duplicate','Obsolete','Further-Discussion-Required'),'Close' ))))))))) as Lstatus,

View solution in original post

12 Replies
Anil_Babu_Samineni

Here you go?

if(match(Lstatus,'Closed','Cannot-Re-Create','Working-As-Designed','Training','Duplicate','Obsolete','Further-Discussion-Required'),'Close',LStatus)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
arvind_patil
Partner - Specialist III
Partner - Specialist III

Hi John,

Try Below one:

if(Wildmatch(Lstatus,'Closed','Cannot-Re-Create','Working-As-Designed','Training','Duplicate','Obsolete','Further-Discussion-Required'),'Close',LStatus) as FinalStatus

Thanks,

Arvind Patil

balar025
Creator III
Creator III

Try ApplyMap function.

StatusMapping:

Mapping Load * Inline

[

Status,Status1

Closed,Close

Training,Close

];

Data:

Load

LStatus,

ApplyMap('StatusMapping',LStatus,LStatus) as NewStatus;

Load * Inline

[

LStatus

Closed

Training

Open

];

smilingjohn
Specialist
Specialist
Author

It is giving is giving me the error  for below script

if(WildMatch(Status,'New'), 'New',

        if(WildMatch(Status,'In Progress'), 'In Progress',

        if(WildMatch(Status,'Resolved'), 'Resolved',

        if(WildMatch(Status,'Test'), 'Test',

      if(WildMatch(Status,'*Blocked-*'), 'Blocked',

     if(WildMatch(Status,'Failed'), 'Failed',

      if(WildMatch(Status,'Failed'), 'Failed',

     if(WildMatch(Status,'Code Review'),'Code Review',

     if(WildMatch(Status,'SCCB'),'SCCB',

     if(WildMatch(Status,'Closed','Cannot-Re-Create','Working-As-Designed','Training','Duplicate','Obsolete','Further-Discussion-Required','Close',))))))))))as Lstatus,

balar025
Creator III
Creator III

Have you tried below script?

StatusMapping:

Mapping Load * Inline

[

Status,Status1

Closed,Close

Training,Close

];

Data:

Load

LStatus,

ApplyMap('StatusMapping',LStatus,LStatus) as NewStatus;

Load * Inline

[

LStatus

Closed

Training

Open

];

sunny_talwar

May be this

if(WildMatch(Status,'New'), 'New',

        if(WildMatch(Status,'In Progress'), 'In Progress',

        if(WildMatch(Status,'Resolved'), 'Resolved',

        if(WildMatch(Status,'Test'), 'Test',

      if(WildMatch(Status,'*Blocked-*'), 'Blocked',

     if(WildMatch(Status,'Failed'), 'Failed',

     if(WildMatch(Status,'Code Review'),'Code Review',

     if(WildMatch(Status,'SCCB'),'SCCB',

     if(WildMatch(Status,'Closed','Cannot-Re-Create','Working-As-Designed','Training','Duplicate','Obsolete','Further-Discussion-Required'),'Close' ))))))))) as Lstatus,

Chanty4u
MVP
MVP

Bro just wanted to know  is it works or anything ?Sunny Talwar

instead of this if conditions can we create a inline table like   below?  

load * inline[

status,value

new, ,,,

...

,..............];

sunny_talwar

Are you asking me?

balar025
Creator III
Creator III

Not advisable to use long if conditions.