6 Replies Latest reply: Aug 25, 2015 12:16 AM by Amit Saini RSS

    Script help!!!

    Amit Saini

      Hi Folks ,

       

      I'm having 6 qvds as below:

       

      latencytime_inst1.qvd

      latencytime_inst2.qvd

      latencytime_inst3.qvd

      Responetime_inst1.qvd

      Responetime_inst2.qvd

      Responetime_inst3.qvd

       

      and across all these qvd's I'm having below table (Columns name are same )----> We can make this as cross table

       

      I have to create a table chart like above , but based on filters below:

       

      Please suggest how this could be possible.

       

      Thanks,

      AS

        • Re: Script help!!!
          Jonathan Dienst

          Like this, perhaps:

           

          Set vPath = ..... path to your qvd files ....;

          For Each vName in 'latencytime_', 'Responetime_'

            For Each vFile in FileList(vPath & '\' & vName & '*.qvd')

            T_Results:

            CrossTable(Location, Value)

            LOAD *

            FROM [$(vFile)] (qvd);

            Next

           

            Results:

            LOAD *,

            SubField('$(vFile)', '\', -1) As SourceFile

            Resident T_Results;

           

            DROP Table T_Results;

          Next

           

          The final Results table will have these fields: STDATE, Location, Value, SourceFile

            • Re: Script help!!!
              Amit Saini

              Hi Jonathan,

               

              Thanks , but below are my qvd's

               

               

              But after loading the script source file is showing me 2 qvds , it should show all qvds in list box. Please suggest why???

               

              Thanks,

              AS

                • Re: Script help!!!
                  Amit Saini

                  Below is script:

                   

                  Set vPath = D:\qvdev\PLM\Latency Report\#Source\Qvd;

                   

                  For Each vName in 'latencytime_*', 'responsetime_*'

                   

                    For Each vFile in FileList(vPath & '\' & vName & '*.qvd')

                   

                    T_Results:

                   

                    CrossTable(Location, Value)

                   

                    LOAD *

                   

                    FROM [$(vFile)] (qvd);

                   

                    Next

                   

                   

                   

                    Results:

                   

                    LOAD *,

                   

                    SubField('$(vFile)', '\', -1) As SourceFile

                   

                    Resident T_Results;

                   

                   

                   

                    DROP Table T_Results;

                   

                  Next

              • Re: Script help!!!
                Tresesco B

                Try like:

                Load

                          *,

                          SubField(FileBaseName(), '_',1) as Filter1,

                          SubField(FileBaseName(), '_',2) as Filter2

                From <> ;