Skip to main content

Qlik NPrinting

Discussion Board for collaboration on Qlik NPrinting.

Announcements
Welcome to Qlik Community! Check out our new navigation! FIND OUT MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
ElifGuler
Contributor
Contributor

Variable value does not work

Hello,

I have created dasboard in Qlik Sense. I created variables for my measures like example below. I want to use Nprinting based on user values, so I set an employee ID number value in variable  part of filter, then I added this filter for user but it does not work.  Any help will be really appreciated?

SET v_RESPONSIBLE = 'SEC_ACC_ADMA';
SET v_RESPONSIBLE_PS = 'SEC_ACC_PS';

SET v_OsUser = (upper(SubField(OSUser(),'=',-1);

Measure: count({<SEC_ACC_PS={$(v_OsUser)},TASK_ENTITY={"Proje Ziyareti"}>} [Task_Subject])

Nprinting :

 

ElifGuler_0-1663871814037.png

 

Thanks.

 

Labels (2)
3 Replies
RafaelBarrios
Partner - Creator
Partner - Creator

Hi @ElifGuler 

I’m not very sure where you are having the problem, if it’s  in nprinting or sense app, but you are missing some single quotes in the formula because you are evaluating text and not number

count({<SEC_ACC_PS={'$(v_OsUser)'},TASK_ENTITY={"Proje Ziyareti"}>} [Task_Subject])

Best,

Lech_Miszkiewicz

Hi, 

The logical error is that your variable does not have expression in it so you cannot use "EVALUATE"  checkbox. You just want variable v_OsUser to be set to HTR0410 therefore there is nothing to evaluate! Untick the "evaluate" box and try again.

I also agree that having single quotes is more elegant and should be applied in your set analysis.

I suggest studying how to use particular functions to be sure that correct methods are used - here is a link https://help.qlik.com/en-US/nprinting/May2022/Content/NPrinting/ReportsDevelopment/Static-dynamic-fi...

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.
Lech_Miszkiewicz

On completely different subject. Is there any reason why you had to do set analysis for user selection instead of just regular section access or filters?

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.