Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Making Flag based on year

Hi there,

I need your help on this.

I want to calculate year on year growth rate so I need to make flags in the data load editor.

How do I create CYTD flag if year is 2015 and create LYTD flag if year is 2014?

Very much appreciate your thoughts.

3 Replies
Anonymous
Not applicable
Author

This thread may help:

Year-over-Year Comparisons

Mark_Little
Luminary
Luminary

Hi,

if you have a year column

IF(year = 2015, 1,0) as CYTD

IF(year = 2014, 1,0) as LYTD

Else if you just have a date column replace year with YEAR(date)

Mark

jpenuliar
Partner - Specialist III
Partner - Specialist III

In script:

YeartoDate(TempDate)*-1 as CurYTDFlag
YeartoDate(TempDate,-1)*-1 as LastYTDFlag