Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
Not applicable

Creating a New Variable

Hi All,

I need to create a variable say as Month which needs to have the values as Jan-09,Feb-09,...etc dynamically.Can some one help me out on this.?

Thanks,

Arun

Tags (1)
5 Replies
sparur
Valued Contributor II

Creating a New Variable

Hello, Arun.

If you have a field MonthYear, you can create a variable vMonth = MonthYear.

then when you will select one value from MonthYear field - your variable will be evaluate.

Not applicable

Creating a New Variable

hi

you can use:

LET vMMMYY = Date(today(),'MMM-YY');

Not applicable

Creating a New Variable

Hi Arun,

Could you elaborate a bit further on the need of the variable and what do you mean by "dynamically"?

Not applicable

Creating a New Variable

Hi Jain,

Thanks for your reply.My problem is that i have a variable month in the format 'Jan-09','Feb-09',,,,etc.Now if i want to use this month filed which takes the values dynamically (i.e) if i specify a condition as current month it has to take the latest month(June) from the Month variable and previous month as last month(May).

Not applicable

Creating a New Variable

Sorry for th delayed response

In case you just want to use the current and the previous month you could use the following formula to get the month # of the current and the precious month

Current month = Month( max(Date))

Previous month = Month( max(Date)) - 1