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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Getting timestamp bind on two conditions

Hello together,

iam very new to QlikView so i hope you dont laugh about my question

I want to analyse our ticketsystem and need the timestamp when tickets changed their status to closed.

There are the following necessary Tables:

jiraissue:

jiraissue_idjiraissue_createdjiraissue_summaryjiraissue_stuff
334212015-03-20 19:25:34JO JO JOkram

changegroup

changegroup_idjiraissue_idchangegroup_created
12345334212015-03-25 10:00:00

changeitem:

changeitem_idchangegroup_idchangeitem_fieldchangeitem_newstring
5679412345status

Closed

5679412345resolutiondone
5679414345statusOpen

So i need the timestamp from changegroup_created Where changeitem_field = 'status' and changeitem_newstring = 'Closed'.

In MySQL i would use following query:

SELECT b.created
FROM jiraissue AS a, changegroup AS b, changeitem AS c
WHERE a.id = b.issueid
AND c.groupid = b.id
AND c.field =  'status'
AND c.newstring =  'Closed'


In QlikView i tried to use following expression:

IF(MATCH(changeitem_field, 'status') AND MATCH(changeitem_newstring, 'Closed'), changegroup_created, 'versagt')


i also tried:

IF(changeitem_field='status' AND changeitem_newstring='Closed', changegroup_created, 'versagt')

But none of them worked.

Do you have any idea?


I would really appreciate your help!

Greetings

Stefan

1 Solution

Accepted Solutions
Not applicable
Author

Sure, thats a way to do it.

But i want to use it in my Straight Table. I want to get the time difference with "Interval) between creation and closing of a ticket, so i need it as expression

View solution in original post

5 Replies
avinashelite

try like this :

MaxString({<changeitem_field={'status'},changeitem_newstring={'Closed'}>}changegroup_created)

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Your data does not contain a timestamp that tells when a ticked was closed. There's only a creation timestamp and a changegroup creation timestamp.


talk is cheap, supply exceeds demand
Not applicable
Author

I know that there is no direct timestamp that tells when a ticket was closed.

Let me explain:

When i make a change on a ticket, the system creates one entry in changegroup with the timestamp the change was made , the issue that was changed and the person who did this change.

What kind of changes were made within one change is written in the changeitem table.

So if i change as example the status and the assignee in one stamp, thats two changes in the changeitem table linked through the groupid with the entry in changegroup which contains the information that are equal for both changes.

So when i close a ticket one entry is made in the changegroup table containing information ticketid, timestamp and author of that change, and one or more entries are made in the changeitem table containing information what was changed. When a ticket is closed, an entry is made with field = status and newstring = closed

And i want the changegroup timestamp that refers to the entries in changeitem with that conditions.

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Ok, sounds easy. Load your tables like they are and they will be linked on the common field names. Then in the front end add a table box with the fields you want to see. Then simply select the value 'Closed' in changeitem_newstring and select the value 'Closed' in changeitem_field.


talk is cheap, supply exceeds demand
Not applicable
Author

Sure, thats a way to do it.

But i want to use it in my Straight Table. I want to get the time difference with "Interval) between creation and closing of a ticket, so i need it as expression