Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Only at Qlik Connect! Guest keynote Jesse Cole shares his secrets for daring to be different. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
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.

SALES:

load * inline

[ACC, CHNL, ORD_ID, PROD    , DT

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

Ex.

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

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

Thanks in advance and truly appreciate your help..

Thanks,

Aji Paul.

3 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

You can use the firstsortedvalue function. See attached qvw.


talk is cheap, supply exceeds demand
Not applicable
Author

Thanks Gysbert!

This is helpful!

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

Thanks,

Aji Paul

Not applicable
Author

Gysbert,

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.

Thanks,

Aji.