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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

data eed to excide?

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?

Labels (1)
2 Replies
Anonymous
Not applicable
Author

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;

foto.png

Regards,

petter
Partner - Champion III
Partner - Champion III

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:

2015-04-12 #5.PNG

2015-04-12 #6.PNG