Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Simple Load Question

Hi All,

Need some help with a simple load problem.

I have a simple sales table , it has Account ID, Sales Channel, order ID and Order Date. (load script below)

It has two accounts and 4 orders for each accounts.


load * inline


AC123, Web, ORD1, DVD, 1/1/2012

AC123, STORE, ORD2,CD, 1/1/2013

AC123, Phone,ORD3, BOOK, 1/1/2010

AC123, Web,ORD4,TSHIRT, 1/1/2011

AC980, Store,ORD5,BOOK, 2/1/2010

AC980, Phone,ORD6,TSHIRT, 2/1/2011

AC980, Web,ORD7,DVD, 2/1/2012

AC980, Web,ORD8,CD, 2/1/2013];

After loading this what I would like to extract the DISTINCT Account IDs and their fist order information and create a new table.(the blue records alone)

Can we use some kind of ranking ?

As example , from the above scanrio , it should create the following two records


AC123, Phone,ORD3, BOOK, 1/1/2010

AC980, Store,ORD5,BOOK, 2/1/2010

Thanks in advance and truly appreciate your help..


Aji Paul.

3 Replies

Re: Simple Load Question

You can use the firstsortedvalue function. See attached qvw.

talk is cheap, supply exceeds demand
Not applicable

Re: Simple Load Question

Thanks Gysbert!

This is helpful!

BTW what I need is  another table while loading. Is there any way we can do that?


Aji Paul

Not applicable

Re: Simple Load Question


What I ment was after loading I will have two tables 1. Sales 2. First Sales. What I would do is Drop the sales table after creating the second table.

So what I left with at the end of loading is the "First Sales" table.



Community Browser