Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
RobMazaheri
Contributor III
Contributor III

Nprint issue

Hi I am using Nrpint for some data but I cannot seem to get the filter to select the lastest weekending date

i've tried lots of options on co pilot but nothing works

for example in advance search 

=REPORTING_WEEK=Max(REPORTING_WEEK)

=REPORTING_WEEK = Max({1} TOTAL Aggr(If(Len(Trim(REPORTING_WEEK))>0, REPORTING_WEEK), REPORTING_WEEK))

 

=Max({1} TOTAL Aggr(If(Len(Trim(REPORTING_WEEK))>0, REPORTING_WEEK), REPORTING_WEEK))

 

 none of these work 

hope someone can help 

1.jpg

 

Labels (1)
2 Replies
Vegar
MVP
MVP

Could it be that your field is a dual, and that you are dking a string comparison between the string value and the numeric that is returned from using max(REPORTING_WEEK)?

It's been a while since I used NPrinting, but I believe you should be able to state that you want to do comparisons on the numeri(or evaluated) value. Alternatively, force your expression to return a string, maybe by using maxstring(REPORTING_WEEK) instead.

Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Many issues here:

  1. what is the datatype of the Reporting_Week field
  2. to use formula you need to change type of filter from "Value is" to either "Evaluate value" or "Advanced Search"
  3. Depending on the type of the field you need to make sure your formula returns such type. It is critical to understand that duals are numerical values with possible symbol representation and in NPrinting we need to pass numerical value of it.

I wrote quite a few posts about this and I strongly encourage you to read about it to get an understanding of the issue rather than trying to guess: 

https://nprintingadventures.com/2019/02/15/the-pitfalls-of-nprinting-filters-part-1-dates-and-duals/

https://nprintingadventures.com/2022/03/19/filters-in-nprinting-how-hard-can-it-be-part-3-evaluate-v...

https://nprintingadventures.com/2019/06/26/nprinting-filters-part-3-advanced-search/

https://nprintingadventures.com/2024/11/29/advanced-search-filter-trap/

 

cheers

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.