Qlik Community

Ask a Question

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
April 22, 2PM EST: Learn about GeoOperations in Qlik Sense SaaS READ MORE
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 (3)
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],';')

View solution in original post

QFabian
Specialist II
Specialist II

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

QFabian
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)