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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
robert99
Specialist III
Specialist III

Button search in field YTD based on today()

I want to set up a button that select the year to (and current month) day based on today()

I have tried for my Month (VisitMth) calendar

Field

VisitMth

Search String

=Month (today()

This works fine and selects the current month

But how can I get a year to date total

Field

VisitMth

Search String

='<=3'

This works. It returns Jan Feb and Mar

But if I combine the two

=  ' <= Month (today()'

it does not work

I'm sure there is a simple solution

Thanks

1 Solution

Accepted Solutions
maxgro
MVP
MVP

in my month field  this works

='<=' & num(Month(Today()))

I also add a second select in field for year

=year(Today())

try the difference in a textbox between

num(Month(Today()))          --> 3

Month(Today())                  --> mar 

View solution in original post

6 Replies
maxgro
MVP
MVP

if you want select date from start of the year to today

button

action

select in field

yourdatefield

='<=' & Today() & '>=' & YearStart(Today())

1.png

robert99
Specialist III
Specialist III
Author

How can you post an image as you have done above????

I'm sure I use to be able to copy and paste

http://eu-b.demo.qlik.com/QvAJAXZfc/opendoc.htm?document=qvdocs%2FWhats%20New%20in%20QlikView11.qvw&...

Or to select Jan Feb and Mar on this app

Thanks Massimo

What I want to do is select Jan Feb and Mar as shown above

I have tried

='<=' & Today() & '>=' & Month (Today())

This selected all 12 months

and thsi

='<=' & Month (Today())

This did not select anything

='<='  & Month (Today())

and neither worked

robert99
Specialist III
Specialist III
Author

Thanks Massimo

What I want to do is select Jan Feb and Mar for month (date) only

ie The list box for Month (Call_Date)

I have tried

='<=' & Today() & '>=' & Month (Today())

This selected all 12 months

and thsi

='<=' & Month (Today())

This did not select anything

='<='  & Month (Today())

and neither worked

maxgro
MVP
MVP

in my month field  this works

='<=' & num(Month(Today()))

I also add a second select in field for year

=year(Today())

try the difference in a textbox between

num(Month(Today()))          --> 3

Month(Today())                  --> mar 

robert99
Specialist III
Specialist III
Author

Thanks It works

robert99
Specialist III
Specialist III
Author

And for multi selection

Say Month

(Jan | Feb | Apr )

or Year

(2012 | 2013 | 2014 )