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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Expression not working -sum({<MonthYear={">=$(addmonths(max(PM_YearMonth),-5))<=$(addmonths(max(PM_YearMonth),0)"}, FiscalYear=,FiscalMonth=>}PM_Actual)

Hi all,

I am facing issue with the expression. It's not working.

It basically calculating previous 6 months actuals

Thanks


1 Solution

Accepted Solutions
Kushal_Chawda

I think you are missing ')'

=sum({<MonthYear={">=$(addmonths(max(PM_YearMonth),-5))<=$(addmonths(max(PM_YearMonth),0))"}, FiscalYear=,FiscalMonth=>}PM_Actual)

View solution in original post

4 Replies
Kushal_Chawda

I think you are missing ')'

=sum({<MonthYear={">=$(addmonths(max(PM_YearMonth),-5))<=$(addmonths(max(PM_YearMonth),0))"}, FiscalYear=,FiscalMonth=>}PM_Actual)

sunny_talwar

You might need another parenthesis at the end:

-sum({<MonthYear={">=$(addmonths(max(PM_YearMonth),-5))<=$(addmonths(max(PM_YearMonth),0))"}, FiscalYear=,FiscalMonth=>}PM_Actual)'

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Try sum({<MonthYear={">=$(=addmonths(max(PM_YearMonth),-5))<=$(=max(PM_YearMonth))"}, FiscalYear=,FiscalMonth=>}PM_Actual)


talk is cheap, supply exceeds demand
Anonymous
Not applicable
Author

Hi,

I think you need to use single quotes.

eg:

sum({<MonthYear={'>=$(addmonths(max(PM_YearMonth),-5))<=$(addmonths(max(PM_YearMonth),0))'}, FiscalYear=,

         FiscalMonth=>} PM_Actual)