Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Kushal_Chawda

Addmonths issue in chart

Hi,

I am facing issue with addmonths fucntion.

I have chart having dimension Product & product group. I want to show opening balance as closing of prev month.

I am using expression as sum({<MonthYear = {'$(=addmonths(MonthYear,-1))'}>} Amount) but its not working..

Please help me out to write the expression for getting previous month amount

1 Solution

Accepted Solutions
Kushal_Chawda
Author

Hi,

Got the answer..

sum({<MonthYear= {'=AddMonths(MonthYear,-1)'}>}Amount).. not required $

View solution in original post

3 Replies
CELAMBARASAN
Partner - Champion
Partner - Champion

How your are creating MonthYear  field?

Month(Date)& Year(Date) or using MonthName function?

Celambarasan

Kushal_Chawda
Author

Hi,

I am using monthname function..

For testing purpose when I am writing expression: addmonths(Monthyear,-1) in text object.  I am selecting year 2013 month Apr then getting Mar 2013.. So MonthYear field is proper.

Kushal_Chawda
Author

Hi,

Got the answer..

sum({<MonthYear= {'=AddMonths(MonthYear,-1)'}>}Amount).. not required $