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: 
david_pearson
Contributor III
Contributor III

NP "OR" Filter

hi all, im just looking for some clarification. i have an excel template report set up in NP. i have created two filters, both "Value as" but i want to apply them as an OR option. i.e. filter the data where filter one is true OR where the data is part of filter two (this is a list of ref numbers). it is a limited data table so cant be sure i have done this correct although at the moment does give me the expected output when running the process manually. At the moment i have placed Filter 1 in the Report Filters section and then filter 2 in the template report properties. is this correct/the best way to do this?
i saw the below mentioned elsewhere but didnt fully understand it.
task -> user -> report -> object

 

thanks

Dave

Labels (2)
1 Solution

Accepted Solutions
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi @david_pearson 

I dont know your Qlik Sense data model and granularity of the data so I cannot comment on what the result will be without seeing it - that is given...

now - for you to figure out if the search expression is working as you wish you can of course test it by using set analysis. Lets assume you have measure:

  • Sum(Sales)

For that measure to check if what you want to filter works just put in Qlik Sense expression like below:

  • Sum({<REF={'22/11111}> + <NUMBER={'25221309A','25224364A','25225858A','25228893A','25230730A','25231958A'}>}Sales)

Verify number and see how it goes. If there is something wrong - then we will need to look at your model and you will need to provide us with working sample.

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.

View solution in original post

6 Replies
Ruggero_Piccoli
Support
Support

Hi,

Qlik NPrinting filters support Qlik Sense Advanced Search https://help.qlik.com/en-US/qlikview/May2021/Subsystems/Client/Content/QV_QlikView/Advanced_Search.h...

Some samples are in https://community.qlik.com/t5/Qlik-NPrinting-Documents/Examples-of-Advanced-Search-Filters/ta-p/1594...

I think you should create a single filter using Advanced Search OR logic. 

Adding a report and an object filter will result in an AND applied to the object https://help.qlik.com/en-US/nprinting/May2021/Content/NPrinting/ReportsDevelopment/Static-dynamic-fi...

Best Regards,

Ruggero



Best Regards,
Ruggero
---------------------------------------------
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 with a LIKE if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads with LIKEs if you feel additional info is useful to others.
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

This was discussed on community many times, in fact so many times that it triggered me to write the blog post about it here: https://nprintingadventures.com/2021/09/23/filters-in-nprinting-how-hard-can-it-be-part-2-or-mode/ and Ruggero is right - you need to use "advanced search" filter!

 

cheers

Lech

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.
david_pearson
Contributor III
Contributor III
Author

Hi Lech, i had stumbled across your blog before. some really good stuff on there. if i dont want to add in a concatenated field like your Transid example with Dim 1 and Dim 2 etc can i still do an advanced search and do something like the below?? @Ruggero_Piccoli  thanks for sharing those links.

=REF like '22/11111' or NUMBER like '25221309A' + '25224364A'+'25225858A'+'25228893A'+'25230730A'+'25231958A'

 

is this right then that this is looking at AGENCYREF or NUMBER or NUMBER or NUMBER etc.?

 

thanks 

Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi @david_pearson 

I dont know your Qlik Sense data model and granularity of the data so I cannot comment on what the result will be without seeing it - that is given...

now - for you to figure out if the search expression is working as you wish you can of course test it by using set analysis. Lets assume you have measure:

  • Sum(Sales)

For that measure to check if what you want to filter works just put in Qlik Sense expression like below:

  • Sum({<REF={'22/11111}> + <NUMBER={'25221309A','25224364A','25225858A','25228893A','25230730A','25231958A'}>}Sales)

Verify number and see how it goes. If there is something wrong - then we will need to look at your model and you will need to provide us with working sample.

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.
david_pearson
Contributor III
Contributor III
Author

Thanks all, the "accepted solution" worked so thank you for that, but i was just wondering if it could be done without creating a measure/set analysis in the advanced search. Can you not just do something similar to the Value As where you just list a number of different search criteria to check against?

Thanks

Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Sure it could be and as I explained in my blog post you need to apply such Advanced filter on field which will provide required granularity.

Then your filter could be:

Advanced Search: 

  • =Sum({<REF={'22/11111}> + <NUMBER={'25221309A','25224364A','25225858A','25228893A','25230730A','25231958A'}>}Sales)<>0

cheers

lech

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.