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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
lakshman1031
Contributor III
Contributor III

How to restricted last 13 month data in filter

Hi All,

I have Date field and in that date having MMM YYYY format.

I have take this date filed in to filter. My date field having last 5 years data but i want to see last 13 months data in filter.

Can you please suggest me how to do in this scenario.

 

Thanks & Regards,

Lakshman

Labels (1)
1 Solution

Accepted Solutions
Kushal_Chawda

@lakshman1031  If your Month is formatted as Numeric, you can try below expression in filter. If it is text you need to make it in Numeric format with date(Date#(Month,'MMM YYYY'),'MMM YYYY') as MONTH in load script

aggr(only({<MONTH ={">=$(=date(addmonths(max(MONTH),-12),'MMM YYYY'))<=$(=date(max(MONTH),'MMM YYYY'))"}>}MONTH),MONTH)

 

 

View solution in original post

1 Reply
Kushal_Chawda

@lakshman1031  If your Month is formatted as Numeric, you can try below expression in filter. If it is text you need to make it in Numeric format with date(Date#(Month,'MMM YYYY'),'MMM YYYY') as MONTH in load script

aggr(only({<MONTH ={">=$(=date(addmonths(max(MONTH),-12),'MMM YYYY'))<=$(=date(max(MONTH),'MMM YYYY'))"}>}MONTH),MONTH)