Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
sunilkumarqv
Specialist II
Specialist II

want only tickets which pending

HI All,

show the the TICKET where not has STATUS closed ,cancelled and resolved for exp  below

TICKET : TIK000004073247 as STATUS Closed or Resolved show TICKET Should be eliminated  ,

TICKET :TIK000004074318  no STATUS not yet closed ,cancelled and resolved so should not be eliminated

TICKETSTATUS
TIK000004073247,Assigned
TIK000004073247,Closed
TIK000004073247,In Progress
TIK000004073247,Pending
TIK000004073247,Resolved
TIK000004073462,Assigned
TIK000004073462,Closed
TIK000004073462,In Progress
TIK000004073462,Pending
TIK000004073462,Resolved
TIK000004074159,Assigned
TIK000004074316,Assigned
TIK000004074316,Cancelled
TIK000004074316,In Progress
TIK000004074317,Assigned
TIK000004074317,Cancelled
TIK000004074318,In Progress
TIK000004074318,Assigned
1 Solution

Accepted Solutions
sunny_talwar

May be this:

Table:

LOAD PurgeChar(TICKET, ',') as TICKET,

    Trim(STATUS) as STATUS

FROM

[https://community.qlik.com/thread/213865]

(html, codepage is 1252, embedded labels, table is @1);

Temp:

LOAD DISTINCT TICKET as TICKET_TEMP

Resident Table

Where Match(STATUS, 'Closed', 'Resolved', 'Cancelled');

FinalTable:

NoConcatenate

LOAD *

Resident Table

Where Not Exists(TICKET_TEMP, TICKET);

DROP Tables Temp, Table;

Capture.PNG

View solution in original post

9 Replies
avinashelite

if(STATUS<>Closed or STATUS<>Cancelled or STATUS<>Resolved,TICKET)

check the suppress null option in the dimensions

sunny_talwar

Show in List box object you mean?

May be like this:

Aggr(Only({<TICKET = p({<STATUS = {'Pending'}>})>}TICKET), TICKET)


Aggr(Only({1<TICKET = e({<STATUS = {'Closed'}>})+e({<STATUS = {'Resolved'}>})+e({<STATUS = {'Cancelled'}>})>}TICKET), TICKET)

sunilkumarqv
Specialist II
Specialist II
Author

Thanks for your quick replay

but want to do it in script sunny

avinashelite

you can try this in the script

if(STATUS<>Closed or STATUS<>Cancelled or STATUS<>Resolved,TICKET) as NEW_TICKET

sunilkumarqv
Specialist II
Specialist II
Author

Hi Avinash

May be im not clearly explained STATUS of each incident has multiple status

like Assinged ,closed ,cancelled and inprogress where TICKET has Closed ,cancelled that ticket should be removed

Example

TICKET,STATUS

1,Assinged

1,Closed

2,Assinged

3,Cancelled

3,Assinged

3,Ii prograss

4,Assinged

4,In prograss

OUTPUT:

2,Assinged

4,Assinged

4,In prograss


2,Assinged

which in case above case TICKET no '1' should be exuded since STATUS as Closed  

sunny_talwar

May be this:

Table:

LOAD PurgeChar(TICKET, ',') as TICKET,

    Trim(STATUS) as STATUS

FROM

[https://community.qlik.com/thread/213865]

(html, codepage is 1252, embedded labels, table is @1);

Temp:

LOAD DISTINCT TICKET as TICKET_TEMP

Resident Table

Where Match(STATUS, 'Closed', 'Resolved', 'Cancelled');

FinalTable:

NoConcatenate

LOAD *

Resident Table

Where Not Exists(TICKET_TEMP, TICKET);

DROP Tables Temp, Table;

Capture.PNG

avinashelite

Try like this

temp:

LOAD TICKET

from table

where STATUS='Closed' or STATUS='Resolved' or STATUS= 'Cancelled';


Result:

LOAD *

from table

Where Not Exists(TICKET, TICKET);


drop table temp;

sunny_talwar

You can shorten this to just

Where Not Exists(TICKET);

avinashelite

yes sunny your rite it has just become a habit of writing