Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

Text file into Qlikview

I have the following text files that I need to bring into a qvw. I wasn't sure how to do it.

The format of them is the same and I will be getting a new one every month which means this will have to take from all files with, say, CICS* in the name so I don't have to import the new one every month. All I want to have to do is put the new file in the folder with all of these files.

I need the "DATE", "# of T/XS" and "AVG RSP" column. The last column can be calculated if need be.

I don't need the Totals either. Those can be calculated. Just the raw data.

Please help!

Thanks

9 Replies
Not applicable

Re: Text file into Qlikview

Hi

try this:

LOAD @1 as DATE,

     @2 as [# of T/XS],

     @3 as [AVG RESP]

FROM (txt, codepage is 1250, explicit labels, delimiter is spaces, msq, header is 2 lines) where isnum(@2);

Not applicable

Re: Text file into Qlikview

Can you explain how you got this?

Not applicable

Re: Text file into Qlikview

using qv script wizard (+ some individual modification)

edit script ---> table files ---> (choose your file xls,txt, etc) i choose delimited

then finish

final script i modified by marking file names by * (star) and i add where clause

@1,@2,@3....etc are the column names if you don't want to get embded lebels

Not applicable

Re: Text file into Qlikview

Can I join these all together?

Not applicable

Re: Text file into Qlikview

now i gonna ask you

what you mean by: join these all together?

Not applicable

Re: Text file into Qlikview

Like when you use a Left Join or contatenate to bring all the data into one table instead of having it be in separate tables. Right now each file ends up being in its own table. I want it all in one so I can call, for example, "DATE" field and get all the dates.

Not applicable

Re: Text file into Qlikview

Look at the sample picture. I noticed another problem. Why is April not coming in correctly like the others?

But to my other question, I want them to all appear in one table.

Not applicable

Re: Text file into Qlikview

Here is a sample app with what I currently see.

I want them all in one table. Plus april seems to be doing something funky.

Any help would be great.

Swuehl, where are you when I need you!!!

Not applicable

Re: Text file into Qlikview

//Qualify *;

<--- you dont need this here

F1 helpSmiley Very Happy

Qualify

The automatic join between fields with the same name in different tables can be suspended by means of the qualify statement, which qualifies the field name with its table name. If qualified, the field name(s) will be renamed when found in a table. The new name will be in the form of tablename.fieldname. Tablename is equivalent to the label of the current table, or, if no label exists, to the name appearing after from in load and select statements.

Qualification is always turned off by default at the beginning of script execution. Qualification of a field name can be turned on at any time using a qualify statement. Qualification can be turned off at any time using an unqualify statement.

Community Browser