Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Coming your way, the Qlik Data Revolution Virtual Summit. October 27-29. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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
Highlighted
Partner
Partner

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
Partner
Partner

Hi Yoganantha

Try this expression

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

Br.
Teis

Highlighted
Partner
Partner

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