Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
One of my filters I use in NPrinting does not work. Either the table that should be produced is absent (very wrong expression I guess) or the table is present, but this one filter has not been applied.
I try to set the filter with the "evaluate" option. I tried a lot of different expressions, but none of them is working.
The table in QlikView (12.20.20400.0)
The table on which the filter should apply is a table with just 4 values, all dates. 3 of them are loaded from an excel-file, one (the one I'm trying to filter) is generated from the script bij the statement vLastPreviousMonthDay=Date(MonthEnd(Today(),-1),'DD-MM-YYYY') and then added tot the table with $(vLastPreviousMonthDay)
The filter in NPrinting (February 2018 SR1)
I use three filters in NPrinting to generate the table. Two of them are of the type "Value is" or "Numeric value is" and work correctly. This specific filter should be dynamic, to always present the data filtered by the last day of the previous month. So I use "Evaluate value" with (at first) the same expression as the script in QlikView that generated this date.
I tried these expressions, all with no luck:
=Date(MonthEnd(Today(),-1),'DD-MM-YYYY')
=Text(Date(MonthEnd(Today(),-1),'DD-MM-YYYY'))
=Num(Date(MonthEnd(Today(),-1),'DD-MM-YYYY'))
=Date(MonthEnd(Today(),-1))
=Text(Date(MonthEnd(Today(),-1)))
=Num(Date(MonthEnd(Today(),-1)))
=MonthEnd(Today(),-1)
=Text(MonthEnd(Today(),-1))
=Num(MonthEnd(Today(),-1))
and all above with Now() instead of Today(). I noticed that the expressions with "Text(" will return the table, but not with te filter applied. The Num() versions leave the produced table absent (so that's not the way!)
Note:
When I just say "numeric value is" and then "31-03-2018" as the expression, the filter is set correctly. (but it doesn't work with "value is" instead of "numeric value is"). So: somehow the expression is incorrect?
Can anyone help me?
Greetz,
Jan-Geert Taekema.
Ok then
I just tested it in my environment and i did not have any issues.
Since you are doing MonthEnd function it actualy creates a timestamp value like fore example 2018/04/01 23:59:59
try this maybe..
Can you please try using Floor function (both - in your variable when creating field and in your NPrinitng filter):
variable:
vLastPreviousMonthDay = Date(Floor(MonthEnd(Today(),-1)),'DD-MM-YYYY')
NPrinitng Filter:
=Num(Floor(MonthEnd(Today(),-1)))
hth
cheers
Lech
Hi,
I apologise for my ignorance but despite quite broad description i do not undestand what you are trying to actualy filter.
Let me give you an example how this works.
NPrinitng filters are refering to fields in your Qlik data model. Therefore for us to help you solve filtering problem thing we need to know are:
more about filters here:
Re: Nprinting Filters not working on Excel Documents
Once we know this we will be able to establish what value needs to be evaluated in NPrinting filter and against which field.
To help us little bit more it would be good to:
I am under impression that you are mixing filters with variables which are completly different things and therefore not working for you.
NPrinting is not supporting variable triggers (or so called variable filters) see table under this link:
https://help.qlik.com/en-US/nprinting/February2018/Content/Introduction/Introduction.htm
cheers
Lech
---------------------------------------------
When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads as HELPFUL if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads as HELPFUL if you feel additional info is useful to others.
Hi Lech,
Thanks for replying. Here's some information.
The table has only one field, which is also the primary key, linked to two other tables. Here's the complete datamodel (Dutch language, sorry 😞
And here the preview content (screenshot) of the table "Peildatum":
The script I use to generate this table is as follows (the Excel-file has two dates: 01-10-2016 and 01-20-2017):
LET Vandaag=Date(Today(),'DD-MM-YYYY');
LET LaatsteDagVorigeMaand=Date(MonthEnd(Today(),-1),'DD-MM-YYYY');
Peildata:
LOAD
Date(Peildatum,'DD-MM-YYYY') as Peildatum
FROM
[datefile.xlsx]
(ooxml, embedded labels, table is Blad1);
LOAD * INLINE [
Peildatum
$(Vandaag)
$(LaatsteDagVorigeMaand)
];
I'm not sure I understand your next question, but to be sure, I give you the most information I can give that I think is relevant.
In NPrinting I have this filter applied at this moment, this is working fine:
But I would like it to be something like this:
For your information: I apply this filter on the publish-task.
I hope this below is what you mean by screenshotting the listbox with the values of this table, with the one selected that I would like to be filtered in NPrinting:
If you need more information, please let me know! Thanks for helping so far!
Greetz,
Jan-Geert Taekema.
Great - thats all what we need - let me work my ways through this example and get back to you tomorrow.
I see what you are doing now.
cheers
Lech
Ok then
I just tested it in my environment and i did not have any issues.
Since you are doing MonthEnd function it actualy creates a timestamp value like fore example 2018/04/01 23:59:59
try this maybe..
Can you please try using Floor function (both - in your variable when creating field and in your NPrinitng filter):
variable:
vLastPreviousMonthDay = Date(Floor(MonthEnd(Today(),-1)),'DD-MM-YYYY')
NPrinitng Filter:
=Num(Floor(MonthEnd(Today(),-1)))
hth
cheers
Lech
Hi Lech,
You are the best! This is the solution, all works fine for me now!
Greatings,
Jan-Geert Taekema
my pleasure
cherrs
LEch