Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
Arjunarao
Honored Contributor II

Expression meaning

What is the meaning of the below expression meaning?

=year(today())-$1

Thanks in advance.

1 Solution

Accepted Solutions
mov
Esteemed Contributor III

Re: Expression meaning

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

10 Replies

Re: Expression meaning

is this full expression?

Where are you using it?

Arjunarao
Honored Contributor II

Re: Expression meaning

Hi Robert_Mika,

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

Re: Expression meaning

Does it work?

Because with this syntax it will throw error

Arjunarao
Honored Contributor II

Re: Expression meaning

Hi Robert_Mika,

Yes. This is used in an existing application.

Re: Expression meaning

What's the result ?

Arjunarao
Honored Contributor II

Re: Expression meaning

Just it is showing '-'.

mov
Esteemed Contributor III

Re: Expression meaning

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

Re: Expression meaning

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

Arjunarao
Honored Contributor II

Re: Expression meaning

Hi mov,

Thank you so much.