Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys,
when i use the peek function only one field is filled by value. The following field is empty:
First step:
21 | 342776,69 |
22 | 342776,69 |
23 | |
24 | |
25 | |
26 | 342776,69 |
then i do a residnet load with the following code:
, if((MFLSAH>=0),MFLSAH,
if((BILANZKONTENNUMMER = peek(BILANZKONTENNUMMER)), peek(MFLSAH),0)
) as [LANDESWÄHRUNG - SALDO ALT HABEN]
and the rusult is:
21 | 342776,69 |
22 | 342776,69 |
23 | 342776,69 |
24 | |
25 | |
26 | 342776,69 |
How can i get this reuslt?
21 | 342776,69 |
22 | 342776,69 |
23 | 342776,69 |
24 | 342776,69 |
25 | 342776,69 |
26 | 342776,69 |
Thanks in advance,
Florian
Try this?
LOAD ID, IF(Len(Trim(Value)) = 0, Peek(Values), Value) AS Values;
LOAD * INLINE [
ID, Value
21, 342776,69
22, 342776,69
23, 342776,69
24,
25,
26, 342776,69
];
Try with an ordered (by ID) resident load
This is an example
X:
LOAD * INLINE [
ID, Value
26, 1
25, 2
23, 3
24,
22,
21, 5
];
Y:
NoConcatenate LOAD
ID,
IF(Len(Trim(Value)) = 0, Peek('Value'), Value) AS Value
Resident X
Order By ID
;
DROP Table X;
Result with order by Result Without order by
I will try your approach tomorrow. What happend if the value is null ?
Len(Trim(Value)) is 0 for Value = null