I have a sample data as given in below image (column A to D),
As a result I want Qty2 of previous row (Column E) of same order and where the Key not equals to "Key5".
Using Peek() function, I am able to get required results, Results are coming as shown below,
|IF(peek(Order,-1)=Order and Key<>'Key5',peek(Qty2,-1),Qty1)||as Previous_QTy2|
Please suggest is there any way to achieve said results.
Thanks for looking into, I have checked the statement of "order by" but it is given the results as shown below,
The requirement is such that the sequence of data is important, so that order by will not work in our case.
Any other solution?
peek function requires that the table is sorted, you can ordering it again after creating the field previous_QTy2 using another standard to create the field Rowno.
Thanks again Claudio,
But I am failed to simulate your solution, can you please help me by checking & correcting the attached qvw.