Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a table like following:

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
| Type1 | SubType1 | Result |
|---|---|---|
| A | 1 | 55.02 |
| 2 | 10 | |
| Total | 65.02 | |
| B | 1 | 65.09 |
| 2 | 40 | |
| Total | 105.09 |
However, the sub total for Type1 and is incorrect.

Anybody have any idea on how to fix it?
Attached is my Qlikview application.
Thanks in advance!
May be try this..
=Sum(Aggr(sum(Value1) + if(SubType1 = '1', sum(Total<Type1> Value2),0),Type1,SubType1))
May be try this..
=Sum(Aggr(sum(Value1) + if(SubType1 = '1', sum(Total<Type1> Value2),0),Type1,SubType1))
Please see this