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: 
bobbydave
Creator III
Creator III

GetSelectedCount(Country)

I'm using NPrinting 18 Sept release.

I've a report on NPRINTING 16.8 and it runs fine.

After updating to 18, I've noticed an issue.

I'm using Country Paging which shows Countries in different tabs. This works fine. But my graphs should relate to the country tab name

My graph title is using an expression

= if(GetSelectedCount(Country)>1 or GetSelectedCount(Country)=0,'All',Country) & ' Claims incl Off-system

My output on all Country tabs (wihich have the correct country names) is 'All Claims inc Off-system'.

Why wont it pick up the country names when in NPrinting 16, it does.

4 Replies
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi David

I will not answer your question "why" iyt does not work in version 17 or 18 as i do not know how NPrinting exactly works and i am sure Qlik is keeping this secret in very secure place.

however if i were you i would try to use more generic expression which will give you the same result and will not relate to a selection state (which i am assuming is causing a problem for you)

i would use below expression (please also note Only(Country) function instead of just reference to Country Field!:

=if(Count(Distinct Country <> 1,'All', Only(Country)) & ' Claims incl Off-system


cheers


Lech

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

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.

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.
bobbydave
Creator III
Creator III
Author

Hi Lech,

It is strange because if I drag the country from the Page expression in to the template and page <country_page> in the tab name, I can see the Country name in the template corresponding to the Country tab name.

However when I put my chart in, it doesn't evaluate the expression.

Let me try your expression instead and I will let you know the outcome

Thanks

Ruggero_Piccoli
Support
Support

Hi,

I tested both formulas and the results are attached.

David be sure that you are using in the formula the same field you inserted in the Pages node. When Qlik NPrinting creates a page it will apply a filter on the field in the node with the value for the page so your formula should work. Instead it seems that pages are filtered by another field so the field Country continue to have all the 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.
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi, any updates on this? I am interested to know if my suggestion worked for you.

 

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.