Pivot Table Calculated Formula If statement

D

Dan McCollick

Hi all,
In a pivot table I am trying to add this formula:

In the insert calculated field-->Formula field i type
=IF('FIELD NAME'="STRING TO COMPARE", 1,0)

Any Idea why this does not work?
 
D

Debra Dalgleish

The calculated field operates on a sum of the field, and the sum of a
text string is zero. The zero result won't equal the "String to
compare", so the calculated field will return a zero.

Perhaps you could do the calculation in the source data instead, and add
that field to the pivot table.
 
D

Dan McCollick

I was able to achieve what I wanted by rearranging the data, but
none-the-less:

I thought that calc fields would do a count if it was non-numerical
data?


I maybe wrong.....

Thank you for the reply though.
 
Top