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

Announcements
Learn how to migrate to Qlik Cloud Analytics™: On-Demand Briefing!
cancel
Showing results for 
Search instead for 
Did you mean: 
rahulsingh12
Contributor III
Contributor III

Set Analysis

Hi,

How Should I write my expression if i want the last 6 months data to be selected from the current selected month?

Regards,

12 Replies
rahulsingh12
Contributor III
Contributor III
Author

if I give max(datefield) then will it take the current selected date or the max of the date available?

regards,

sunny_talwar

Current selected date will be your max date unless you ignore selection in date field using set analysis

pathiqvd
Creator III
Creator III

Hi Rahul,

      In script level write like this:-

date(MakeDate(Year(Date),Month(Date)),'MM-YYYY') as yy_mm

and write expression as

sum({<yy_mm={">=$(=date(MonthStart(AddMonths(min(yy_mm),-6)),'MM-YYYY'))<=$(=date(max(yy_mm),'MM-YYYY'))"}>}Sales) and also take filter yy_mm field . I think you will get solution.

Regards,