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: 
Anonymous
Not applicable

Multiple User Filters Per Report

Good Day,

We recently migrated to N17 (April Update) and Im having some issues with a requirement coming from the client. We currently have a model that runs per country with multiple products in that country. The current setup of the report which reads from a recipient table in NPrinting 16 is:

UserCountryProduct
A1Product_1
A1Product_2
A1Product_3
A2Product_1
B2Product_1
B2Product_2
C3Product_1
D4Product_1

What Im trying to show is that user A should be getting multiple reports for all his products in his managed country. Bear in mind that the report being sent out is specific per product per country (so we dont combine any data). Thus he should essentially be seeing 3 unique reports in his mail box.

The only way I can see people getting this to work is to create multiple connections however my Product list and country list is well over 100 different combinations. I have the import task working for N17 however the moment I add a second filter in for the user it seems to start acting like a "AND" condition and no results get returned.

Does any one else have some advice on how to tackle this scenario, Im more than happy to explain further if required to do so.

1 Solution

Accepted Solutions
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

still the same..

I would create a single filter for user aaa@gmai.com‌ and my filter would be like:

[Country]={'Lagos','egypt','mexico','paris'}, [product]={'soap','toothpaste','deoderant','floss','toothbrush','wetwipes'}

and would use a cycle functionality through country&product fields

If the combination of country & product needs to be explicit then in Qlik data model i would create concatenated field and use alos a single filter like:

[country&'-'&product]={'lagos-soap','lagos-toothpaste','egypt-'deoderant,etc...}

what do you reckon?

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.

View solution in original post

16 Replies
blaise
Partner - Specialist
Partner - Specialist

what kind of reports (xlsx, pdf, etc) ?

You say that each report is specific - i guess you mean that the data included in the report is specific but the template/structure is the same right?

My recomendation would be to add the User field to the qvw/qvf datamodel and then create user filters to tie NP users to the added User field. Then its just a matter of taste how you set-up the rest with cycle groups, levels in the report etc.

Ruggero_Piccoli
Support
Support

Hi,

You could create a cycle by product and country https://help.qlik.com/en-US/nprinting/April2018/Content/ReportsDevelopment/Cycling-your-reports.htm. You will have a different file for each combination of product and country values.

Best Regards,

Ruggero

---------------------------------------------

When applicable please mark the appropriate replies as CORRECT https://community.qlik.com/docs/DOC-14806. 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.



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.
Anonymous
Not applicable
Author

1. They are xlsx and pptx reports that get sent out

2. Apologies, indeed there are no template changes between country and product however there are data changes.

3. We currently do have a user field brought into the model however that structure looks like the following (comma dilimited)

email, country, product

aaa@gmai.com, lagos, soap

aaa@gmai.com, lagos, toothpaste

So yes the current reports spitted out are done via a a cycle between the country and product which grants me all possible combinations however this cycle gives us around 1400 files in total (no issue there) the issue is the distribution to the end user as email1 is not unique per country and per product, they may get various different products reports per country.

I have investigated the multiple connections per different filter sets but that still means that we will need to create over 1000 different connections to accommodate the various combo's we have simply due to the fact that 2 filter sets cannot be used on one username/email.

Anonymous
Not applicable
Author

The file generation part is running perfect and all our files are outputted into the folder where they should be. The issue comes in with the email distribution of these. N16 we had the simple recipients table which would then run per line item and process so user "aaa" would have got his unique report for soap and toothpaste (in example):

email, country, product

aaa@gmai.com, lagos, soap

aaa@gmai.com, lagos, toothpaste


Now this above table in N17 would mean I need to have two filters for person "aaa" running on two different connections with the way filters are attached to connections in 17. This is not optimal as we could multiple filter combos that need to be run for that user to get his unique batch of documents. Really now just stuck on the distribution part of things for the project

Ruggero_Piccoli
Support
Support

You must create a different user for each email then associate country and product filters for each user. If different users need to receive data of the same country you can reuse the filter for that country.

After you still use cycles and bot cycle and user filters will be used for the report creation.

I hope this helps.

Best Regards,

Ruggero

---------------------------------------------

When applicable please mark the appropriate replies as CORRECT https://community.qlik.com/docs/DOC-14806. 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.



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.
Anonymous
Not applicable
Author

Hey Ruggero,


Will I still not be limited to the fact that only one set of filters can be used per a connection? One email may be used for multiple products in that one country?


I could be loosing the plot here and your advise would be great please but I was under the impression that one user cannot have two "filters" assigned to him as the report task would not run correctly.


Iv attempted assigning the user two filters, defined them on the filter sheet but I would error our when running the report task, If I removed the second filter It would run just fine. In this case for the able example I gave user "aaa" should be receiving two different emails for two different products.


Secondly if the user is carrying the filer why would I still need to cycle in the report task? Just want to make sure Im following you correctly. 

Ruggero_Piccoli
Support
Support

Hi,

Filters are not associated with connections. Filters can be associated with users, tasks, reports and objects. So you can create many filters for each connection.

One email cam be associated with a single user, it is its primary key. Of course you can associate many different filters to a single user. For example user John can has the filter country=UK and products=product1.

Filters can be reused so the same filter can be associated to different users.

If you had an error whit two filters, be sure that their combination is not creating an empty dataset and please update to latest version April 2018 because we did a lot of improvements on how filters are managed.

Use cycles only if you need to create a different file for each value of the same field. For example you want to create a file UK.xlsx, Germany.xlsx, etc. Each file will contain only data for the selected country, so cycles act as filters.

Best Regards,

Ruggero

---------------------------------------------

When applicable please mark the appropriate replies as CORRECT https://community.qlik.com/docs/DOC-14806. 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.



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.
Anonymous
Not applicable
Author

Hey Ruggero,

Im going to re-look at the imported spreadsheet we are using and see if this can be overcome. I will report back with some feedback tomorrow. Thank you for the guidance today.


Additionally I do understand they can have multiple filters however can I have the below defined for the one users email? Thus meaning that one run should produce 3 emails for that user then move onto the next?


Filter 1 - country=UK and products=product1.

Filter 2 - country=UK and products=product2.

Filter 3 - country=USA and products=product1



Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi Justin,

I think Ruggero's suggestion is exactly what you are trying to achieve; can't you just use one filter for user with 2 values: soap & toothpaste for user and use cycle function to loop through product field?

regards

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.