Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to find next date value.

Hi,

Please help me by checking the attachments. I put i=0 to 20, but I need the last row to know dynamically for max value of i.

Note: Message was edited by Community Moderator for spelling and clarity

2 Replies
sunny_talwar

Try this may be:

Demo3:

LOAD RowNo() as Key,

  [ClosingBalanceDate],

  [ClosingBalance]

FROM [lib://Desktop/Demo3.csv]

(txt, codepage is 1252, embedded labels, delimiter is ',', msq);

FOR i=0 to FieldValueCount('Key')

  test6:

  Load DISTINCT

  [ClosingBalanceDate],

  [ClosingBalance]as OpeningBalance,

  if(Peek([ClosingBalance],$(i))<>null(),peek([ClosingBalance],$(i+1)),0)as ClosingBalance

  Resident Demo3;

NEXT i

DROP Table Demo3;

Anonymous
Not applicable
Author

Hi Sunny,

Thanks for your response.But your code is not working for Closing Balance.

But I solved the issue.