Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
BARC’s The BI Survey 19 makes it official. BI users love Qlik. GET REPORT
qvhelpplease
New Contributor III

Re: Help regarding carryon count of tickets

i have to appreciate your patience with my silly questions still i have a doubt that 35 tickets i am showing there active tickets and if i take set analysis only for the month of june it is showing me 33 . usually the active tickets has to be same .i our scenario it should be 35 i believe

MVP
MVP

Re: Help regarding carryon count of tickets

I think the difference is cause by the fact that some tickets are in status active, but show a resolved date before today (even before the month of today, June):

ticket_id ticket_status createddate resolveddate Ticket_ResolveDate
193928Active08.04.201614.04.201614.04.2016
345724Active16.02.201619.05.201619.05.2016
206709Active13.06.201615.06.201615.06.2016
204790Active02.06.201628.06.2016 
205323Active06.06.201628.06.2016 
205547Active07.06.201628.06.2016 
206308Active10.06.201628.06.2016 
207162Active15.06.201628.06.2016 
207373Active15.06.201628.06.2016 
343563Active04.02.201628.06.2016 
343890Active07.02.201628.06.2016 
349779Active04.03.201628.06.2016 
357198Active06.04.201628.06.2016 
365952Active04.05.201628.06.2016 
374811Active10.06.201628.06.2016 
375956Active15.06.201628.06.2016 
375968Active15.06.201628.06.2016 
512279Active29.04.201628.06.2016 
513139Active02.05.201628.06.2016 
526337Active29.05.201628.06.2016 
526873Active31.05.201628.06.2016 
527498Active01.06.201628.06.2016 
528859Active05.06.201628.06.2016 
529251Active06.06.201628.06.2016 
533326Active14.06.201628.06.2016

The first two tickets should explain the difference of two.

Highlighted
Not applicable

Re: Help regarding carryon count of tickets

Thanks for this, really helped!

How would I leave weekends out of the reference date caculations?

LinkTable:

LOAD *,

MonthName(ReferenceDate) as ReferenceMonthName,

WeekName(ReferenceDate) as ReferenceWeekName,

WeekDay(ReferenceDate) as ReferenceWeekDAYName

WHERE ReferenceDate <= Today();

LOAD

  [Case Number],

  Date(createddate+iterno()-1) as ReferenceDate,

    If(iterno()=1, 1,0) as Flag_Created,

    If(Date(createddate+iterno()-1) = resolveddate, 1,0) as Flag_Resolved,

    If(createddate+iterno()-1 < resolveddate,1,0) as Flag_Open

Resident Cases

WHILE createddate+iterno()-1 <= resolveddate;

MVP
MVP

Re: Help regarding carryon count of tickets

Maybe like

...

WHERE ReferenceDate <= Today() and Weekday(Referencedate)<5; // to remove sat and sun