Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
surajap123
Creator III
Creator III

Filter Months

Hi All,

I want to show last 6 months and last 12 months data to users using buttons(6 months button and 12 months button).

By default we want to show the complete data.

I have pivot table with Month-Year as a horizontal dimension.

Please help.

11 Replies
sasikanth
Master
Master

Hi suraj,

use triggers for this case try below expressions in "select in field trigger"

For 6 Months

= '<='&max(MYear) &'>='& date(addmonths(max(MYear),-5),'MMYYYY')


For 12 Months

= '<='&max(MYear) &'>='& date(addmonths(max(MYear),-11),'MMYYYY')


OR simply use this exp

Field : Date

search string : ='>='& Date(addMonths(max(Date),-5),'DD/MM/YYYY') &'<='& Date(max(Date),'DD/MM/YYYY')

attached application for your reference purpose

thanks

sasi

surajap123
Creator III
Creator III
Author

Thanks for your help. you are awesome.