Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Kushal_Chawda
MVP
MVP

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

Labels (1)
1 Solution

Accepted Solutions
Kushal_Chawda
MVP
MVP
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
MVP
MVP
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
MVP
MVP
Author

Hi,

Got the answer..

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