Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
We are converting some Business objects reports, using a list of filters in Qlikview. I am having a button in qlikview for each report. The button has the list of conditions inbuilt so when a user clicks on the button, the report gets generated as per the conditions given inside the button.
Couple of issues here:
1. Date compare. I have this in Field
=date(TEST_EXPIRATION_DT)
I have given this in Search String
=date(now(),'MM/DD/YYYY')
but it's not working. Basically I want to filter out records when the test_expiration_dt matches sysdate/current date
2. How to handle OR conditions. I don't see an option for this within Button. Do we have any other way to handle the combination of 'OR' and 'AND' conditions?
But this gives me all the dates that are greater than today. I want to restrict it to just one day i.e today. I tried '>=' in the above expression. It looks fine but it is filtering out all dates greater than today. Please help me how to handle '>='
Try
= '>' & TIMESTAMP(FLOOR(TODAY())) and '<=' & TIMESTAMP(DayEnd(TODAY()))
hth
Sasi
The Expression looks OK but it does not work.
I didn't realize there would be dates greater than today in there. I would encourage you to create a field in your data model via the script that is just the date.
FLOOR(TEST_EXPIRATION_DT) as TEST_EXPIRATION_DATE
Then use the button to select in that field instead
Please try one more time
= '>=' & TIMESTAMP(FLOOR(TODAY())) & ' and <=' & TIMESTAMP(DayEnd(TODAY()))
Today() does not contain time information and the comparison should be on the value of the date, so all he Floor()ing and formatting is unnecessary and just confusing the issue. Something like this should work:
>=(Today()) Ans <(Today() + 1)
Hi,
The expression is valid and it is even appearing correctly in 'Current Selection'; however, the data is not filtered as per the range we specify.
However converting the original timestamp column to date and then using a simple equal to is working fine. So problem solved
Thank you very much!
That's true. I too realized it. Thanks!
Hi,
Thank you very much! This suggestion works! I converted the timestamp to date column, so specifying a date range is not necessary now.