Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
amit_saini
Master III
Master III

Script help!!!

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

1 Solution

Accepted Solutions
amit_saini
Master III
Master III
Author

I Tried this :

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

For Each vName in 'latencytime_inst1_8080', 'latencytime_inst2_8070','latencytime_inst3_8060','responsetime_inst1_8080','responsetime_inst2_8070','responsetime_inst3_8060';

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

This is working fine .

Thanks,

AS

View solution in original post

6 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

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

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
tresesco
MVP
MVP

Try like:

Load

          *,

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

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

From <> ;

amit_saini
Master III
Master III
Author

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

amit_saini
Master III
Master III
Author

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

amit_saini
Master III
Master III
Author

any suggestions????

amit_saini
Master III
Master III
Author

I Tried this :

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

For Each vName in 'latencytime_inst1_8080', 'latencytime_inst2_8070','latencytime_inst3_8060','responsetime_inst1_8080','responsetime_inst2_8070','responsetime_inst3_8060';

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

This is working fine .

Thanks,

AS