Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Kohli
Contributor

Current Year Variable?

I have table like....

        

EmpIDFirst NameLast NameGenderDateOfBirthStartDateEndDateOfficeIDJobTitle
1ErikFredriksen15/22/19601/1/20082CEO
2JennyOlafson01/18/19794/1/20102Personal Assistant
3FredrikNilsson19/12/19714/1/20102IT Manager
4BinhProtzmann14/5/197310/1/20081Global Product Manager
6RolfWesenlund18/29/19785/1/20132BI Manager
7ErinBell010/31/19688/1/20101CMO
8MikeMcDonald11/2/19667/1/20111Regional Sales Manager Americas
9BingMartin112/12/19791/1/20132Product Marketing Analyst
10RicardoGucci14/6/19819/1/20124Account Manager OEM
11GwendolynCavendish09/6/19771/1/200912/31/20112Account Manager
12FionaHunter02/22/19711/1/20096/30/20111Account Manager
13EvelynBrown09/16/19713/1/20091/31/20122Account Manager
15HelenaDu Froid06/18/19607/1/20114Regional Sales Manager Europe

I want create the variable for Current Year . Please suggest me how to create the variable for that?

4 Replies
bbmmouha
Contributor

Re: Current Year Variable?

do you whant the age ??

age(Now(),DateOfBirth) as age

or you whant the year from StartDate ?

Year(StartDate) as year

may you explane

balabhaskarqlik
Honored Contributor

Re: Current Year Variable?

May be:

Let vYear = Year(Today());

Let vYear1 = Year(Date(Today(), 'MM/DD/YYYY'));

MVP
MVP

Re: Current Year Variable?

Your first expression is OK, but the Date formatting function here:

Let vYear1 = Year(Date(Today(), 'MM/DD/YYYY'));

is completely superfluous.

Kohli
Contributor

Re: Current Year Variable?

Hi bala, r u from bangalore.

Community Browser