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: 
Anonymous
Not applicable

How to extract phrases from text in a load

Hi there,

I am trying to extract some data from these fields in order to do some reporting on it

Below is a sample of the text in the field "ENTRY_TEXT"

For example I would like to run reports on the time a ticket is created until it goes to resolved.  Unfortunately the field for status only shows the last stats which int his case is "Closed"  So If I use the history I can get better accuracy.

I would like to extract the phrases from ENTRY_TEXT: "Created by" and  "to Resolved" and "to Closed"

This was I can use the ENTRY_DATE to do the time difference between them.  Unless I could do set analysis instead.

Part two I would like an if statement once this is figured out.  Like the date difference between "Created by" to either "to Resolved" or "To Closed".  I issue there is some people resolve tickets and some close them instead.  So check for resolved first then use closed if that doesn't exist.

I know this is a lot to ask.  Anyone out there on a Friday looking for some QlikView points? lol

Thanks!

   

JOB_TICKET_IDENTRY_DATEENTRY_TEXT
1655096/8/2017 15:16Updated-Ticket E-Mail sent to Jim
1655096/8/2017 15:16Status changed from Resolved to Closed
1655096/8/2017 15:16Added Client Note 9854
1655096/8/2017 13:16Updated-Ticket E-Mail sent to Jane
1655096/8/2017 13:16Status changed from In Progress to Resolved
1655096/8/2017 13:16Added new tech note.
1655096/6/2017 8:44Updated-Ticket E-Mail sent to Jane
1655096/6/2017 8:44Added new tech note.
1655096/6/2017 8:42Status changed from Open to In Progress
1655096/6/2017 8:42Set 1st-Response Date to 2017-06-06 8:42
1655096/5/2017 17:21Alert E-Mail sent to Doug
1655096/5/2017 15:45Reassigned-Ticket E-Mail sent to Doug
1655096/5/2017 15:45Assigned to Doug from Bill
1655096/5/2017 15:18New-Ticket E-Mail sent to Doug and Bill
1655096/5/2017 15:18Assigned to Bill
1655096/5/2017 15:18Created by Jane
1655096/5/2017 15:18Attached Publisher.xlsx
Header 1
13 Replies
sunny_talwar

No problem

Anonymous
Not applicable
Author

Hey Sunny,

I was going to start a new thread but since it has to do with your answer I will ask it here.

I am trying to show the avg time it takes using the expression you gave me:

If(Len(Trim(Max({<ENTRY_TEXT = {'*to Resolved*'}>}ENTRY_DATE))) = 0, Max({<ENTRY_TEXT = {'*to Closed*'}>}ENTRY_DATE), Max({<ENTRY_TEXT = {'*to Resolved*'}>}ENTRY_DATE)) - Max({<ENTRY_TEXT = {'*Created by*'}>}ENTRY_DATE)

Is it possible to wrap an Avg( ) around it? I am not sure how much more you can build on it. 

Ideally too, I would like the Avg and also a condition saying not to include STATUS = Cancelled.

I will be forever grateful again.

Thanks!

sunny_talwar

May be like this to add average

Avg(Aggr(


If(Len(Trim(Max({<ENTRY_TEXT = {'*to Resolved*'}>} ENTRY_DATE))) = 0, Max({<ENTRY_TEXT = {'*to Closed*'}>} ENTRY_DATE), Max({<ENTRY_TEXT = {'*to Resolved*'}>} ENTRY_DATE)) - Max({<ENTRY_TEXT = {'*Created by*'}>} ENTRY_DATE)


, AggregatingDimensions))

To exclude Status = Cancelled

Avg({<ENTRY_TEXT = {'*to Resolved*'}, STATUS -= {'Cancelled'}>}Aggr(


If(Len(Trim(Max({<ENTRY_TEXT = {'*to Resolved*'}, STATUS -= {'Cancelled'}>} ENTRY_DATE))) = 0, Max({<ENTRY_TEXT = {'*to Closed*'}, STATUS -= {'Cancelled'}>} ENTRY_DATE), Max({<ENTRY_TEXT = {'*to Resolved*'}, STATUS -= {'Cancelled'}>} ENTRY_DATE)) - Max({<ENTRY_TEXT = {'*Created by*'}, STATUS -= {'Cancelled'}>} ENTRY_DATE)


, AggregatingDimensions))

Anonymous
Not applicable
Author

Yeap that's it!