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: 
Lauri
Specialist
Specialist

Subtitle in chart image not filtered

Hello NPrinters,
I have the following bar chart in QS Enterprise Feb 2023:

Lauri_0-1694199344932.png

The subtitle ("Cohort: CGM") uses the following formula:

=If(GetSelectedCount(CohortName)>0, 'Cohort:' & GetFieldSelections(CohortName))
&If(GetSelectedCount([Primary Care Location])>0, ' - Location:' & GetFieldSelections([Primary Care Location]))

When NPrinting pulls this chart into Excel as part of a Publish Task for a specific user, the subtitle includes all possible values that I have put into an NPrinting filter, and it looks like this:

Lauri_1-1694199627378.png

The problem is this: 'Dexcom' and 'Freestyle' are not values associated with the user, so they should not appear. The user in NPrinting has an "Organization" filter that is associated only with 'CGM'. 

As you can see, the chart values (8.2 and 7.5) are correct, so the chart data is being filtered correctly. Just not the subtitle.

I selected 'override values'  for the user's Organization filter in NPrinting but that didn't help.

Any other suggestions? Thanks a lot.

Labels (2)
1 Solution

Accepted Solutions
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

It is not NPrinting doing anything wrong it is you - I am only joking - but soon you will realize why 😎.

What CohortName field selections are applied? Also the same problem is with the other field [Primary Care Location] as it will also behave in the same way.

I bet you have the same behaviour directly in Qlik Sense when you apply ALL filters for that user (the same way NPrinting would meaning selecting all Cohorts and applying Organisation selection on top of it). Since you are using "GetFieldSelections(CohortName))" functions it is show you selected fields (also those which are selected but excluded)https://help.qlik.com/en-US/sense/August2023/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/FieldFu...

I only guess that what you want in this case is possible values? If that's true you could just use: Concat(Distinct CohortName,',') as that will respect selection state and return only result for selection. So this is really Qlik Sense knowledge you may want to play with and understand bit more.

Now you need to make sure you also understand exactly what you do in NPrinting. There is no point guessing and hoping for the best without studying how filters work. Make sure you go through filters section of help thoroughly and understand what each property means. Selecting "override values" and hoping it will fix your issue is just wrong as its purpose is different and may completely change results you see on screen. It may send unintended reports to people who shouldn't get it.  So, I suggest you dont do that (use override) unless there is a particular purpose/design reason why you want to do it. Details as always on: https://help.qlik.com/en-US/nprinting/May2023/Content/NPrinting/ReportsDevelopment/Static-dynamic-fi...

 

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

2 Replies
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

It is not NPrinting doing anything wrong it is you - I am only joking - but soon you will realize why 😎.

What CohortName field selections are applied? Also the same problem is with the other field [Primary Care Location] as it will also behave in the same way.

I bet you have the same behaviour directly in Qlik Sense when you apply ALL filters for that user (the same way NPrinting would meaning selecting all Cohorts and applying Organisation selection on top of it). Since you are using "GetFieldSelections(CohortName))" functions it is show you selected fields (also those which are selected but excluded)https://help.qlik.com/en-US/sense/August2023/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/FieldFu...

I only guess that what you want in this case is possible values? If that's true you could just use: Concat(Distinct CohortName,',') as that will respect selection state and return only result for selection. So this is really Qlik Sense knowledge you may want to play with and understand bit more.

Now you need to make sure you also understand exactly what you do in NPrinting. There is no point guessing and hoping for the best without studying how filters work. Make sure you go through filters section of help thoroughly and understand what each property means. Selecting "override values" and hoping it will fix your issue is just wrong as its purpose is different and may completely change results you see on screen. It may send unintended reports to people who shouldn't get it.  So, I suggest you dont do that (use override) unless there is a particular purpose/design reason why you want to do it. Details as always on: https://help.qlik.com/en-US/nprinting/May2023/Content/NPrinting/ReportsDevelopment/Static-dynamic-fi...

 

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.
Lauri
Specialist
Specialist
Author

What?? This would be my first error ever! 😉

In fact, using Concat instead of GetFieldSelections did the trick. (I now don't know why I chose that function, many months ago...)

Thanks for the educational tips and for the tough love.