Calculated fields return null. You can check if a PivotTable field is calculated field with the IsCalculatedField Property
When calling SetShowValueAs(), certain ShowValueAsTypes use a source field as a base field and an index for one of the values in the data source column associated with the source field.