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: 
katierusso
Contributor II
Contributor II

Auto Calendar: MonthsAgo stopped working correctly

This was working the last time I had the app open.  Now it seems like Qlik is ignoring the set expression. 

Qlik Sense February 2023 Patch  7

Using this formula in a KPI: sum({<[my_date.autoCalendar.MonthsAgo]={0}>} my_count)

Using Auto Calendar code:

[autoCalendar]:
DECLARE FIELD DEFINITION Tagged ('$date')
FIELDS
   12*Year(vMaxMonth)+Month(vMaxMonth)-12*Year($1)-Month($1) AS [MonthsAgo] ,
floor((12*Year(vMaxMonth)+Month(vMaxMonth)-12*Year($1)-Month($1))/12) AS [Rolling12Mo] ,
  Month(vMaxMonth)-Month($1) AS [MonthRelNo] ,
  If(WeekDay($1)<=WeekDay(vMaxMonth),1,0) AS [InWTD] ,
  (WeekStart(vMaxMonth)-WeekStart($1))/7 AS [WeeksAgo] ,
  Week(vMaxMonth)-Week($1) AS [WeekRelNo] ;

DERIVE FIELDS FROM FIELDS [my_date] USING [autoCalendar] ;

Labels (1)
1 Reply
katierusso
Contributor II
Contributor II
Author

2023-08-25_15-56-08.jpg

Notice that the MonthsAgo field is populating correctly in this table too! Why is this no longer working in set expressions?