How can we remove top and bottom 5 records to load in Qlikview?

visualization
charts
qlikview

#1

Hi,

I am loading data from txt file into Qlikview but top and bottom 5 records are default values. Now I don’t want to load these records. How can we remove this?

Regards,
Satish


#2

@Satish

You can perform this in three steps:
Step1: Load all data from txt file to qlikview and create a variable to store the row number.

Data:
LOAD Empcode, 
     Sales,    
RowNo() as cnt // variable to store Row number
FROM
QV.txt
(txt, codepage is 1252, embedded labels, delimiter is '\t', msq);

Step2: Create a variable to store total row count

Let totalrow=peek('cnt',-1,'Data');

Step3: Load data from resident DATA and apply where clause to remove top and bottom 5 records

Final:
Load 
Empcode, 
Sales
Resident Data where cnt >=6 and cnt <= $(totalrow)-5;

Drop table Data;

Regards,
Sunil