Qlik Community

Ask a Question

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Talk to Experts Tuesday, January 26th at 10AM EST: Qlik Sense. REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Month convert to Number

Hi All,

I have a formula which is like

sum

({$<month={num(month(addmonths(today(),-3,1)),'00')}, BUCKET5={"A.*"}>}CURROSSGD)

I got a variable called month. Another variable is BUCKET5. I want to sum up the CURROSSGD.

I would like to get the month value equal to 3 month ago from current month (such as Dec 2014 as today is 17/03/2015.

But anything wrong with the formula above? Why the num is black? Qlikview keeps telling me I got errors.

Anyone can help me out on this?

Thanks a lot.

5 Replies
Not applicable

Try now

=sum({$<month={"$(=num(month(addmonths(today(),-3,1)),'#,##0'))"}, BUCKET5={"A.*"}>}CURROSSGD)




Not applicable

Hi

Try this

=sum({$<month={"$(=num(month(addmonths(today(),-3))))"}, BUCKET5={"A.*"}>}CURROSSGD)

Partner
Partner

Hi

create variable as

vMonthNum = num(month(addmonths(today(),-3)))

Use above variable in expression

({<month = {"$(vMonthNum)"},BUCKET5 = {"A*"}>} CURROSSGD)

MVP & Luminary
MVP & Luminary

Hi,

Try like this

Month(AddMonths(Today(), -3))

Regards,

Jagan.

Specialist
Specialist

You cant use the Months variable if it contains Jan , Feb , Mar , April ect as Dec -3 is not march.

You should rather use the another variable which contains Month and year together  Dec-14 , Jan15 , Feb-15.

Now you can say Month(AddMonths(Period, -3) )