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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
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.