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

Announcements
Check out our latest virtual session where BARC Fellow, Doug Laney, highlighted the opportunities data monetization can offer enterprises. Watch here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Looking for help

Hey folks. I don't know how to search the forum for this, so I'll just post my problem and hope for some help.

My table houses many different costs and dates associated with those costs. Unfortunately, our data isn't great, and there's nulls where there should be expiration dates. So for example I have the following situation:

Record 1
NDC = 11111
Cost = $1.45
Effective Date = 1/1/2008
Expiration Date = null

Record2
NDC = 11111
Cost = $1.56
Effective Date = 1/1/2009
Expiration Date = null

What I want to do is get the expiration date on record 1 to be the record2 effective date minus 1 day. This isn't the case all of the time, but we are experiencing this for about 1/10 of the time.

Hoping somebody can help.

Rob

1 Reply
Not applicable
Author

This can be achieved using peek() function.

I have tried out a sample app, which replaces 0 with the value from subsequent row.

Just have a look at the script. Hope it may help