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

Announcements
FLASH SALE: Save $500! Use code FLASH2026 at checkout until Feb 14th at 11:59PM ET. Register Now!
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

Labels (1)
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 $