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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
nikhilgarg
Specialist II
Specialist II

Need help !!

HEllo ,

I am using personal edition of Qlikview and utilised 4-5 attempts of recovery. So i cannot open my own document.

I am attaching my application. Kindly send me the script that i have written in it so that i can again make it.

Thanks

Labels (1)
11 Replies
amit_saini
Master III
Master III

Nikhil,

There it is :

Server_Analysis1:

LOAD

   PurgeChar(Event,'') as Event,

   PurgeChar(Date([Event Start Time], 'DD.MM.YYYY'),'.') as KeyStartDate,

   PurgeChar(Date([Event End Time], 'DD.MM.YYYY'),'.') as KeyEndDate,

   Date([Event Start Time], 'DD.MM.YYYY') as StartDate,

   Date([Event End Time], 'DD.MM.YYYY') as EndDate,

     Time([Event Start Time] + '2:30:00', 'hh:mm:ss') as StartTime,

     Time([Event End Time]  + '2:30:00', 'hh:mm:ss') as EndTime,

   MonthName([Event Start Time]) as Month_Year,

   Interval(-(Date([Event Start Time]) - Date([Event End Time])))as Duration

 

FROM

(ooxml, embedded labels, table is [Detaied Report]);

Left  Join

Downtime:

LOAD

    Trim(PurgeChar(Event,'')) as Event,

    PurgeChar(StartDate,'.') as KeyStartDate,

     PurgeChar(EndDate,'.') as KeyEndDate,

     StartTime as Downtime_StartTime ,

     EndTime as Downtime_EndTime,

     'Planned' as Type

   

FROM

(ooxml, embedded labels, table is Sheet1);

NoConcatenate

Server_Analysis:

LOAD

     Trim(Event) as Event, 

     Trim(StartDate) as StartDate,  

     Trim(EndDate) as EndDate,

     StartTime,

     EndTime,

     Downtime_StartTime ,

     Downtime_EndTime,

     Month_Year,

     Duration,

     KeyStartDate,

     if(Type= 'Planned' ,'Planned','Unplanned')  as Type

    

     Resident Server_Analysis1;

drop Table Server_Analysis1;

Thanks,

AS

nikhilgarg
Specialist II
Specialist II
Author

Hey,

Thanks amit .

amit_saini
Master III
Master III

No problem Nikhil

Thanks,
AS

nikhilgarg
Specialist II
Specialist II
Author

Can you plz tell me script for this also ...

Thanks

amit_saini
Master III
Master III

Server_Analysis1:

LOAD

   PurgeChar(Event,'') as Event,

   PurgeChar(Date([Event Start Time], 'DD.MM.YYYY'),'.') as KeyStartDate,

   PurgeChar(Date([Event End Time], 'DD.MM.YYYY'),'.') as KeyEndDate,

   Date([Event Start Time], 'DD.MM.YYYY') as StartDate,

   Date([Event End Time], 'DD.MM.YYYY') as EndDate,

     Time([Event Start Time] + '2:30:00', 'hh:mm:ss') as StartTime,

     PurgeChar(Time([Event Start Time] + '2:30:00', 'hh:mm:ss') , ':') as KeyStartTime,

     Time([Event End Time]  + '2:30:00', 'hh:mm:ss') as EndTime,

    PurgeChar(Time([Event End Time]  + '2:30:00', 'hh:mm:ss') , ':') as KeyEndTime,

   MonthName([Event Start Time]) as Month_Year,

   Interval(-(Date([Event Start Time]) - Date([Event End Time])))as Duration

  

FROM

(ooxml, embedded labels, table is [Detaied Report]);

Left Join

Downtime:

LOAD

    Trim(PurgeChar(Event,'')) as Event,

    PurgeChar(Date(StartDate , 'DD.MM.YYYY'),'.') as KeyStartDate,

     PurgeChar(Date(EndDate , 'DD.MM.YYYY'),'.') as KeyEndDate,

     Time((StartTime + '2:30:00'), 'hh:mm:ss') as Downtime_StartTime ,

    PurgeChar(Time((StartTime + '2:30:00'), 'hh:mm:ss') , ':') as KeyDowntime_StartTime ,

     Time((EndTime + '2:30:00'), 'hh:mm:ss') as Downtime_EndTime,

      PurgeChar(Time((EndTime + '2:30:00'), 'hh:mm:ss'), ':') as KeyDowntime_EndTime,

     Duration1 ,

      Interval(-(Time([StartTime]) - Date([EndTime])))as Duration2,

      'Planned' as Type ,

     Reason

   

   

FROM

(ooxml, embedded labels, table is Sheet1);

NoConcatenate

Server_Analysis:

LOAD

Event,

KeyStartDate,

KeyEndDate,

StartDate,

EndDate,

StartTime,

KeyStartTime,

EndTime,

KeyEndTime,

Month_Year,

Duration,

Downtime_StartTime ,

KeyDowntime_StartTime ,

Downtime_EndTime,

KeyDowntime_EndTime,

Duration1,

// Duration2,

Reason,

if(Event = 'Server_DOWN' and KeyStartDate = KeyStartDate and KeyEndDate = KeyEndDate and KeyStartTime >= KeyDowntime_StartTime and KeyEndTime <= KeyDowntime_EndTime , 'Planned' , 'Unplanned'  ) as Type

Resident Server_Analysis1;

DROP Table Server_Analysis1 ;

Downtime1:

LOAD Event as Event1,

     StartTime as StartTime1,

     EndTime as  EndTime1,

     StartDate as StartDate1,

     EndDate as EndDate1,

     Reason as Reason1,

     Duration1 as Duration2

FROM

(ooxml, embedded labels, table is Sheet1);

nikhilgarg
Specialist II
Specialist II
Author

HEy,

Thanks . This was the script i was looking for .

Hope you don't mind if i ask for further help.

Thanks

nikhilgarg
Specialist II
Specialist II
Author

HEy amit,

Can you please tell me in the 3rd pie chart(Expected_Planned_Downtime) that i havemade , what is the expression written??

Thanks

amit_saini
Master III
Master III

Hi,

Server_DownTime_Analysis - YTD

=Sum({<Event = {'Server_DOWN'}>}Duration)

Server_Downtime_Analysis - Nov,2014

=Sum({<Event = {'Server_DOWN'} , Month_Year = {"Nov 2014"}>}Duration)

Assumed_Planned_Downtime

=Sum(Interval(-(Time([StartTime1]) - Date([EndTime1]))))

nikhilgarg
Specialist II
Specialist II
Author

Thanks AMit,

I am done