Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Manel222
Contributor II
Contributor II

peek last value not null and put it into prior date records

Hello, 

I have this data

Month Revenue
01/02/2022 0
01/03/2022 0
01/04/2022 0
01/05/2022 0
01/01/2023 300

I want this result , when the revenue is null, it takes the last not null value, any idea how to get this result, i tried peek it didin't work

Month Revenue
01/02/2022 300
01/03/2022 300
01/04/2022 300
01/05/2022 300
01/01/2023 300
1 Solution

Accepted Solutions
Vegar
MVP
MVP

You can use peek for this, but you need to make sure that your date get lloaded in the correct order.

Load 

Month

If((Revenue > 0, Revenue, Peek('Revenue')) as Revenue

Resident Data

Order By Month (Desc);

View solution in original post

2 Replies
Vegar
MVP
MVP

You can use peek for this, but you need to make sure that your date get lloaded in the correct order.

Load 

Month

If((Revenue > 0, Revenue, Peek('Revenue')) as Revenue

Resident Data

Order By Month (Desc);

Vegar
MVP
MVP

@Manel222 

Did you solve your issue or do you need  more feedback on your question?