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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Display Last Three Months

I have a field called DispLD, which represents the Load Date for file data.

I want to be able to show just the last 3 months based on this field. I have made an equation below in set analysis, which works, but is only showing the DispLD - 2. It is currently april, so the expression below shows results for February ONLY. I want to be able to show results for February, March and April.

DispLD = {'$(=Max(DispLD-2))'

DispLD is formatted as YYYYMM (i.e 201504 is April 2015)

Any help you can offer is appreciated.

Labels (1)
1 Solution

Accepted Solutions
pokassov
Specialist
Specialist

DispLD = {'>=$(=Max(DispLD-2))'

View solution in original post

4 Replies
pokassov
Specialist
Specialist

DispLD = {'>=$(=Max(DispLD-2))'

Anonymous
Not applicable
Author

Worked perfectly. Thank you for the quick response.

maxgro
MVP
MVP

in a chart with DispLD  as dimension

try expression

concat({$ <DispLD ={">=$(=date(addmonths(makedate(left(max(DispLD ),4), right(max(DispLD ),2)),-2),'YYYYMM'))<=$(=date(makedate(left(max(DispLD ),4), right(max(DispLD ),2)),'YYYYMM'))"}>} distinct DispLD , ' ')

pratap6699
Creator
Creator

DispLD = {'=date(=Max(DispLD-2),YYYYMM)'}