Skip to main content

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
NEW webinar Dec. 7th: 2023 Outlook, A Pivotal Year for Data Integration SIGN ME UP!
cancel
Showing results for 
Search instead for 
Did you mean: 
yoganantha321
Creator II
Creator II

Loading a new column with another column

Hi  all,

I have a data set as like below:

YearSale
201410000
201515000
201620000
201730000

 

But I need a new column as like below:

YearSalePrevious Year Sale
2014100000
20151500010000
20162000015000
20173000020000

 

can anybody help in this!!!

 

Regards,

Yoga

Labels (2)
1 Solution

Accepted Solutions
syedabik
Partner - Contributor II
Partner - Contributor II

Hi, 

Try this:

Data:
Load * Inline
[
Year, Sale
2014, 10000
2015, 15000
2016, 20000
2017, 30000
];

Left Join
Load Year+1 as Year,
alt(Sale,0) as PreviousYear
Resident Data;

Capture.PNG

View solution in original post

2 Replies
teiswamsler
Partner - Creator III
Partner - Creator III

Hi Yoganantha

Try this expression

Rangesum( below( Sum( Sales), -1 ) )

Br.
Teis

syedabik
Partner - Contributor II
Partner - Contributor II

Hi, 

Try this:

Data:
Load * Inline
[
Year, Sale
2014, 10000
2015, 15000
2016, 20000
2017, 30000
];

Left Join
Load Year+1 as Year,
alt(Sale,0) as PreviousYear
Resident Data;

Capture.PNG