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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Gopi_E
Creator II
Creator II

How to get previous row value in to present row

Hi All,

I have fields Date and Value  like bellow 

Annotation.png

Here I want output like this

Annotation.png

Thanks in advance

Gopi

2 Solutions

Accepted Solutions
tresesco
MVP
MVP

In script, try like:

If(Value>0, Value, Peek(NewValue)) as NewValue

View solution in original post

tresesco
MVP
MVP

You can. Create a new expression (label: NewValue) and then expression:

If(Value>0, Value, Above(TOTAL NewValue))

View solution in original post

6 Replies
tresesco
MVP
MVP

In chart or script?
tresesco
MVP
MVP

In script, try like:

If(Value>0, Value, Peek(NewValue)) as NewValue
Gopi_E
Creator II
Creator II
Author

Hi  Tresco,

Thanks for reply

in edit script, I tried by using the previous function but it will give a result for only one row. 

script or chart no problem please give any idea about this

Gopi_E
Creator II
Creator II
Author

Hi,

It works perfectly in edit script.

can I able to get same result in the chart 

tresesco
MVP
MVP

You can. Create a new expression (label: NewValue) and then expression:

If(Value>0, Value, Above(TOTAL NewValue))
Gopi_E
Creator II
Creator II
Author

Thanks for spending your time for me.

it works perfectly. 

here I missed Total Qualifier

Thanks,

Gopi