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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
MCmiranda
Contributor II
Contributor II

Button for YearToDate selection

Hello smarties,

I want to make a button for the selection of the last 12 months and a selection of the last month.

I find a variety of functions, but don't know which one to use.. Anybody can set me up with this?

 

I've set Action:

Select value in a field -> field -> name is 'Date Check' 
Now I have to put in a value.. To get the last 12 months from today.

 

 

Labels (2)
1 Solution

Accepted Solutions
GaryGiles
Specialist
Specialist

Try this:

=Concat({1<[Date Check]={"<$(=Today())>$(=AddMonths(Today(),-12))"}>} [Date Check],';')

View solution in original post

4 Replies
GaryGiles
Specialist
Specialist

Try this:

=Concat({1<[Date Check]={"<$(=Today())>$(=AddMonths(Today(),-12))"}>} [Date Check],';')

QFabian
MVP
MVP

>=addmonths(yourdate, -12) <= yourdate

Greetings!! Fabián Quezada (QFabian)
did it work for you? give like and mark the solution as accepted.
MCmiranda
Contributor II
Contributor II
Author

Thank you, this is awesome!

MCmiranda
Contributor II
Contributor II
Author

Hi Gary,

I believed I could figure the code for the selection of this month myself, for the other button.. But I can't

I tried:

=Month(Today())

=AddMonths(Today(),1)