Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Total the numbers for Column1 and Column2 and report under a single header of “Result” in a Pivot table

Hi All,

Can some one please help me out to total the numbers for Column1 and Column2(Merging Column1 and Column2) and report under a single header of "Result" in a Pivot table. This is very urgent requirement from my management. Hope some once can guide me at the earliest.

8 Replies
Not applicable
Author

Hi,

Create the third expression for the total.

Not applicable
Author

Hi All,

For your better understanding. I have given you the expression for your reference. Hope now it will be easy for you to understand what I have done.


Expression:1
=ceil(sum(if(wildmatch(Category,'*Call1*') > 0 and (wildmatch([Agreement Met],'no')>0),1,0)) /
sum(if(wildmatch(Category,'*Call1*') > 0 ,1,0)) ,.01)



Expression:2
=ceil(sum(if(wildmatch(Category,'*Call2*') > 0 and (wildmatch([Agreement Met],'no')>0),1,0)) /
sum(if(wildmatch(Category,'*Call2*') > 0 ,1,0)) ,.01)


This is what I have done in the Result column(For merging column1 and column2). Please check and let me know whether I have done the right thing or not.


Result Column:
=ceil(sum(if(wildmatch(Category,'*Call1*','*Call2*') > 0 and (wildmatch([Agreement Met],'no')>0),1,0)) /
sum(if(wildmatch(Category,'*Call1*','*Call2*') > 0 ,1,0)) ,.01)


Not applicable
Author

Hi XXX,

Thanks for your response!

Sorry! I am not able to get what do you wants me to do. Please explain me detaily

deepakk
Partner - Specialist III
Partner - Specialist III

hi,

For eg :

expression 1 :

Sum(A)

expression 2:

Sum(B)

expression3:

coulmn(1) + column(2)

or

expression3:

Sum(A) + Sum(B)

Not applicable
Author

Thanks Deepak

I don't want to show the column(1) and column(2). It can used for the calculation purpose but it should be hided. But the problem is I want to do this in a pivot table and whereas in pivot table we cannot hide the column.

Hope you have understood the problem clearly now.

deepakk
Partner - Specialist III
Partner - Specialist III

hi,

So you can go with other option ...

Sum(A) + Sum(B)

If you can attach a sample application.. it would be easy to help you out.

Not applicable
Author

Hi ,

You can have the expression in this way.

(ceil(sum(if(wildmatch(Category,'*Call1*') > 0 and (wildmatch([Agreement Met],'no')>0),1,0)) /
sum(if(wildmatch(Category,'*Call1*') > 0 ,1,0)) ,.01))+(ceil(sum(if(wildmatch(Category,'*Call2*') > 0 and (wildmatch([Agreement Met],'no')>0),1,0)) / sum(if(wildmatch(Category,'*Call2*') > 0 ,1,0)) ,.01))

But i suggest instead of having this expression you can do the calculation at the Query level and display the same.

suniljain
Master
Master

suggetion give by XXX is perfect. if you implement in design level it reflect the performance. so you have to implement it in script level.