Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to implement below function - during Load

I have table like below

Item, Periodstart,value

101,20091, 20092,100

102,20092,200903,200

103,200903,20105,500

104,20105,201108,700

I would like to introduce Periodend - read the value from below of the period start

Chart - below function will work.

how to do it in the load.

advance thanks for your help

101,20091, 100

102,20092,200

103,200903,500

104,20105,700

I am expecting the value

Item ,periodstart,periodend,value

1 Reply
Not applicable
Author

Hi,

You can use order by Periodstart desc and then use the function previous():

load  Item,

        Periodstart,

        previous(Periodstart) as periodend,

        value

from...

order by Periodstart DESC;

Hope this helps

Regards!