Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

qvhelpplease
New Contributor II

Back log tickets caluclation

Hi all can someone help on this

I was given a task to show a count of open tickets at a point of time..regardless of its status now.

For example, if an issue is created today and closed after two days .. on the third day the issue will be shown as closed n but when I select a day before it was closed, it should be counted as backlog

I guess we have to use flags to achieve this .. but I am not able to figure out the way to achieve it


Attached is the sample data


kush141087

4 Replies
MVP
MVP

Re: Back log tickets caluclation

What you need is an Interval Match between your fact table and the master calendar....

IntervalMatch

MVP
MVP

Re: Back log tickets caluclation

Something along these lines

Table:

LOAD item_id,

    CreatedDateText,

    Floor(CreatedDateText) as StartDate,

    ticket_status,

    ticket_priority,

    resolved_date,

    If(resolved_date = 'NULL', Today(), Floor(resolved_date) + 1) as EndDate

FROM

[..\..\Downloads\backlogsample.xlsx]

(ooxml, embedded labels, table is Sheet1);

Calendar:

LOAD Date(MinDate + IterNo() - 1) as Date,

  Month(MinDate + IterNo() - 1) as Month,

  Year(MinDate + IterNo() - 1) as Year,

  Date(MonthStart(MinDate + IterNo() - 1), 'MMM-YYYY') as MonthYear

While MinDate + IterNo() - 1 < MaxDate;

LOAD Min(StartDate) as MinDate,

  Max(EndDate) as MaxDate

Resident Table;

IntervalMatch:

IntervalMatch(Date)

LOAD StartDate,

  EndDate

Resident Table;

Capture.PNG

qvhelpplease
New Contributor II

Re: Back log tickets caluclation

Hi Sunny,

Thanks for your efforts, I guess I didn't explain my requirement correctly

let's say a ticket is raised on 21st of this month so ticket created date will be 21 and ticket status will be active, after working on the ticket if the analyst has closed the ticket on 24, Resolved day will be 24th and status changes to Closed.

Now the requirement is let say I want to make a report out of dashboard to show all open tickets by 23rd of the month if I select 23 and this ticket should be counted as active or backlog as it was closed on 24th.

Hope it is clear now

MVP
MVP

Re: Back log tickets caluclation

This is exactly what it is doing today.... Ticket 1451281 was created on Jan 5th and was resolved on Jan 19th... with a slight change in the script... this is what i get

Capture.PNG

So, this ticket shows up on all dates between 5th and 19th... isn't this right?