Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

peek emty rows

Hi guys,

when i use the peek function only one field is filled by value. The following field is empty:

First step:   

21342776,69
22342776,69
23
24
25
26342776,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:

   

21342776,69
22342776,69
23342776,69
24
25
26342776,69

How can i get this reuslt?

   

21342776,69
22342776,69
23342776,69
24 342776,69
25342776,69
26342776,69

Thanks in advance,

Florian

4 Replies
vishsaggi
Champion III
Champion III

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

];

maxgro
MVP
MVP

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

1.png2.png

Not applicable
Author

I will try your approach tomorrow. What happend if the value is null ?

maxgro
MVP
MVP

Len(Trim(Value)) is 0 for Value = null