Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
On Demand Webinar: See Why Thousands of QlikView Users Have Switched to Qlik Sense. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to truncate date list box at today's date

Hi,

I have a list box in my sheet for date (MM/DD/YYYY). Selecting dates on this box slices the model.

I have the dates there sorted in descending order, and the problem is I see future dates there on top. I have records with dates all the way up to 2016 and that's of no use for me...

How do I get the list box to show dates only up to current day? (that is, not today, April 10th, but the day the sheet is accessed).

Thank you!

Al

20 Replies
yduval75
Partner
Partner

I think the best is to create other time fields like Year, Month in your script . Month(Date) as Month, Year(Date) as Year.

Then, the user could select 2014 and april and see only the dates for this selection by sorting the list box by descending order and state.

MK_QSL
MVP
MVP

In the List Box Expression... write down below

If(Date <= Today(), Date)

sudeepkm
Specialist III
Specialist III

How do I get the list box to show dates only up to current day? (that is, not today, April 10th, but the day the sheet is accessed).

When you say the day the sheet is Accessed does that mean the last time the document was opened or the last time the Data were loaded like document reload time() ?

Otherwise it will always be the same date as of Today. Please clarify.

Not applicable

Hi,

I mean today, as in =today() in excel.

MK_QSL
MVP
MVP

Try the replied I have given..

Not applicable

hi,

this doesn't achieve the needed result. This is what I get:

date_field.PNG.png

This is what I want:

date_desired.PNG.png

Not applicable

see my comment please

MK_QSL
MVP
MVP

Check enclosed file...

Not applicable

thanks for this.

want to hear something strange? even though the model was updated today, and even after I hit "clear", it still only goes up until April 8th, not 10th. And for sure I have data in my model from today and yesterday.