Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to put a value of a row into another row

Hi Everyone,

I'm starting in developing in Qlikview but I come across some trouble with a requirement. What I need to do basically is create a metric for previous years sale, in that sense I want to put the value of the previous year day sale on the current year day sale. Hope the table explain this better:

Want to put the values of 2016 sales on the Previous sale column of the current year. I hope there is a way to solve this requirement via script without loading the table again and do a left join.

Question.PNG

Thanks in advance,

Rodrigo.

2 Replies
Sergey_Shuklin
Specialist
Specialist

Hello!

You can use Below() function where the second parameter will be the rows you want to offset.

Below ‒ QlikView

below.png

jduarte12
Partner - Creator II
Partner - Creator II

Hi,

You can also try something like this in the script:

LOAD

...

day

sales

...

JOIN

day+interval(1, 'year')  as day

sales as previous_sales

Regards,

João Duarte