Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

Using Variable in For .. Next

Ho Guys

I have declared the Variable in the Back End Like Below:

Let _vYear = '=Year(Max(Today()))';

Now i want to use the above variable in my For Next statment :

For i = 2005 to $(_vYear)

-

-

-

Next

But it is not  working ....

Is there any other way to achieve the above :::::

3 Replies

Re: Using Variable in For .. Next

Let _vYear = Year(Today());

For i = 2005 to $(_vYear)

...


Next

hope it helps

Employee
Employee

Re: Using Variable in For .. Next

You don't even need the $-expansion. The following should also work:

Let _vYear = Year(Today());

For i = 2005 to _vYear

   ...

Next i

HIC

Not applicable

Re: Using Variable in For .. Next

try this

Let _vYear = Year(Today());

For i = 2005 to $(_vYear)

...


Next   i

Community Browser