Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
gopal5879
Creator
Creator

Add Condition based Column to a Pivot table

Sampel Data Screen ShotSampel Data Screen Shot

Hello folks, 

I have pivot table as in above screen shot,  values a1,a2,a3,a4,a5 coming from a column with values a1,a2,a3,a4,a5 .

Total Valid Targets is derived by adding a2 and a3, in this case 174 as in above example. I have trouble how to add

Total Valid Targets which is based on if field name values  are a2 and a3 , add the measures PID count - in the above example 

it is 174. How can I achieve this, can someone help please.

 

Labels (2)
5 Replies
Anil_Babu_Samineni
MVP
MVP

IF that is not expecting in output from Qlik sense in N-Printing, We will move your topic to Qlik sense forum where you will get good response.

Perhaps this?

If([PID Count]='Q321' and Match(FieldName, 'a1', 'a2'), Sum(Your Field))

Best Anil, 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
gopal5879
Creator
Creator
Author

Hello Anil, Please move if you think I get good response. Just want to let you know the source is qvw file accessed through nprinting connection. 

Anil_Babu_Samineni
MVP
MVP

I see, That is connected to N-Printing only. So we are not moving anywhere.

Can we  know the exact output you expect in N-Printing if my above reply not helps?

Best Anil, 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
gopal5879
Creator
Creator
Author

Hello Anil,

In NPrinting , I expect the output like this. 

 

 

gopal5879_3-1647872160866.png

 

a1, a2 , a3 ,a4,a5 are values coming a field called status.  PID are counted against each of status values 

a1, a2 , a3 ,a4,a5. The exact output needed  is similar to above screen shot , we can take out field Total Targets.

I am struggling to add column Total Valid Targets which is  sum of PID counts of a2 and a3 ( a2 + a3)  for each row.

Need help how to achieve to add additional column Total Valid Targets with condition based computation from

same status field  which has values a1, a2 , a3 ,a4,a5. 

The above screen shot is pivotal representation and how to achieve NPrinting

solution with additional column Total Valid Targets?

Meanwhile I will try using If(Match(FieldName, 'a1', 'a2'), Sum(Your Field))

 

 

 

 

Anil_Babu_Samineni
MVP
MVP

It's good, If you create a report in Qlik and use that ID in N-Printing to see the result as i mentioned in first reply.

Best Anil, 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