Discussion Board for collaboration on QlikView Scripting.
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
[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
Thanks in advance and truly appreciate your help..
You can use the firstsortedvalue function. See attached qvw.
This is helpful!
BTW what I need is another table while loading. Is there any way we can do that?
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.