Value fields return null. You can check if a Pivot Table field is calculated field with the IsValueField IsValuesLabel 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.