Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Now Live: Qlik Sense SaaS Simplified Authoring – Analytics Creation for Everyone: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
smilingjohn
Specialist
Specialist

Date

Hi All ,

I want to creat a variable which should show current month today

how can i do this ?

1 Solution

Accepted Solutions
qlikcheepirishe
Creator
Creator

=num(month(now()))

it will display month to num for example June the above definition will display '6'

View solution in original post

10 Replies
Anil_Babu_Samineni

Is that Current month in selection? Perhaps this

LET Variable1 = Today();

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
devarasu07
Master II
Master II

Hi,

You can create variable like below,

vMaxMonth

=max(Month(Today()))                // this will return latest year month no

or

=MonthName(addmonths(today(),1))  // this will return latest year with month name

and also you can write the expression in chart like below

=$(=max(month(Today())))

Hope this helps you

Regards,

Deva

smilingjohn
Specialist
Specialist
Author

Hi Anil

NO we are not making any month selctions ,

i have month as a field in the script which has moths in that ,

So i want to have to vairable whch should shouw current month

thanks

prma7799
Master III
Master III

You can create variable in variable expression or using LET

vCurrMonth=month(Today());

qlikcheepirishe
Creator
Creator

=Month(Today()) will display Jun

just do Ctrl+Alt+V then click on add

name write vMonth in definition =Month(Today())

Not applicable

Hi there,

You can also do this by

LET vMonthYear =monthname(Today())

it will give you 'Jun 2017'

Thank You.

smilingjohn
Specialist
Specialist
Author

Thanks for the reply mahesh ,

How can we cover the month field which has text as jun,jul,august ....son into month number ?

I want to display the current month into number

Thats is 6  for jun ?

qlikcheepirishe
Creator
Creator

=num(month(now()))

it will display month to num for example June the above definition will display '6'

prma7799
Master III
Master III

=num(month(Today()))