Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm trying to load data from a text file with little success.
First of all I'm struggeling with the delimitations.
Additionaly I need to figure out a way to apply the correct date to every row when loading into qlikview. Any ideas?
Sample text file attached.
Thanks in advance,
Olle
Load @1:200,
If(@1:200 like '*Value Date*',Mid(@1:200,12,10),Peek(Date)) As Date
From [SampleReport.txt] (fix,Header is 6 lines);
Hi Anbu,
can you pls provide a qvv example? Not really sure how to apply this.
Kind regards,
Olle
Check this qvw
Hi
If you use the Table Files... wizard in the script editor, you would use a fixed record file type. Skip 3 header lines and embedded labels (check that you do have label line or change the number of header lines). Set up the fixed field ranges.
Then when you click next, enter the transformation wizard. Here you can create filters to drop the non-data lines. For example, you could exclude all lines where the Code column (looks like column 2) is blank. That would remove the empty lines, ---- lines and totals. The wizard adds a filter clause to the file type statement.
Then these non-data lines never get into your model and you dont need complex rules to remove or exclude them
HTH
Jonathan
Problem is I haven't even managed to load the other data so I have nothing to apply your solution to Can you pls provide an example when you've loaded the below? From scratch
LOAD
Account,
Code,
Name,
Amount,
D/C,
Reference,
Value Date
Best regards,
Olle
Thanks for your tip Jonathan!
I did as described and ended up with a nice and clean table!
However, when trying to load this I get the below error message.
Does not matter if I state the embedded label names instead. Same error occurs.
I do not understand why QV uses the @1:18 (and so on) even though labels are stated.
Any ideas what might be wrong here?