View Single Post
  #21   Report Post  
Posted to microsoft.public.excel.misc
[email protected] johnmarkmitchell@gmail.com is offline
external usenet poster
 
Posts: 1
Default Using text values in Pivot Tables

On Wednesday, May 15, 2019 at 1:24:31 PM UTC-4, wrote:
go to values add value calculated field (at the bottom of the field list) set 'Summarize by' to 'Custom', and use the formula:

=TO_TEXT('field_title')


This is VERY helpful. Thank you for this creative solution. Hopefully, in the future Google makes this a directly supported feature.

I will note if your original column header has a line break (carriage return) in it as such:

Sales
Person

then you will get the dreaded #ERROR! "Formula parse error".

There is a workaround I have found. Temporarily, change the column header you want to reference in the Calculated Field into a single word. In the case above, let's say we changed it to 'Person' (removing the word Sales and the following carriage return from the example above). Now go create the Calculated Field. In this case, the formula would be

=TO_TEXT('Person')

The field will be created in the Pivot Table without error. Now for the interesting part, you can go change the column name back to the original, and Google Sheets is then smart enough to handle the change.

Thanks so much to for the original idea to use the T0_TEXT function. This is a really creative solution.