Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All
I have the following table
| Currency | Date | Value | |
|---|---|---|---|
| USD | 01/01/2017 | 56 | |
| USD | 02/01/2017 | ||
| AED | 01/01/2017 | 18 | |
| AED |
| ||
| AED |
| ||
| AED |
|
I want the following output
| Currency | Date | Value | ||
|---|---|---|---|---|
| USD | 01/01/2017 | 56 | ||
| USD | 02/01/2017 | 56 | ||
| AED | 01/01/2017 | 18 | ||
| AED |
|
| ||
| AED |
|
| ||
| AED |
|
|
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![]()
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;.
Hi Thanks for reply
But it is not working.
is there any other way ?
Could post a qvw with sample data set showing that is not working?
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
It works even without quotes.
that's new for me... but ok
Hi
Gaurav
Please find the attached file for your output
Regards
Ahmar