Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
shekhar_analyti
Specialist
Specialist

what should be load script to set a flag field "Instation" as 1 based on conditions below ?

Hi All ,

what should be load script to set a flag field "Instation" as 1 based on conditions below ?

flag cond.PNG                                                                                                   

I want to create two flags with value as 1

1) Instation Flag - If a ticket Id is resolved by single assigned team and its Resolved Field is not equal to N

2) Final Resolution flag  - it should be 1 for all Ticket id whose Resolved field is not equal to N

Thanks & Regards

Shekar

1 Solution

Accepted Solutions
vinieme12
Champion III
Champion III

attached!

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.

View solution in original post

8 Replies
vinieme12
Champion III
Champion III

Try below

fact:

LOAD Request_Type,

     Ticket_ID,

     Assigned_To,

     Assigned_Dt,

     Resolved_Dt,

     Resolved

FROM

[xxxxxxxxxxxxxxxxxx]

(ooxml, embedded labels, table is data);

TicketFlag:

LOAD

Ticket_ID,TeamCount,ResolvedFlag,

if(TeamCount=1,1,0) as Instation_flag,

if(Match(ResolvedFlag,'N')=0,1,0) as Final_Resolution_flag;

LOAD Ticket_ID,Count(DISTINCT Assigned_To) as TeamCount,MaxString(Resolved) as ResolvedFlag

Resident fact

Group by Ticket_ID;

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
shekhar_analyti
Specialist
Specialist
Author

can you please attach sample qvw .

vinieme12
Champion III
Champion III

attached!

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
shekhar_analyti
Specialist
Specialist
Author

Thank you vineeth .

In case of simple load

fact:

LOAD Request_Type,

     Ticket_ID,

     Assigned_To,

     Assigned_Dt,

     Resolved_Dt,

     Resolved

FROM

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

In textbox i want to show the count of all those ticket id which have multiple instances

i tried below expression , but did not work

=if(aggr(Count(Ticket_ID),Ticket_ID)>1,Count({1}Ticket_ID))

Can you please help with expression ?

vinieme12
Champion III
Champion III

try below


=count( {<Ticket_ID = {="Count(Ticket_ID)>1"}>}Ticket_ID)

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
vinieme12
Champion III
Champion III

If your Original query is resolved please close the thread

Qlik Community Tip: Marking Replies as Correct or Helpful

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
shekhar_analyti
Specialist
Specialist
Author

I see final resolution flag set to 0 for all records

vinieme12
Champion III
Champion III

Change this part

TicketFlag:

LOAD

Ticket_ID,TeamCount,ResolvedFlag,

if(TeamCount=1,1,0) as Instation_flag,

if(Match(ResolvedFlag,'N'),0,1) as Final_Resolution_flag;

LOAD Ticket_ID,Count(DISTINCT Assigned_To) as TeamCount,MaxString(Resolved) as ResolvedFlag

Resident fact

Group by Ticket_ID;

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.