Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
i have data i my source file from 07/01/2014 to 06-apr-2015
now my req is i wat load data upto 31-mar-2015 only
and i want give a row no for each record
using recn0() i can give but my req is i want assign recno() '1' for 31-mar-2015 and 2 for 30-mar-2015
i want assign recno() in this order
how to exclude upto march data and how to assign recn0() in the above order?
Hi,
Maybe this helps:
Dates:
LOAD
Date#(MyDate, 'DD/MM/YYYY') as MyDate;
LOAD * INLINE [
MyDate
01/01/2015
01/02/2015
01/03/2015
30/03/2015
31/03/2015
01/04/2015
02/04/2015
];
DatesOrdered:
LOAD
RowNo() as RowNo,
MyDate as Date
Resident Dates
Where MyDate <= Date#('31/03/2015', 'DD/MM/YYYY')
Order By MyDate desc;

Regards,
Usually I prefer to calculate relative months in a Calendar Dimension (often referred to as a Master Calendar by QlikView practioners).
But using the same approach the calculation can of course be made directly in the fact table like this: