Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
is there a way I could sort and get top 10 Dates / latest dates in Qlik Nprinting (HTML and PDF) format.
Yes - There is.
but before I spend time thinking how you would like to present it please invest time to write detailed explanation what you aretrying to achieve. Are you:
Note - that most of the things need to be done in Qlik Sense before even reaching NPrinting. As I always say: 90-95 % NPrinitng development lays in proper Qlik Sense development.
In any case it is important that you have full knowledge about data type and the way you load dates to your Qlik data model (for example: Date(Floor(yourdate)) as SomeDate ) as that will tell us 2 important informations:
I wrote quite a few posts about dates and filtering and common mistakes people do when not understanding how filtering works. I suggest you have a good read which will help you to get a concept of how to use filters:
After reading above and once you tell us what you are trying to achieve we can give more guidence.
cheers
No the Date field is not actually in the date format , and that's the reason i wasn't able to achieve any thing like this in Nprinting
=[Datefield]<=$(=max(DateField))-1
so i thought may be sorting and having to display the top 10 would do that
Sitll - not enough information for us to comment.
If your date is not a date - then what is it? How can you sort something if you dont know the field type. You cant tell if it will sort by text or by numeric value. Depending on type you may use
Regardles - there is always a way to get things right and convert your value to dates using Date#() function in load script. https://help.qlik.com/en-US/qlikview/May2024/Subsystems/Client/Content/QV_QlikView/Scripting/Interpr...
I am guessing here too much so I let you comment on what we are actually dealing with. At the moment we know that: "you want to get max 10 dates which are not dates...."
Now i have the field in the date format as below
I want to filter out the table with the latest 3 days .
Hi @Qlikuser09
My prefered option in such case is usually option 2.
cheers
the above did not give any value in Npriting report , however when i try to fetch the same filter inside qliksense using the formula
Count({
<Datefield = {">=$(=Timestamp(Now()-6))"}>}
ID
) it actually gave me 70 records, is there some thing wrong with my Nprinting formula
='>=' & Timestamp(Now()-6)
Hi, I have given you all the links and asked to read them thorughly and carefully as explanation and pitfalls are described there.
When using "evaluate value" formula needs to return single value of the field which is why I explained that for max 10 dates you would have 1 filter with 10 values:
Study all the previously provided links carefully again also here are documentation links on subject:
You cannot have ">=" or "<=" in Evaluate Value filter as it is designed to only filter one value at the time returned from formula which is why for your max 10 you need to create 1 filter returning individually all 10 values as on my screenshot and becasue evaluate value requires correct data type to be provided (in case of properly create dates it should be numerical) you should be ok just with Max() function.
">=" and ",<=" option can be only used with advanced search, but in such case you would need make sure you take into account fact that advanced search filter is a formula working of currentl selection state so other filters may affect results if not handled properly.
The bits from the links I provided in my previous post:
cheers.