Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
jonathanrichey
Contributor III
Contributor III

Set Analysis Max Month Year

Is it possible to nest a set analysis with the Max month and year?

Current set Analysis (working):

(sum({<PeriodType={'Rolling 12'}>}MonthYear_Flg))

Desired:

When adding the Max function the syntax returns an error in the expression:

(sum({<PeriodType={'Rolling 12'}, Max(AsOfDate)>}MonthYear_Flg))

1 Solution

Accepted Solutions
dplr-rn
Partner - Master III
Partner - Master III

sure. in your expression

add

MonthYear={"$(=max(MonthYear))"}

or MonthYear={"$(=date(max(AsOfDate), 'MMM-YYYY'))"}

or if you dont have a master calendar

AsOfDate={">=$(=monthstart(max(AsOfDate)))"}  // just great or equal to first of the month

View solution in original post

3 Replies
dplr-rn
Partner - Master III
Partner - Master III

sure. in your expression

add

MonthYear={"$(=max(MonthYear))"}

or MonthYear={"$(=date(max(AsOfDate), 'MMM-YYYY'))"}

or if you dont have a master calendar

AsOfDate={">=$(=monthstart(max(AsOfDate)))"}  // just great or equal to first of the month

jonathanrichey
Contributor III
Contributor III
Author

Awesome! Thanks for the response Dilip!

dplr-rn
Partner - Master III
Partner - Master III

no problems