Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
mario-sarkis
Creator II
Creator II

4 month back


Hey all ,

Lets say i have this type of Data:

Date         ID

Date field has a form as number my requirement i need to extract the data with a condition that the date >= four month back of the (max(date)

Exmple: if my date field has a maximum date as (MM/DD/YYY)'12/3/2015' i need to extract it from '8/3/2015'

Thank you,

4 Replies
MK_QSL
MVP
MVP

You can use Set Analysis but not clear from your question. Where you want to use this? List Box? Tables or Charts?

mario-sarkis
Creator II
Creator II
Author

Hey Manish ,

i need to write it in script ,

i need to extract my data with a condition that my date >= four month back of the (max(date),

hope u can help

sasiparupudi1
Master III
Master III

example expression

Sum({$<[Your Date] = {">=$(=Date(AddMonths(Max([Your Date]), -4), 'MM/DD/YYYY')) <=$(=Date(Max([Your Date]), 'MM/DD/YYYY'))"}>} [Your Amount])

mvanlutterveld
Partner - Creator II
Partner - Creator II

Hi,

Create a variable in the script like LET vStartDate = Addmonths(Today(),-4) ;

Extract your table using a Where clause: Where <YourDateField> >= '$(vStartDate)';

If you want your start date variable be based on a maximum date from a table you first have to declare a variable that peeks your max date like: https://community.qlik.com/message/826165#826165