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: 
Not applicable

Load Data in Qlikview

Hi All,

Can anyone please help me in writing the load script?

Please see the attached excel file i want column G and H to be created in load script and not in Excel with formula's as this is a sample data only

  • Fist i want to know the position for the same product id 1,2, 3 etc
  • Count total no's for all test for single row.
1 Solution

Accepted Solutions
Gysbert_Wassenaar

Try:

Temp:

LOAD [Product Id], [Test Date], [Test 1], [Test 2], [Test 3], [Test 4]

FROM comm107533.xlsx (ooxml, embedded labels, table is Sheet1);

Result:

LOAD *

  , if(Previous([Product Id]) = [Product Id], rangesum(1,peek('Position')),1) as Position

  , rangesum(if([Test 1]='No',1,0)

            ,if([Test 2]='No',1,0)

            ,if([Test 3]='No',1,0)

            ,if([Test 4]='No',1,0)) as [Total No's]

Resident Temp

Order by [Product Id], [Test Date];

drop table Temp;

See attached qvw.


talk is cheap, supply exceeds demand

View solution in original post

2 Replies
Gysbert_Wassenaar

Try:

Temp:

LOAD [Product Id], [Test Date], [Test 1], [Test 2], [Test 3], [Test 4]

FROM comm107533.xlsx (ooxml, embedded labels, table is Sheet1);

Result:

LOAD *

  , if(Previous([Product Id]) = [Product Id], rangesum(1,peek('Position')),1) as Position

  , rangesum(if([Test 1]='No',1,0)

            ,if([Test 2]='No',1,0)

            ,if([Test 3]='No',1,0)

            ,if([Test 4]='No',1,0)) as [Total No's]

Resident Temp

Order by [Product Id], [Test Date];

drop table Temp;

See attached qvw.


talk is cheap, supply exceeds demand
Not applicable
Author

Thanks Gysbert Wassenaar