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?
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
The "Field" field of the button action is going to be looking for a an actual field in the data model. So I don't think you can put a function on the field here. I could be wrong.
Try Field = TEST_EXPIRATION_DT
Search String = NUM(TODAY())
You can remove the NUM() if TEST_EXPIRATION_DT is not a number in the data model.
Not sure what you mean by AND/OR conditions without an example. You can do advanced searches within a field that can do all kinds of extensive logic though. For example, searching in an ID column with "=FIELD_A = 'YES' OR FIELD_B = 'YES'"
Thanks for your reply. I tried but it does not work. It is a date datatype so I had removed num() and still it did not work. Please assist.
Thanks,
Sudha.
Would you be able to attach a sample qvw? You can scrub out any sensitive information, but it's helpful to make sure I understand exactly what you are trying to do
!It's a date datatype coming from a database table so I am not sure how to attach the qvw. But I just did as you had demonstated.
Try this
=DATE(FLOOR(TODAY()))
This works in my data model where I have the date as a number =FLOOR(TODAY())
It looks like your field is a timestamp.
Try Field = TEST_EXPIRATION_DT
Search String = Timestamp(now(),YourtimestampFormat)
hth
Sasi
Hi,
You are right. Though it's a date datatype, it appears like a timestamp value. I tried what you had suggested and it does not work still.
Ah I see the problem from that screenshot. What you are searching for there is the exact moment you click the button. But it sounds like you want any records that have occured at any point during the day, correct?
So you should be about to put in the search field
= '>' & TIMESTAMP(FLOOR(TODAY()))
This would be telling it to search for any value that occured since the beginning of the day
Thank you so much! This is working