Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
william_denholm
Contributor III
Contributor III

Date - Button

Hello,

I am looking to create three buttons that will show data for the current day, days 2-6 (ie tomorrow onwards) and then +7 days.

The field is called APPOINTMENTSTART and the data is in the format of

02/07/2015 08:00:00

I have tried to use various combinations of TODAY() etc but none seem to work. Anyone have any ideas?

Thanks.

6 Replies
datanibbler
Champion
Champion

Hi William,

what data do you want to display using these? Only the date and that time (08:00:00)?

Try (Today()+1)

swuehl
MVP
MVP

Maybe like attached?

edit: in case you can't open the QVW, here are the search strings for the three button (Action Select-Select in field):

Today:

='>='&daystart(today())&'<='&DayEnd(today())

2-6:

='>='&daystart(today()+1)&'<='&DayEnd(today()+6)

7+:

='>='&daystart(today()+7)

datanibbler
Champion
Champion

Ah,

I think I misunderstood. Correct me if these assumptions are wrong:

- You have a field calles APPOINTMENTSTART

- That always has the time of 08:00:00 and some date

- You want to display the data of some other fields, automatically selecting on that field APPOINTMENTSTART

If yes, you could possibly do that using set_analysis, but the easiest to implement would probably be putting a selection_trigger ("select in field") on the buttons. For the latter two (2-6 and 7) you will have to use some adanced search_strings. Try that out.

First, though, you will have to split the date_part from your APPOINTMENTSTART.

=> Then, in general

- Click on the listbox of the date_field (or any other, it should work on whichever field through associative search)

- Type sth like >> = [date_of_APPOINTMENTSTART] > (Today()+1) <<

- If you have that search_string in a selection_trigger, you might have to wrap it in quotes.

HTH

sunilkumarqv
Specialist II
Specialist II

swuehl
MVP
MVP

In case you have trouble interpreting your APPOINTMENTSTART field correctly, please have a look at

Get the Dates Right

Why don’t my dates work?

william_denholm
Contributor III
Contributor III
Author

Thanks all. Various pieces from the links provided.

Had to set the format of the field as date.

Then created variables for the various options I was looking for.

Added these variables to the button field searches.