How can I use SUMIF in a pivot table data field?

In short I am hoping there is some way to have a SUMIF instead just SUM when double clicking a data field:

Double Click Box

I’m using the pivot table in a spreadsheet where I am tracking all my transactions. The data field I am using SUM on currently is the amount column in my sheet (transaction amount). An amount can be negative or positive, which is why I want to use SUMIF, so I can SUM only the negative values (I don’t want to include the positive values in the SUM function).

This is so I can track my spending outwards, instead of spending in (positive value) and out (negative value).

If anything is unclear please ask! I tried my best to make sense of my problem in text.

Simple solution - add 2 more columns to the source data range - NegativeValue and PositiveValue. Fill these columns with formulas (using the IF function).
For example (NegativeValue, D2 - amount):

=IF(D2<0;D2;0)
1 Like

Hi, thanks for the reply. I thought of doing it that way, but I wanted a more clean approach, but I guess I can go with that if it is not possible with pivot table. Thank you for your reply!

Calc pivot tables do not support calculated fields like Excel does. Therefore, we do all calculations in the data source.

I wasn’t aware it was possible in Excel. Thanks for letting me know it isn’t in calc, appreciate it.