Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

New Contributor III

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


4 Replies

Re: Back log tickets caluclation

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


Re: Back log tickets caluclation

Something along these lines


LOAD item_id,


    Floor(CreatedDateText) as StartDate,




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



(ooxml, embedded labels, table is Sheet1);


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;



LOAD StartDate,


Resident Table;


New Contributor III

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

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


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