I have a pivot table with a column of positive and negative values. I want to create a calculated field to sum up the positive values only. However, when I do that, the subtotals are not taking the If statement of the calculated field into account and is simply summing up the field to the left that contains both the positive and negative values. Here is my code for the pivot table:
The data itself is correct. Wherever GrossMargin is negative, my new field shows zero. Wherever GrossMargin is positive, my new field displays that positive value. However, the subtotal for my new column sums both the positive and negative values.
Any ideas.
Code:
= if ( GrossMargin <0, 0, GrossMargin )
The data itself is correct. Wherever GrossMargin is negative, my new field shows zero. Wherever GrossMargin is positive, my new field displays that positive value. However, the subtotal for my new column sums both the positive and negative values.
Any ideas.