Skip to main content
Announcements
Announcing Qlik Talend® Cloud and Qlik Answers™ to accelerate AI adoption! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Incorrect subtotal for pivot table

Hi All,

I have a table like following:

Untitled.png

And I was intend to do a pivot table that sum the result of value1 according to different Type1 subtype1. And if the value of subtype1 = '1' then if should also add the sum of Value2 for the corresponding Type1 into the result

Type1SubType1Result
A155.02
210
Total65.02
B165.09
240
Total105.09

However, the sub total for Type1 and is incorrect.

Pivot.png

Anybody have any idea on how to fix it?

Attached is my Qlikview application.

Thanks in advance!

1 Solution

Accepted Solutions
settu_periasamy
Master III
Master III

May be try this..

=Sum(Aggr(sum(Value1) + if(SubType1 = '1', sum(Total<Type1> Value2),0),Type1,SubType1))

View solution in original post

2 Replies
settu_periasamy
Master III
Master III

May be try this..

=Sum(Aggr(sum(Value1) + if(SubType1 = '1', sum(Total<Type1> Value2),0),Type1,SubType1))

vipin_mishra479
Creator II
Creator II

Please see this