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: 
pascos88
Creator II
Creator II

Update table in qlik sense

Hi,

I have a table in qlik, and I would like to add a new column in the data load

The data that have a data 2017 are fine, but I would increment 1 year more for the data that contain 2016 as in the example below:

Sales           Data                    DataUpd

100               02.02.2017          02.02.2017

230               04.02.2016          04.02.2017  

234               06.06.2016           06.06.2017

565               08.08.2017            08.08.2017


All the info are in a table called sales...


Some idea about?


Thanks a lot

1 Solution

Accepted Solutions
agigliotti
Partner - Champion
Partner - Champion

you can use the below in script editor:

if( Year(Data) = 2016, AddYears(Data, 1), Data ) as DataUpd;

View solution in original post

1 Reply
agigliotti
Partner - Champion
Partner - Champion

you can use the below in script editor:

if( Year(Data) = 2016, AddYears(Data, 1), Data ) as DataUpd;