Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
samuel_brierley
Creator
Creator

Selecting Last 3 months

Hi all,

Can anyone see where im going wrong with the below expression to select the last 3 months?

='>='&MakeDate(year(now()),AddMonths(now(),-3),1)&'<='&MakeDate(year(now()),month(now()),1)

1 Solution

Accepted Solutions
sunny_talwar

Try this:

='>=' & MakeDate(Year(Now()), Month(AddMonths(Now(), -3)), 1) & '<=' & MakeDate(Year(Now()), Month(Now()), 1)

View solution in original post

5 Replies
sunny_talwar

Try this:

='>=' & MakeDate(Year(Now()), Month(AddMonths(Now(), -3)), 1) & '<=' & MakeDate(Year(Now()), Month(Now()), 1)

samuel_brierley
Creator
Creator
Author

hahahha always something simple

thanks

sunny_talwar

Difference between your expression and the new expression in a text box object just so you can visualize the difference:

Capture.PNG

HTH

Best,

Sunny

jonathandienst
Partner - Champion III
Partner - Champion III

In what context are you using that conditional. The syntax is wrong for set analysis. Maybe this:

<datefield = {">=$(=MonthStart(now(), -3)) <=$(=MonthEnd(now()))"}>

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
sunny_talwar

Hahahaha yup

I am glad we were able to quickly figure it out. I suggest closing this thread by marking the correct answer and any helpful answers.

Best,

Sunny