Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
sujit_nath
Creator III
Creator III

assign previous non empty value to dimension

I have a data, like - 

sujit_nath_0-1624127400188.png

 

 

I want to show the output like:

 

Month Year

Sales

Jan-18

10

Feb-18

10

Mar-18

10

Apr-18

20

May-18

30

 

Basically, The date range can be created with master calendar (that's fine), but I need to assign the value of each blank MonthYear with its previous non empty value.

How to do this? Thanks in Advance!!

1 Reply
saniyask
Creator
Creator

Hi,

Load the data, create calendar. Create a resident of your original table and construct a new table like below.

noconcatenate

Tab1:

Load *,

if(isnull(Sales),Peek(Sales),Sales) as Sales

Resident Data

order by Date;

Drop Table Data;

Hope this will help.

 

Regards,

Saniya