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

How to limit Excel tabs when using Page-cycle to only include tabs with active data according to current filter

Let's say we have a model with a user dimension with the following values:

  • John
  • Jane
  • Rich

Now all these three have sales connected to them, but when the NPrinting model filters to let's say August, where Jane has no sales. Jane should not be populated as a seperate sheet. Is this possible?

Labels (2)
1 Solution

Accepted Solutions
sten_lomme
Contributor III
Contributor III
Author

Found the issue. The reason is the limiting filter was set on the report object, and not on the NPrinting task. So in essence for level to work correctly, the filter needed to be applied to the task instead.

Thanks for all help!!!

View solution in original post

13 Replies
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Of course it is possible. It is strange that it is not working for you since applying filter on period should by association already filter out data only to possible values which is why it is important to understand how data model is built and what filters are being applied. 

Now if your period filter does not filter out users due to model design you can always apply advanced search filter on user field on task or report level which will be based on measure you use to check if there is data or not

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

How would an advanced search filter look like in NPrinting to accomplish this?

Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Advanced filter in NPrinting will look the same as in Qlik Sense or QlikView. 

you can read about it here: https://nprintingadventures.com/2019/06/26/nprinting-filters-part-3-advanced-search/

and here: https://help.qlik.com/en-US/nprinting/May2023/Content/NPrinting/ReportsDevelopment/Static-dynamic-fi...

....so assuming we filter your sample users by sales filter would be:

  • Field: User
  • Advanced Search: = sum(Sales)>0

cheers

 

btw - if your data by association removes those user that filter should not be required as it should just work without it as I mentioned before. So If you need filter - then you may first look at the cause why selection of period is not excluding users without data.

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.
Frank_S
Support
Support

@sten_lomme 

 

Another possible solution for your use case "where Jane has no sales. Jane should not be populated as a seperate sheet. Is this possible?"

 

This might required multiple tasks with conditions applied to each task

1. Task 1 (original report) - users get report if chart has data (condition rule: sales chart has data )

2. Task 2 - (new blank - no NP tags excel report) users get empty report sheet sent to them if chart has no data (condition rule: chart has no data/empty)

Here is a good video that describes NP conditions well.

I may not have fully understood your requirement however this or some variation of therein might work.

 

Here also is something that 'might' help you to build out your requirement as well.

https://community.qlik.com/t5/Member-Articles/The-Multi-Report-NPrinting-template-that-conditionally...

 

Kind regards.

Please remember hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Ruggero_Piccoli
Support
Support

Hi,

Please add the label with the correct version of Qlik NPrinting you are using. This is not the case, but the answer could depend on it so take the good habits to fill every community post with the needed details. Thanks.

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

Hi,

When we set the exact same filter in the QlikView app, all unwanted users are grayed out and I would think they are then removed by association.

We are using set expressions in load script with dynamic dollar sign expansion. Is it possible to use dollar-sign expansion in the NPrinting Advanced Search...something like below...but this does not seem to work. Am I using the wrong syntax?

sten_lomme_0-1692873133275.png

 

sten_lomme
Contributor III
Contributor III
Author

We are on Qlik NPrinting May 2022 SR4

Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

I am not sure what you do there and what expression you have under the variable. 

If you are asking if variable can be expanded with $ sign in Advanced search - I will say yes, it can and it works.

I just tested it and it worked as expected. I created variable vExp_1 with definition Sum(Expression1), I regenerated NPrinting connection metadata and I applied it as advanced filter. It worked as it should,

Lech_Miszkiewicz_0-1692881048614.png

Lech_Miszkiewicz_1-1692881080054.png

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

Found the issue. The reason is the limiting filter was set on the report object, and not on the NPrinting task. So in essence for level to work correctly, the filter needed to be applied to the task instead.

Thanks for all help!!!