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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Problem with set analysis restricting months

I have a Set Analysis showing the last 3 months according to what the user selected month, if I select October, the chart shows

data for July, August and September, the correct is August, Setember and October. Follows the current formula:

num( Sum({$<Calendar.Month={'>=$(=max(Calendar.Month-3))<=$(=max(Calendar.Month))'} Table.Value) '#.##0M')

Labels (1)
1 Solution

Accepted Solutions
Not applicable
Author

or try this

num( Sum({$<Calendar.Month={'>=$(=max(Calendar.Month-2))<=$(=max(Calendar.Month+1))'} Table.Value) '#.##0M')

View solution in original post

2 Replies
Not applicable
Author

hi

for previous 3 month data try this

sum({<Datefieldname={">=$(=monthstart(max(Datefieldname),-3))<=$(=monthend(max(datefieldname),-1))"}, year=,month=>}TableValue)

Not applicable
Author

or try this

num( Sum({$<Calendar.Month={'>=$(=max(Calendar.Month-2))<=$(=max(Calendar.Month+1))'} Table.Value) '#.##0M')