Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
microwin88x
Creator III
Creator III

Total Row with Difference between 2 Totals

Hello,

I have a Pivot Table like this:

ACCOUNTDESCRIPTIONAMOUNT
INCOMETotal $ 1.500
DESC1$ 300
DESC2$ 400
DESC3$ 800
EXPENSESTotal $ 600
DESC1$ 100
DESC2$ 200
DESC3$ 300

What I need is to add a Total row with the result of INCOME - EXPENSES:

ACCOUNTDESCRIPTIONAMOUNT
Total $ 900
INCOMETotal $ 1.500
DESC1$ 300
DESC2$ 400
DESC3$ 800
EXPENSESTotal $ 600
DESC1$ 100
DESC2$ 200
DESC3$ 300

Is there any way to do that?

Thank you!!!

1 Solution

Accepted Solutions
lorenzoconforti
Specialist II
Specialist II

In your expression for AMOUNT, write something along these lines:

=if(Dimensionality()=0,Sum({<ACCOUNT={"INCOME"}>}AMOUNT) - Sum({<ACCOUNT={"EXPENSES"}>}AMOUNT), Sum(AMOUNT))

View solution in original post

2 Replies
MK9885
Master II
Master II

What is your expression?

You want to add Total 900 with 1500 and 600?

lorenzoconforti
Specialist II
Specialist II

In your expression for AMOUNT, write something along these lines:

=if(Dimensionality()=0,Sum({<ACCOUNT={"INCOME"}>}AMOUNT) - Sum({<ACCOUNT={"EXPENSES"}>}AMOUNT), Sum(AMOUNT))