Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
alejortizp
Contributor III
Contributor III

how to use peek instead of previous or below

Good day,

I am trying to compare one date against another when DocAfiliado and PROGRAM are the same with this sentence:

if (DocAffiliated = Previous (DocAffiliated) and PROGRAM = Previous (PROGRAM), if (InMonth (Restorationdate, Previous (Restorationdate), 8), 'Out of range 8 months',' Within the 8 month range '),' Different document ') as Rank 8 months

But I want to be able to compare since they belong to the same DocAffiliate and PROGRAM to be able to compare the records by date against the first record or NumberFile = 1, I am trying to do so:

if (DocAffiliated = Previous (DocAffiliated) and PROGRAM = Previous (PROGRAM), if (InMonth (Restorationdate, Peek (Restorationdate, 0, 'Restorationdate'), 8), 'Outside the 8-month interval', 'Within the 8-month interval '),' Different document ') as Rank8 months

2018-10-30.png

if someone give me a light i goint to be so much greatfull

0 Replies