Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
gauravgg
Partner - Creator
Partner - Creator

Fill previous value where there is blank

Hi All

I have the following table

CurrencyDateValue
USD01/01/201756
USD02/01/2017
AED01/01/201718
AED
02/01/2017
AED
03/01/2017
AED
04/01/2017

I want the following output

CurrencyDateValue
USD01/01/201756
USD02/01/201756
AED01/01/201718
AED
02/01/2017
18
AED
03/01/2017
18
AED
04/01/2017
18

ie where ever there is null value in the Value field ,i want to put previous value in that field

can anyone help me

Thanks in advance

7 Replies
tresesco
MVP
MVP

Try like:

Load

          Currency,

          Date,

          If(Len(Trim(Value))=0, peek(Value), Value) as Value

From <>:

Note: Your loading sort order might have to be defined using Order By clause;.

gauravgg
Partner - Creator
Partner - Creator
Author

Hi Thanks for reply

But it is not working.

is there any other way ?

tresesco
MVP
MVP

Could post a qvw with sample data set showing that is not working?

Anonymous
Not applicable

Try like:

Load

          Currency,

          Date,

          If(Len(Trim(Value))=0, peek(Value), Value) as Value

From <>:

Note: Your loading sort order might have to be defined using Order By clause;

try with peek('Value') instead

tresesco
MVP
MVP

It works even without quotes.

Anonymous
Not applicable

that's new for me... but ok

ahmar811
Creator III
Creator III

Hi

Gaurav

Please find the attached file for your output

Capture.JPG

Regards

Ahmar