>>1. i would not require it in desc format. I need it as it is.
Qlik has no lookahead function, so you need to sort it in desc order to do the equivalent.This has no affect on the front end sorting.
2. I would like to get the data using peek function...
There is really no need. Peek is used to read previous output rows, Previous reads previous input rows. In your case, it makes little difference, although Peek may be very slightly slower.
Maybe something like this
Date#(Date1, 'MM/DD/YYYY') as Date1
Date(Date#(Date1, 'MM/DD/YYYY'), 'MM/DD/YYYY') as StartDay,
Date(Date(Date#(Previous(Date1), 'MM/DD/YYYY')) - 1, 'MM/DD/YYYY') as EndDay
Order By Date1 desc;
If(Isnull(EndDay) = 0, EndDay, Today()) as EndDay
DROP Tables Table1, Table2;