Skip to main content
Announcements
Defect acknowledgement with Nprinting Engine May 2022 SR2, please READ HERE
cancel
Showing results for 
Search instead for 
Did you mean: 
ali_hijazi
Partner - Master II
Partner - Master II

Advanced Search or Evaluate value

Hello I'm trying to create a filter in Nprinting
I'm selecting the desired field (MONTH_NUM)
the value I want is the maximum one where scenario type is ACTUAL
the expression to get this value is 
max({<SCENARIO_TYPE={actual},LAST_FISC_MONTH={1}>}MONTH_NUM)

in the filter setup I chose the field MONTH_NUM
in the advanced search I put 
=MONTH_NUM = max({<SCENARIO_TYPE={actual},LAST_FISC_MONTH={1}>}MONTH_NUM)
however when the preview the result in Nprinting designer the data returned is not filtered as month num = 202405
while 202405 is returned by the above expression

I also tried evaluate value option and put the expression above and still the result is not reflected

kindly advise

I can walk on water when it freezes
Labels (2)
5 Replies
TauseefKhan
Creator III
Creator III

Hi @ali_hijazi,

In NPrinting filters do not evaluate set analysis expressions in the same way as Qlik Sense apps.


Create a Variable in Qlik Sense App that calculates the maximum MONTH_NUM where SCENARIO_TYPE is "actual" and LAST_FISC_MONTH is 1.


vMaxMonthNum = max({<SCENARIO_TYPE={'actual'},LAST_FISC_MONTH={1}>} MONTH_NUM);

Use the variable you created in the Qlik Sense app.

Filter Setup in NPrinting: In the filter setup for MONTH_NUM, you would use the "Evaluate value" option and enter the expression as:

= $(vMaxMonthNum)

This tells NPrinting to use the value calculated by the variable in the Qlik Sense app.

Preview the report in NPrinting Designer to ensure that the data is filtered correctly.

***Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.***

Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

hi @ali_hijazi 

I have to disagree with @TauseefKhan as set analysis works exactly the same as on QlikView/Qlik Sense. 
Your advanced search filter should be just:

=max({<SCENARIO_TYPE={actual},LAST_FISC_MONTH={1}>}MONTH_NUM)

same for evaluate value filter, however with evaluate value you have to make sure result is a single value of your expression and has exactly the same data type as your searched field (text or numerical). I have explained those scenarios here:

https://nprintingadventures.com/category/nprinting/filters/
have a read through the posts to understand more how important it is to properly set and use the data type of the filter. Most of community issues I came by were because of that very reason. 
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.
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

I will just follow up-do you have any other filters you are trying to use with this filter as that has to be considered when using advanced search which will be used as intersection of those other possible filters.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.
ali_hijazi
Partner - Master II
Partner - Master II
Author

Yes there are 2 other filters but these 2 are simple I use the value option and select the desired value

Without the filter I'm having problem with, output is reflected correctly

 

But when I add this filter is like it's ignored and not applied 

I can walk on water when it freezes
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi @ali_hijazi 

yes - the other filters can be simple. They may interfere with advanced search filter too. 
But - as mentioned before, the most important thing is to establish what is the datatype of your field, how is it loaded to your data model and validate that advanced search filter works in Qlik Sense UI. 
Lastly-make sure your app does not have any unsupported objects like alternate states or „always one selected value” fields. 
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.