Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikviewwizard
Master II
Master II

Expression meaning

What is the meaning of the below expression meaning?

=year(today())-$1

Thanks in advance.

1 Solution

Accepted Solutions
Anonymous
Not applicable

Looks like a variable with parameter.  If you have a variable vYear defined as

year(today())-$1 

You can use it in a text box

=$(vYear(5))

and it will return 2010

Edit: see attached

View solution in original post

10 Replies
robert_mika
Master III
Master III

is this full expression?

Where are you using it?

qlikviewwizard
Master II
Master II
Author

Hi Robert_Mika,

This is full expression. This was used in a variable.

robert_mika
Master III
Master III

Does it work?

Because with this syntax it will throw error

qlikviewwizard
Master II
Master II
Author

Hi Robert_Mika,

Yes. This is used in an existing application.

robert_mika
Master III
Master III

What's the result ?

qlikviewwizard
Master II
Master II
Author

Just it is showing '-'.

Anonymous
Not applicable

Looks like a variable with parameter.  If you have a variable vYear defined as

year(today())-$1 

You can use it in a text box

=$(vYear(5))

and it will return 2010

Edit: see attached

Not applicable

Hi

This is an expression. First part of the expression = year(today()) will give the current year.

Second pert $1 is variable with parameter. before use that first you have to create variable.

ex : eyear = year(today()) - $1

Please check the example I found :

eDeparturePerformed_VarUnit = Sum(# Departure Performed ) / 1$


1. 1st Expression - No of Flight will be = $(eDeparturePerformed_VarUnit (1))

2. 2nd Expression - No of Flights ( Thousand ) = $(eDeparturePerformed_VarUnit (1000))

2. 3rd Expression - No of Flights ( Millions ) = $(eDeparturePerformed_VarUnit (1000000))

qlikviewwizard
Master II
Master II
Author

Hi mov,

Thank you so much.